Deprecated feature: Tag: declareRefreshController

The wcf:declareRefreshController tag declares a refresh area controller. The refresh area controller provides the JavaScript logic that listens to changes in the render context and the model. It refreshes the refresh areas that are registered to the controller. Refresh areas are declared using the wc.widget.RefreshArea widget and by specifying the ID of a declared refresh controller for the controllerId attribute.

Instead of using the wcf:declareRefreshController tag, write JavaScript code.

Tag information
Body Content empty
Display Name Declare refresh controller
Tag filepath /META-INF/tags/wcf/DeclareRefreshController.tag


Attributes

Name Required Type Description
id true String Refresh controller ID.
renderContextId false String The render context ID. If the render context ID is not specified, then default is assumed.
url false String The URL that is invoked to retrieve the refresh data.
modelChangedScript false JSP fragment JavaScript that is to be run when a model change occurs. The script can use several local variables:

  • controller- the refresh controller

  • message - the model changed event message

  • widget - the refresh area widget

  • renderContext- the render context

renderContextChangedScript false JSP fragment JavaScript that is run when a render context change occurs. The script can use several local variables:

  • controller- the refresh controller

  • message - the model changed event message

  • widget - the refresh area widget

  • renderContext- the render context

json false String This attribute must be set to true if the expected response type from the refresh URL is JSON. The default is HTML.
refreshScript false JSP fragment JavaScript that is run to perform the refresh. The script can use the following local variables:

  • controller- the refresh controller

  • widget - the refresh area widget

  • data - the refresh request response data

  • renderContext- the render context

If this attribute is not specified, then the default behavior is to call widget.setInnerHtml(data).

postRefreshScript false JSP fragment JavaScript that is run after the refresh is complete. The script can use several local variables:

  • controller- the refresh controller

  • widget - the refresh area widget

  • renderContext- the render context


Variables

No variables are defined for the wcf:declareRefreshController tag.


Example

The following example declares a refresh controller object that updates a refresh area with the current order information.


Related reference
WebSphere Commerce foundation tag library