| <?xml version="1.0"?> |
| <!-- |
| Copyright 2004-2005 The Apache Software Foundation or its licensors, |
| as applicable. |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <document> |
| <properties> |
| <title>Tag reference</title> |
| </properties> |
| |
| <body> |
| <section name="Tag reference"> |
| JCR tags detailed description. |
| <ul> |
| <li> |
| <a href="#jcr:session">jcr:session</a> |
| </li> |
| <li> |
| <a href="#jcr:cd">jcr:cd</a> |
| </li> |
| <li> |
| <a href="#jcr:nodes">jcr:nodes</a> |
| </li> |
| <li> |
| <a href="#jcr:properties">jcr:properties</a> |
| </li> |
| <li> |
| <a href="#jcr:set">jcr:set</a> |
| </li> |
| <li> |
| <a href="#jcr:out">jcr:out</a> |
| </li> |
| <li> |
| <a href="#jcr:count">jcr:count</a> |
| </li> |
| <li> |
| <a href="#jcr:size">jcr:size</a> |
| </li> |
| <li> |
| <a href="#jcr:versions">jcr:versions</a> |
| </li> |
| <li> |
| <a href="#jcr:query">jcr:query</a> |
| </li> |
| <li> |
| <a href="#jcr:ifPresent">jcr:ifPresent</a> |
| </li> |
| </ul> |
| </section> |
| |
| <!-- Session --> |
| <section name="jcr:session"> |
| <a name="session" /> |
| <p> |
| Creates a session for the given repository. |
| <br /> |
| It creates a jcr Session and stores it in a page scope |
| variable. |
| </p> |
| <subsection name="Attributes"> |
| <ul> |
| <li> |
| <b>repositoryJNDI</b> |
| [optional] |
| <br /> |
| Name of the jndi address of a repository other |
| than the default. See |
| <a href="configuration.html#repository"> |
| configuration |
| </a> |
| . |
| </li> |
| <li> |
| <b>workspace</b> |
| [optional] |
| <br /> |
| Workspace name. |
| </li> |
| <li> |
| <b>var</b> |
| [optional] |
| <br /> |
| Name of the target page context variable where |
| the session will be stored. |
| </li> |
| <li> |
| <b>user</b> |
| [optional] |
| <br /> |
| <ol> |
| <li>Name of the user for loggin in</li> |
| <li> |
| If no user is provided then use |
| Container managed security principal. |
| </li> |
| <li> |
| If the user is not logged in use default |
| user and password. |
| </li> |
| </ol> |
| |
| </li> |
| <li> |
| <b>password</b> |
| [optional] |
| <br /> |
| User's password. |
| <br /> |
| Password used for creating a new JCR Session. |
| </li> |
| </ul> |
| </subsection> |
| <subsection name="Examples"> |
| <p> |
| <jcr:session> |
| <br /> |
| ... Use the session here |
| <br /> |
| </jcr:session> |
| <br /> |
| </p> |
| </subsection> |
| </section> |
| |
| <!-- CD --> |
| <section name="jcr:cd"> |
| <a name="cd" /> |
| <p> |
| Sets the current directory. Relative paths in jcr tags |
| will be be relative to the current directory. |
| </p> |
| <subsection name="Attributes"> |
| <ul> |
| <li> |
| <b>session</b> |
| [optional] |
| <br /> |
| Name of the scoped variable where the jcr |
| session is stored. |
| </li> |
| <li> |
| <b>node [required]</b> |
| <br /> |
| JSTL expression referencing a node instance or |
| full path |
| <br /> |
| e.g. "${mynode}" or "mynode" |
| </li> |
| <li> |
| <b>scope</b> |
| [optional] default is Page context |
| <br /> |
| Scope of the variable to store the current |
| working directory. |
| </li> |
| </ul> |
| </subsection> |
| <subsection name="Examples"> |
| <p> |
| <br /> |
| <jcr:session> |
| <br /> |
| <jcr:cd node="/myNode"/> |
| <br /> |
| ... |
| <br /> |
| </jcr:cd> |
| <br /> |
| </jcr:session> |
| </p> |
| </subsection> |
| </section> |
| |
| <!-- Nodes --> |
| <section name="jcr:nodes"> |
| <a name="nodes" /> |
| <p> |
| Iterates through the traversed nodes from the given |
| node. |
| </p> |
| <subsection name="Attributes"> |
| <ul> |
| <li> |
| <b>session</b> |
| [optional] |
| <br /> |
| Name of the scoped variable where the jcr |
| session is stored. |
| </li> |
| <li> |
| <b>node [required]</b> |
| <br /> |
| JSTL expression referencing a node instance or |
| full path |
| <br /> |
| e.g. "${mynode}" or "mynode" |
| </li> |
| <li> |
| <b>sortID</b> |
| [optional] |
| <br /> |
| <a href="customization.html#ItemComparator"> |
| ItemComparator |
| </a> |
| ID. |
| <br /> |
| See |
| <a href="customization.html#BeanFactory"> |
| BeanFactory |
| </a> |
| . |
| </li> |
| <li> |
| <b>sortExp</b> |
| [optional] |
| <br /> |
| Expression used by the ItemComparator to |
| evaluate nodes. |
| </li> |
| <li> |
| <b>ascending</b> |
| [optional] |
| <br /> |
| Sort order |
| </li> |
| <li> |
| <b>traverserID</b> |
| [optional] |
| <br /> |
| <a href="customization.html#Traverser"> |
| Traverser |
| </a> |
| ID. See |
| <a href="customization.html#BeanFactory"> |
| BeanFactory |
| </a> |
| . |
| </li> |
| <li> |
| <b>traverserParam</b> |
| [optional] |
| <br /> |
| Parameter that affects Traverser behaviour. See |
| <a href="customization.html#Traverser"> |
| customization |
| </a> |
| . |
| </li> |
| <li> |
| <b>traverserDepth</b> |
| [optional] |
| <br /> |
| Traverse depth |
| </li> |
| <li> |
| <b>filterID</b> |
| [optional] |
| <br /> |
| <a href="customization.html#ItemFilter"> |
| ItemFilter |
| </a> |
| ID. See |
| <a href="customization.html#BeanFactory"> |
| BeanFactory |
| </a> |
| . |
| </li> |
| <li> |
| <b>filterExp</b> |
| [optional] |
| <br /> |
| Expression used by the ItemFilter to evaluate |
| nodes. The evaluation must return a Boolean |
| instance. |
| </li> |
| </ul> |
| </subsection> |
| <subsection name="Examples"> |
| <p> |
| Using jstl core taglib to show the node's path. |
| <br /> |
| <jcr:session> |
| <br /> |
| <jcr:nodes node="/" var="node" |
| traverserDepth="1"> |
| <br /> |
| <c:out value="${node.path}"/> |
| <br /> |
| </jcr:nodes> |
| <br /> |
| </jcr:session> |
| </p> |
| </subsection> |
| </section> |
| |
| <!-- Properties --> |
| <section name="jcr:properties"> |
| <a name="properties" /> |
| <p>Iterates through the properties of the given node.</p> |
| <subsection name="Attributes"> |
| <ul> |
| <li> |
| <b>session</b> |
| [optional] |
| <br /> |
| Name of the scoped variable where the jcr |
| session is stored. |
| </li> |
| <li> |
| <b>node [required]</b> |
| <br /> |
| JSTL expression referencing a node instance or |
| full path |
| <br /> |
| e.g. "${mynode}" or "mynode" |
| </li> |
| <li> |
| <b>sortID</b> |
| [optional] |
| <br /> |
| <a href="customization.html#ItemComparator"> |
| ItemComparator |
| </a> |
| ID. |
| <br /> |
| See |
| <a href="customization.html#BeanFactory"> |
| BeanFactory |
| </a> |
| . |
| </li> |
| <li> |
| <b>sortExp</b> |
| [optional] |
| <br /> |
| Expression used by the ItemComparator to |
| evaluate properties. |
| </li> |
| <li> |
| <b>ascending</b> |
| [optional] |
| <br /> |
| Sort order. |
| </li> |
| <li> |
| <b>filterID</b> |
| [optional] |
| <br /> |
| <a href="customization.html#ItemFilter"> |
| ItemFilter |
| </a> |
| ID. See |
| <a href="customization.html#BeanFactory"> |
| BeanFactory |
| </a> |
| . |
| </li> |
| <li> |
| <b>filterExp</b> |
| [optional] |
| <br /> |
| Expression used by the ItemFilter to evaluate |
| nodes. The evaluation must return a Boolean |
| instance. |
| </li> |
| </ul> |
| </subsection> |
| <subsection name="Examples"> |
| <p> |
| Using jstl core taglib to show the property's path. |
| <br /> |
| <jcr:session> |
| <br /> |
| <jcr:properties node="/" var="property"> |
| <br /> |
| <c:out value="${property.path}"/> |
| <br /> |
| </jcr:properties> |
| <br /> |
| </jcr:session> |
| </p> |
| </subsection> |
| </section> |
| |
| <!-- Set --> |
| <section name="jcr:set"> |
| <a name="set" /> |
| <p> |
| Stores the given node or property in a page context |
| scoped variable. |
| </p> |
| <subsection name="Attributes"> |
| <ul> |
| <li> |
| <b>session</b> |
| [optional] |
| <br /> |
| Name of the scoped variable where the jcr |
| session is stored. |
| </li> |
| <li> |
| <b>item [required]</b> |
| <br /> |
| Expression referencing an Item instance or full |
| path |
| <br /> |
| e.g. "${mynode}" or "mynode" |
| </li> |
| <li> |
| <b>property</b> |
| [optional] |
| <br /> |
| Property name. (Valid only when item is a Node) |
| </li> |
| <li> |
| <b>var</b> |
| [optional] |
| <br /> |
| Page context variable where the jcr Item weill |
| be stored. |
| </li> |
| <li> |
| <b>scope</b> |
| [optional] default is Page context |
| <br /> |
| Scope of the variable to store the current |
| working directory. |
| </li> |
| </ul> |
| </subsection> |
| <subsection name="Examples"> |
| <p> |
| Displaying the path to a node. |
| <br /> |
| <jcr:session> |
| <br /> |
| <jcr:set node="pahtToMyNode/myNode" var="myNode" |
| /> |
| <br /> |
| <c:out value="${myNode.path}"/> |
| <br /> |
| </jcr:session> |
| </p> |
| </subsection> |
| </section> |
| |
| <!-- Out --> |
| <section name="jcr:out"> |
| <a name="out" /> |
| <p> |
| Displays Node and property values through the given |
| template engine and template. |
| <br /> |
| See |
| <a href="configuration.html#TemplateEngine"> |
| configuration |
| </a> |
| . |
| </p> |
| <subsection name="Attributes"> |
| <ul> |
| <li> |
| <b>session</b> |
| [optional] |
| <br /> |
| Name of the scoped variable where the jcr |
| session is stored. |
| </li> |
| <li> |
| <b>item [required]</b> |
| <br /> |
| JSTL expression referencing an Item instance or |
| full path |
| <br /> |
| e.g. "${mynode}" or "mynode" |
| </li> |
| <li> |
| <b>property</b> |
| [optional] |
| <br /> |
| Property name. |
| </li> |
| <li> |
| <b>templateEngine</b> |
| [optional] |
| <br /> |
| <a href="customization.html#TemplateEngine"> |
| TemplateEngine |
| </a> |
| ID. See |
| <a href="customization.html#BeanFactory"> |
| BeanFactory |
| </a> |
| . |
| </li> |
| <li> |
| <b>template</b> |
| [optional] |
| <br /> |
| Template name. |
| </li> |
| </ul> |
| </subsection> |
| <subsection name="Examples"> |
| <p> |
| Displaying a node with the default template engine. |
| <br /> |
| <jcr:session> |
| <br /> |
| <jcr:out node="/" /> |
| <br /> |
| <br /> |
| Displaying a property with the default template |
| engine. |
| <br /> |
| <jcr:out node="/" property="jcr:primaryType" |
| /> |
| <br /> |
| </jcr:session> |
| </p> |
| </subsection> |
| </section> |
| |
| <!-- Count --> |
| <section name="jcr:count"> |
| <a name="count" /> |
| <p>Counts the nodes returned by the given Traverser.</p> |
| <subsection name="Attributes"> |
| <ul> |
| <li> |
| <b>session</b> |
| [optional] |
| <br /> |
| Name of the scoped variable where the jcr |
| session is stored. |
| </li> |
| <li> |
| <b>node [required]</b> |
| <br /> |
| JSTL expression referencing a node instance or |
| full path |
| <br /> |
| e.g. "${mynode}" or "mynode" |
| </li> |
| <li> |
| <b>traverserID</b> |
| [optional] |
| <br /> |
| <a href="customization.html#Traverser"> |
| Traverser |
| </a> |
| ID. See |
| <a href="customization.html#BeanFactory"> |
| BeanFactory |
| </a> |
| . |
| </li> |
| <li> |
| <b>traverserParam</b> |
| [optional] |
| <br /> |
| Parameter that affects Traverser behaviour. See |
| <a href="customization.html#Traverser"> |
| customization |
| </a> |
| . |
| </li> |
| <li> |
| <b>traverserDepth</b> |
| [optional] |
| <br /> |
| Traverse depth |
| </li> |
| <li> |
| <b>filterID</b> |
| [optional] |
| <br /> |
| <a href="customization.html#ItemFilter"> |
| ItemFilter |
| </a> |
| ID. See |
| <a href="customization.html#BeanFactory"> |
| BeanFactory |
| </a> |
| . |
| </li> |
| <li> |
| <b>filterExp</b> |
| [optional] |
| <br /> |
| Expression used by the ItemFilter to evaluate |
| nodes. The evaluation must return a Boolean |
| instance. |
| </li> |
| </ul> |
| </subsection> |
| <subsection name="Examples"> |
| <p> |
| Displaying the number of children for the root node |
| for the default traverser. |
| <br /> |
| <jcr:session> |
| <br /> |
| <jcr:count node="/" traverserDepth="1"> |
| <br /> |
| </jcr:session> |
| </p> |
| </subsection> |
| </section> |
| |
| <!-- Size --> |
| <section name="jcr:size"> |
| <a name="size" /> |
| <p> |
| Estimates the cumulative size of the nodes returned by |
| the given Traverser and displays the value. |
| </p> |
| <subsection name="Attributes"> |
| <ul> |
| <li> |
| <b>session</b> |
| [optional] |
| <br /> |
| Name of the scoped variable where the jcr |
| session is stored. |
| </li> |
| <li> |
| <b>node [required]</b> |
| <br /> |
| JSTL expression referencing a node instance or |
| full path |
| <br /> |
| e.g. "${mynode}" or "mynode" |
| </li> |
| <li> |
| <b>traverserID</b> |
| [optional] |
| <br /> |
| <a href="customization.html#Traverser"> |
| Traverser |
| </a> |
| ID. See |
| <a href="customization.html#BeanFactory"> |
| BeanFactory |
| </a> |
| . |
| </li> |
| <li> |
| <b>traverserParam</b> |
| [optional] |
| <br /> |
| Parameter that affects Traverser behaviour. See |
| <a href="customization.html#Traverser"> |
| customization |
| </a> |
| . |
| </li> |
| <li> |
| <b>traverserDepth</b> |
| [optional] |
| <br /> |
| Traverse depth |
| </li> |
| <li> |
| <b>filterID</b> |
| [optional] |
| <br /> |
| <a href="customization.html#ItemFilter"> |
| ItemFilter |
| </a> |
| ID. See |
| <a href="customization.html#BeanFactory"> |
| BeanFactory |
| </a> |
| . |
| </li> |
| <li> |
| <b>filterExp</b> |
| [optional] |
| <br /> |
| Expression used by the ItemFilter to evaluate |
| nodes. The evaluation must return a Boolean |
| instance. |
| </li> |
| <li> |
| <b>calculatorID</b> |
| [optional] |
| <br /> |
| <a |
| href="customization.html#StorageCalculator"> |
| StorageCalculator |
| </a> |
| ID. See |
| <a href="customization.html#BeanFactory"> |
| BeanFactory |
| </a> |
| . |
| </li> |
| <li> |
| <b>unit</b> |
| [optional] |
| <br /> |
| Size unit ( bytes | kb | mb | gb ) |
| </li> |
| </ul> |
| </subsection> |
| <subsection name="Examples"> |
| <p> |
| Displaying the size of a node. |
| <br /> |
| <jcr:session> |
| <br /> |
| <jcr:size node="/" traverserDepth="0" /> bytes |
| <br /> |
| <br /> |
| Displaying the size of the node plus the children |
| nodes. |
| <br /> |
| <jcr:size node="/" traverserDepth="1" /> bytes |
| <br /> |
| </jcr:session> |
| </p> |
| </subsection> |
| </section> |
| |
| <!-- Versions --> |
| <section name="jcr:versions"> |
| <a name="versions" /> |
| <p>Iterates through the versions of the given node.</p> |
| <subsection name="Attributes"> |
| <ul> |
| <li> |
| <b>session</b> |
| [optional] |
| <br /> |
| Name of the scoped variable where the jcr |
| session is stored. |
| </li> |
| <li> |
| <b>node [required]</b> |
| <br /> |
| JSTL expression referencing a node instance or |
| full path |
| <br /> |
| e.g. "${mynode}" or "mynode" |
| </li> |
| <li> |
| <b>traverserID</b> |
| [optional] |
| <br /> |
| <a href="customization.html#Traverser"> |
| Traverser |
| </a> |
| ID. See |
| <a href="customization.html#BeanFactory"> |
| BeanFactory |
| </a> |
| . |
| </li> |
| <li> |
| <b>traverserParam</b> |
| [optional] |
| <br /> |
| Parameter that affects Traverser behaviour. See |
| <a href="customization.html#Traverser"> |
| customization |
| </a> |
| . |
| </li> |
| <li> |
| <b>traverserDepth</b> |
| [optional] |
| <br /> |
| Traverse depth |
| </li> |
| <li> |
| <b>sortID</b> |
| [optional] |
| <br /> |
| <a href="customization.html#ItemComparator"> |
| ItemComparator |
| </a> |
| ID. |
| <br /> |
| See |
| <a href="customization.html#BeanFactory"> |
| BeanFactory |
| </a> |
| . |
| </li> |
| <li> |
| <b>sortExp</b> |
| [optional] |
| <br /> |
| Expression used by the ItemComparator to |
| evaluate nodes. |
| </li> |
| <li> |
| <b>ascending</b> |
| [optional] |
| <br /> |
| Sort order |
| </li> |
| <li> |
| <b>filterID</b> |
| [optional] |
| <br /> |
| <a href="customization.html#ItemFilter"> |
| ItemFilter |
| </a> |
| ID. See |
| <a href="customization.html#BeanFactory"> |
| BeanFactory |
| </a> |
| . |
| </li> |
| <li> |
| <b>filterExp</b> |
| [optional] |
| <br /> |
| Expression used by the ItemFilter to evaluate |
| nodes. The evaluation must return a Boolean |
| instance. |
| </li> |
| </ul> |
| </subsection> |
| <subsection name="Examples"> |
| <p> |
| Using jstl core taglib to show the node's path. |
| <br /> |
| <jcr:session> |
| <br /> |
| <jcr:versions node="/" var="version"> |
| <br /> |
| <c:out value="${version.created}"/> |
| <br /> |
| </jcr:versions> |
| <br /> |
| </jcr:session> |
| </p> |
| </subsection> |
| </section> |
| |
| <!-- Query --> |
| <section name="jcr:query"> |
| <p>Iterates through the query result nodes.</p> |
| <subsection name="Attributes"> |
| <ul> |
| <li> |
| <b>session</b> |
| [optional] |
| <br /> |
| Name of the scoped variable where the jcr |
| session is stored. |
| </li> |
| <li> |
| <b>stmt [required]</b> |
| <br /> |
| Query statement |
| </li> |
| <li> |
| <b>lang</b> |
| [optional] (default XPATH) |
| <br /> |
| Language |
| </li> |
| <li> |
| <b>var</b> |
| [optional] |
| <br /> |
| Page context variable where the jcr Node will be |
| stored. |
| </li> |
| </ul> |
| </subsection> |
| <subsection name="Examples"> |
| <p> |
| <br /> |
| <jcr:session> |
| <br /> |
| <jcr:query stmt="//*" var="node" lang="xpath"> |
| <br /> |
| Node: >c:out value="${node.path}"/> <br> |
| <br /> |
| </jcr:query> |
| <br /> |
| </jcr:session> |
| </p> |
| </subsection> |
| </section> |
| |
| <!-- IfPresent --> |
| <section name="jcr:ifPresent"> |
| <p> |
| Conditional tag that evaluates the existence of the |
| given node. |
| </p> |
| <subsection name="Attributes"> |
| <ul> |
| <li> |
| <b>session</b> |
| [optional] |
| <br /> |
| Name of the scoped variable where the jcr |
| session is stored. |
| </li> |
| <li> |
| <b>item [required]</b> |
| <br /> |
| Item reference or path |
| </li> |
| <li> |
| <b>property</b> |
| [optional] |
| <br /> |
| Property name. |
| </li> |
| <li> |
| <b>value</b> |
| <br /> |
| [optional] default is true |
| <br /> |
| values: [true | false] |
| <br /> |
| expected evaluation result |
| </li> |
| </ul> |
| </subsection> |
| <subsection name="Examples"> |
| <p> |
| <br /> |
| <jcr:session> |
| <br /> |
| <jcr:ifPresent node="/pahtToMyNode/myNode" /> |
| <br /> |
| ... do some stuff |
| <br /> |
| </jcr:ifPresent> |
| <br /> |
| </jcr:session> |
| </p> |
| </subsection> |
| </section> |
| |
| |
| </body> |
| </document> |