Develop > Presentation layer > WebSphere Commerce foundation tag library


Tag: declareRenderContext

The declareRenderContext tag adds the client-side render context support to the current page. The ID passed to this tag is used to identify the render context. If this tag has already been called for this request and ID, then it will do nothing.

Tag Information  
Tag File /META-INF/tags/wcf/DeclareRenderContext.tag
Body Content empty
Display Name Declare render context

Attributes        
Name Required Type Description  
id false String Render context ID. If the ID is not specified, the render context will be declared as default using the render context ID.
local false String Attribute must be set to true if the render context does not need to be synchronized with the server. The default is false.
url false String URL that is used to update the render context.
properties false JSP Fragment JavaScript Object that contains the initial render context properties. The attribute should only be specified for a local render context.


Example

The following example declares a render context for the current page. It is initialized with a property called "workAreaMode" whose value is "shopcart".

<wcf:declareRenderContext local="true"
id="currentOrderTotals_Context" >        
<jsp:attribute name="properties">{workAreaMode: "shopcart"}</jsp:attribute>
</wcf:declareRenderContext>

Related reference

WebSphere Commerce foundation tag library


+

Search Tips   |   Advanced Search