Develop > Presentation layer > WebSphere Commerce foundation tag library
Tag: metadata
The metadata tag retrieves metadata information that may be returned in response to a Get BOD request that is used for authoring, for example, workspaces in the Management Center. The param tag and the contextData are sub-tags of the getData tag.
Tag Information Body Content empty Display Name Metadata
Attributes Name Required Request-time Type Description showVerb true true com.ibm.commerce.oagis9.datatypes.ShowType The Show verb containing the metadata information in the ResponseCriteria element. businessObject true true java.lang.Object The business object for which the metadata is being retrieved. usage true true java.lang.String The type of metadata being retrieved. Currently, the only supported usage is changeControl. var true false java.lang.String The name of the exported java.util.Map variable that will be assigned all the metadata properties corresponding to the specified usage.
Variables No Variables Defined.
Example
In the following example, the metadata tag is used in a JSP fragment. The changeControl metadata properties for a particular catalog object are retrieved and stored in the propertyMap variable. Then, if the modifiable property is available, its value is used for further processing.
<wcf:metadata showVerb="${show}" businessObject="${catalog}" usage="changeControl" var="propertyMap"/> <c:if test="${!empty propertyMap.modifiable}"> <changeControlModifiable><![CDATA[${propertyMap.modifiable}]]></changeControlModifiable> </c:if>This code would produce output similar to the following example:
<metadata usage="changeControl"> <modifiable>true</modifiable> <logonID>wcsadmin</logonID> </metadata>