foo.jsp (a jsp that makes use of the cm templates)
...
<%
// This is just one example of getting a node from cm. The node could be retrieved
// in many different ways and will be specific to the users actual use case.
Node contentNode = nodeManager.getNode(new ContentContext(), "/WLP Repository/exampleNode");
pageContext.setAttribute("ourContentNode", contentNode);
%>
<dt:displaycmtemplate node="${ourContentNode}" resourceName="${ourContentNode.objectClass.name}"
view="WLP Default Single Property"/>
...
cmTempateExample.jsp (the jsp that is used as the cm display template)
...
<cm:getNode id="templateNode"/>
<c:forEach items="${templateNode.properties}" var="property">
<b>${property.name}:</b> = ${property.value}
</c:forEach>
...
| | | | |
Attributes |
Name | Required | Request-time | Description |
| | | |
path | false | true |
The path of the Node to get. Must start with "/" + the repository name. If the path is not
specified, then the tag will attempt to retrive the node from the common cm request attribute.
This would be the case if the node was set using the setNode tag, or if it was set through
the display template tags.
|
| | | |
id | true | false |
The name of the script variable where the Node will be placed.
|
| | | |
failOnError | false | true |
True to throw a JspTagException if any error occurs; false to return a null on error.
Defaults to false.
|
| | | |
useCache | false | true |
Set to true if Node should be cached at the webapp level. Searches are generally automatically
cached at the RepositoryManager level. This can be used for more controlled caching. Defaults to false.
|
| | | |
cacheScope | false | true |
The scope to cache the results at. Can be either "application", "request", "page", or
"session". Defaults to "session".
|
| | | |
cacheId | false | true |
The id for the cached Node. Defaults to the id attribute.
|
| | | |
cacheTimeout | false | true |
The number of milliseconds to keep the cached results. Defaults to never expire cache entries.
|
Copyright © 2010, Oracle. All rights reserved.