Description:
The JCMS Tag Library provides a compehensive set of tag to easily access and present data stored in a JCMS webapp.
Tags SummaryDescription: Manages a cache for the content of the body.
Attributes
| Name | Type | Required | RT expr. value | Description |
| id | java.lang.String | x | x | The cache id (must be unique) |
| classes | [Ljava.lang.Class; | - | x | The array of class to listen to. Each time an instance of these classes is created, updated or deleted, the cache is refreshed. For publications, it only concerns instances in a visible state. |
| classesStr | [Ljava.lang.String; | - | x | The array of String (class name) to listen to. Each time an instance of these classes is created, updated or deleted, the cache is refreshed. For publications, it only concerns instances in a visible state. |
| timeout | long | - | x | The timeout of the cache (in minutes). The next time the cache will be accessed, if the timeout has been reached, the cache will be refresh. |
| session | boolean | - | x | If true a cached content is managed for each user session. Set this attribute to true, if the cached fragment contains personalized informations (e.g. restricted publications). Default value: false. |
| refresh | boolean | - | x | If true the cached content is refreshed. Default value: false. |
| disabled | boolean | - | x | If true the tag is disabled. Default value: false. |
Example of use:
<jalios:cache id="mycache" classes="<%= new Class[] {Publication.class, Category.class} %>" >
...
</jalios:cache>
|
Description: Prints the caddy icon.
Attributes
| Name | Type | Required | RT expr. value | Description |
| pub | com.jalios.jcms.Publication | - | x | The publication to be added in the caddy. |
| data | com.jalios.jcms.Data | - | x | The data to be added in the caddy. |
| collection | java.util.Collection | - | x | A collection of data to be added in the caddy. Because of the very long URL it could generate for large collection, prefer use of a Query String when possible. |
| queryString | java.lang.String | - | x | A query String: all matching publications will be added to the caddy. |
| checkPstatus | boolean | - | x | Indicates whether the pstatus has to be checked. Default is true. |
| action | java.lang.String | - | x | Indicates action that must be done with given data.
Either:
|
| icon | String | - | x | Specify the icon of the caddy. |
| iconOut | String | - | x | Specify the icon of the caddy when data is already in caddy. |
| refresh | boolean | - | x | Indicates whether the page should be refreshed after the link to add/remove data(s) in the caddy. Default is false. |
| css | java.lang.String | - | x | Specify the css class(es) to use for the generated link. |
| displayLinkText | boolean | - | x | Indicates whether the text normally used for alternative and title text of the icon should also be displayed in the generated link. Default is false. |
Example of use:
<jalios:caddy data="<%= itPub %>">.
|
Description: Visits all the sub-nodes of a given TreeNode
Attributes
| Name | Type | Required | RT expr. value | Description |
| root | com.jalios.util.TreeNode | x | x | Root of the TreeNode |
| visiteroot | boolean | - | x | True if the root category must be visited. Default value: false. |
| visite | java.lang.String | - | x | Not already implemented |
| counter | String | - | x | The name of the counter variable. Default value: itCounter |
| name | String | x | x | The name of the iteration variable |
| type | String | x | x | The type of the iteration variable |
Variables
| Name | Type | Declared | Scope | Description |
| @counter | int | x | NESTED | Iteration counter (from 1) |
| itNode | com.jalios.util.TreeNode | x | NESTED | The iterated TreeNode with given name and given type represented by parameter name and type |
| itLevel | int | x | NESTED | Level of the iterated node |
| itLevelVariation | int | x | NESTED | Level variation of the iterated node in comparison with the previous node |
| itLevelNextVariation | int | x | NESTED | Level variation of the next node in comparison with the current node (at last iteration, next level is considered to be zero). |
| itPosition | int | x | NESTED | Position of the iterated node in comparison with its siblings |
| itHasNext | boolean | x | NESTED | True if there is at least one node to visit |
| itNextNode | com.jalios.util.TreeNode | x | NESTED | The next node to visite (null if iterating on the last one) |
| itLastChild | boolean | x | NESTED | True if this node is the last of this level |
Example of use:
<jalios:tree root="<%= previewTree %>" visiteroot="true">
<%= itNode %>
</jalios:tree>
|
Description: Visits all the sub-categories from a given category.
Attributes
| Name | Type | Required | RT expr. value | Description |
| root | String | - | x | Id of the root. Default value: root of categories. |
| canRead | boolean | - | x | If we should check category read rights (by default it is true) |
| visiteroot | boolean | - | x | True if the root category must be visited. Default value: false. |
| visite | java.lang.String | - | x |
Visit order. Possible values :
|
| counter | String | - | x | The name of the counter variable. Default value: itCounter |
Variables
| Name | Type | Declared | Scope | Description |
| @counter | int | x | NESTED | Iteration counter (from 1) |
| itCategory | com.jalios.jcms.Category | x | NESTED | The iterated category |
| itLevel | int | x | NESTED | Level of the iterated category |
| itLevelVariation | int | x | NESTED | Level variation of the iterated category in comparison with the previous category |
| itLevelNextVariation | int | x | NESTED | Level variation of the next category in comparison with the current category (at last iteration, next level is considered to be zero). |
| itPosition | int | x | NESTED | Position of the iterated category in comparison with its siblings |
| itHasNext | boolean | x | NESTED | True if there is at least one category to be visited |
| itNextCategory | com.jalios.jcms.Category | x | NESTED | The next category to be visited (null if iterating on the last one) |
| itLastChild | boolean | x | NESTED | True if this category is the last of this level |
Example of use:
A first example:
<jalios:categories root="root" visiteroot="false" visite="children-first">
<table border="0" width="500">
<tr>
<td width="<%= (itLevel.intValue() + 1) * 20 %>"> </td>
<td width="<%= 500 - ((itLevel.intValue() + 1) * 20) %>">
<%= itCategory.getName() %> (<%= itCategory.getPublicationSet().size() %>)
</td>
</tr>
</table>
</jalios:categories>
A second example:
<ul>
<jalios:categories root="root" visiteroot="false" >
<li><%= itCategory.getName() %>
<% if (itCategory.isNode()) { %>
<ul>
<% } else {
for(int i=0; i < -itLevelNextVariation.intValue(); i++) { %>
</ul>
<% } %>
<% } %>
</jalios:categories>
</ul>
|
Description: Prints the edit icon.
Attributes
| Name | Type | Required | RT expr. value | Description |
| id | String | - | x | The id of the object to be edited (exclusive with 'type' attribute) |
| data | com.jalios.jcms.Data | - | x | The data to be edited(exclusive with 'type' attribute) |
| pub | String | - | x | The publication to be edited (exclusive with 'type' attribute) |
| type | String | - | x | The type of the object to be created (exclusive with 'id' attribute), may have multiple type separated by , |
| querystring | String | - | x | Extract category ids (cids) and types from this queryString |
| layerId | String | - | x | The id to be used for the layer displayed by tag |
| cids | String | - | x | A blank-separated list of category id to be selected when adding a new publication |
| typeSet | java.util.Set | - | x | A set of types |
| target | String | - | x | The window or frame target |
| redirect | String | - | x | The page to be redirected on after the edition has been performed (Default value is managed by the EditFormHandler) |
| params | String | - | x | A set of additional parameters to be added (must respect the URL syntax for parameters, e.g. p1=v1&p2=v2%20with%20space, ...) |
| popup | boolean | - | x | If true, open the editor in a popup window (default value: false) |
| contentOnly | boolean | - | x | If true, opened editor in a popup window will only display content tab (default value: false) |
| fields | String | - | x | A comma-separated list of fields to edit (default value: all the field). |
| icon | String | - | x | The custom icon to be displayed. |
| iconTitle | String | - | x | The custom icon title to be displayed. |
| openTab | int | - | x | The identifier of the tab to be opened (see com.jalios.jcms.JcmsConstants). Default is CONTENT_TAB. |
Example of use:
<jalios:edit type="SmallNews" redirect="index.jsp" />
<jalios:edit id="<%= itPublication.getId() %>" />
<jalios:edit pub="<%= itPublication %>" />
|
Description: Prints the delete icon.
Attributes
| Name | Type | Required | RT expr. value | Description |
| id | String | - | x | The id of the data to be delete |
| data | String | - | x | The data to be deleted |
| redirect | String | - | x | The page to be redirected on after the deletion has been performed (Default value is managed by the EditFormHandler) |
Example of use:
<jalios:delete id="<%= itPublication.getId() %>" />
<jalios:delete data="<%= itPublication %>" />
|
Description: Prints the archive icon.
Attributes
| Name | Type | Required | RT expr. value | Description |
| id | String | - | x | The id of the publication to be archived |
| pub | String | - | x | The publication to be archived |
| redirect | String | - | x | The page to be redirected on after the archive has been performed (Default value is managed by the EditFormHandler) |
Example of use:
<jalios:archive id="<%= itPublication.getId() %>" />
<jalios:archive pub="<%= itPublication %>" />
|
Description: Prints the flag languages.
Attributes
| Name | Type | Required | RT expr. value | Description |
| lang | String | - | x | The language to be displayed (default value is the user language). |
| title | String | - | x | The title (tooltips) of the image. |
| display | String | - | x | The display mode. Possible value "menu", "list" or "flag" (default value). Mode "menu" and "list" are exclusive with "lang" attribute. |
| useLocalizedLanguageList | String | - | x | Whether to display only available localization languages of JCMS instead of the all the languages defined for the site. |
Description: Prints the webhelp icon.
Description: Prints the workspace icon.
Attributes
| Name | Type | Required | RT expr. value | Description |
| allWorkspace | boolean | - | x | Allow all workspace mode |
| allWorkspaceUrl | java.lang.String | - | x | The All Workspace URL |
| updateUrl | boolean | - | x | The tag should use the current url with updated param |
Description: Prints the PDF link of the given file (if it exists).
Attributes
| Name | Type | Required | RT expr. value | Description |
| doc | com.jalios.jcms.FileDocument | - | x | The document to print the PDF icon (exclusive with filename attribute). |
| file | String | - | x | The filename (exclusive with doc attribute). |
| target | String | - | x | The window or the frame where the PDF must be to be opened. |
Example of use:
<jalios:pdf filename="upload/test.pdf" />
|
Description: Prints a data chooser (publication or member) HTML form input.
Attributes
| Name | Type | Required | RT expr. value | Description |
| superClass | java.lang.Class | x | x | The super class to choose an instance (default value: Publication) |
| multivalue | boolean | - | x | If true, can select multiple values. |
| multivalueIdSeparator | java.lang.String | - | x | The separator to be used when filling the id field. (Default value is ",") |
| listvalue | boolean | - | x | If true, the result is proposed as a list |
| data | String | - | x | The data to fill the input with |
| dataList | java.util.Collection | - | x | The list of data to fill the input with |
| customUrlParams | String | - | x | Additional parameters given to the chooser |
| formName | String | - | x | The name of the enclosing HTML form |
| widgetName | String | - | x | The name of the HTML input |
| size | int | - | x | The size of input which contains the title of the data |
| addCount | int | - | x | The initial form input count |
| incCount | int | - | x | The increment form input count |
| formElementCount | int | - | x | The position of the inputs in the form (only required when severals DurationChooserTag have the same widgetName) |
| css | String | - | x | The CSS to use (wrap a div block with the given CSS class around the generated HTML code) |
Example of use:
Choose a content: <jalios:datachooser superClass='<%= Content.class %>' data='<%= contentAlreaySelected %>' formName='editForm' widgetName='pub' />
|
Description: Prints a duration chooser (value / unit) form input. It produces 3 form inputs : the visible value, the unit chooser and the hidden input. The real value is set in the hidden input. Default resolution is second but it can be set up with resolution attribute (e.g. enter 1 for a millisecond resolution, 1000 for second, 60000L for minute, ...).
Attributes
| Name | Type | Required | RT expr. value | Description |
| formName | String | - | x | The name of the enclosing form |
| widgetName | String | - | x | The name of the form input |
| formElementCount | int | - | x | The position of the input in the form (only required when severals DurationChooserTag have the same widgetName) |
| css | String | - | x | The CSS to use (add a span with the given CSS class around the generated HTML code) |
| duration | long | - | x | The initial duration |
| resolution | long | - | x | Output time resolution in millisecond (Default value is 1000) |
Example of use:
<li><jalios:durationchooser duration='<%= 2 * JcmsConstants.MILLIS_IN_ONE_HOUR %>' formName='editForm' widgetName='duration'/>
<li><jalios:durationchooser duration='<%= 2 %>' formName='editForm' widgetName='duration' resolution='<%= JcmsConstants.MILLIS_IN_ONE_HOUR %>'/>
|
Description: Prints the icon of a given publication. The association map is declared in the properties with the following syntax:
tag.pubicon.ShortClassName: outputwhere:
ShortClassName: the short class name of the publication type (eg. WebPage, Article, ...)).output: the string to be printed (eg. <img src="images/custom/webpage_icon.gif" alt="WebPage">)
Attributes
| Name | Type | Required | RT expr. value | Description |
| pub | com.jalios.jcms.Publication | x | x | The publication to print the icon |
| format | String | - | x | The icon format (eg. 'small') |
Example of use:
<jalios:pubicon pub="<%= itPublication %>"/>
|
Description: Performs a query on a data set and sorts results with a comparator.
Attributes
| Name | Type | Required | RT expr. value | Description |
| name | String | x | x | The name of the variable containing the result set |
| dataset | java.util.Set | - | x | The data set to be queried. Default value: all publications. |
| selector | com.jalios.jcms.DataSelector | - | x | A DataSelector. Default value: null (i.e. all data are selected) |
| comparator | java.util.Comparator | - | x | A Comparator. Default value: null (i.e. sort in the reverse order of the creation date (cdate)) |
| queryString | String | - | x | A queryString (e.g. type=generated.Article&cids=c_1234). This attribute is exclusive with all other criteria attributes. |
| text | String | - | x | A text to be matched (according the mode value). |
| mode | String | - | x | The full-text search mode. Possible values are : all, any, exact, word. Default value is all. |
| catName | boolean | - | x | If true, the full-text search is extended to the category names (i.e. select all the publications using categories which names match the given text). Default value is false. |
| exactCat | boolean | - | x | If catMode is set to "exact", do not extend the category search to the sub-categories. Default value is false. |
| searchInPub | boolean | - | x | If true, search in searchable text of publication. Default value is true. |
| searchInFiles | boolean | - | x | If true, the full-text search is extended to attached files (i.e. select all the publications refering files that match the given text). Default value is false. |
| cids | String | - | x | A comma-separated list of categories id to use has selector. |
| cidsoff | String | - | x | A comma-separated list of categories id to exclude has selector. |
| mids | String | - | x | A comma-separated list of members id to use has selector. |
| midsoff | String | - | x | A comma-separated list of members id to exclude has selector. |
| gids | String | - | x | A comma-separated list of groups id to use has selector. |
| gidsoff | String | - | x | A comma-separated list of groups id to exclude has selector. |
| types | String | - | x | A comma-separated list of publication types (e.g. custom.WebPage). |
| typesoff | String | - | x | A comma-separated list of publication types to avoid (e.g. custom.WebPage). |
| exacttype | boolean | - | x | If true, type search is not extended to the sub-types. Default value is false. |
| ratings | String | - | x | A comma-separated list of ratings (integer values). |
| pstatus | String | - | x | A comma-separated list of pstatus (integer values). |
| checkpstatus | String | - | x | if true, select only the publications in a visible state. |
| replaceFileDoc | boolean | - | x | Indicates whether the FileDocuments must be replaced by their referrers if they exist. Default is false. |
| datesince | int | - | x | Search publications published since a given time. This attribute replaces the previous attribute 'daterange'. Exclusive with beginDate and endDate. |
| begindate | java.util.Date | - | x | Value of the begin date. Exclusive with beginday, beginmonth, beginyear. |
| enddate | java.util.Date | - | x | Value of the end date. Exclusive with endday, endmonth, endyear. |
| beginday | int | - | x | Value for the day of the begin date. Exclusive with begindate. |
| beginmonth | int | - | x | Value for the month of the begin date. Exclusive with begindate. |
| beginyear | int | - | x | Value for the year of the begin date. Exclusive with begindate. |
| endday | int | - | x | Value for the day of the end date. Exclusive with enddate. |
| endmonth | int | - | x | Value for the month of the end date. Exclusive with enddate. |
| endyear | int | - | x | Value for the year of the end date. Exclusive with enddate. |
| datetype | String | - | x | Possible values are : cdate, mdate, pdate or edate. Default value is cdate. |
Variables
| Name | Type | Declared | Scope | Description |
| @name | java.util.SortedSet | x | AT_END | The result set |
Example of use:
Display the 10 first members sorted alphabetically
<jalios:query name="resultSet" dataset="<%= channel.getDataSet(Member.class) %>" comparator="<%= Member.getNameComparator() %>"/>
<jalios:foreach collection="<%= resultSet %>"
name="itMember"
type="com.jalios.jcms.Member" >
<%= itMember.getName() %><br/>
</jalios:foreach>
|
Description: Prints the rating of a given publication.
Attributes
| Name | Type | Required | RT expr. value | Description |
| pub | com.jalios.jcms.Publication | - | x | The publication to print the rating (this attribute is exclusive with rating attribute) |
| format | String | - | x | An optionnal format to use a set of rating properites (tag.rating.myformat.0, ...) |
| rating | int | - | x | The rating value (this attribute is exclusive with pub attribute) |
Example of use:
<jalios:rating pub="<%= itPublication %>"/>
|
Description: Generates an html image tag (this tag is used as super tag for some icon tags)
Attributes
| Name | Type | Required | RT expr. value | Description |
| align | java.lang.String | - | x | Image Alignement left, right, center |
| alt | java.lang.String | - | x | Description of the image on mouse over |
| name | java.lang.String | - | x | name parameter of the image |
| id | java.lang.String | - | x | id parameter of the image |
| clazz | java.lang.String | - | x | class parameter of the image |
| border | int | - | x | Image Border |
| height | java.lang.String | - | x | Image height (could be in % or in px) |
| width | java.lang.String | - | x | Image Width (could be in % or in px) |
| hspace | int | - | x | Horizontale Margin of the image |
| vspace | int | - | x | Verticale Margin of the image |
| src | java.lang.String | x | x | Source of the Image |
| usemap | java.lang.String | - | x | Use a client side map for the image |
| link | java.lang.String | - | x | Create a A HREF Tag for the image using the link |
| target | java.lang.String | - | x | The target parameter for the A HREF tag (_blank,_self,_parent,_top) |
Example of use:
<jalios:image src="http://www.google.fr/images/hp0.gif" align="center" alt="Goo..." border="3" height="50" width="30" hspace="5" vspace="5" link="http://www.google.com" target="_blank"/>
|
Description: Lists members who have published the most
Attributes
| Name | Type | Required | RT expr. value | Description |
| max | int | x | x | number of member to be displayed. Default value: 10. |
| ufreq | long | - | x | update frequency (in minute). Default value: 60 minutes. |
| counter | String | - | x | The name of the counter variable. Default value: itCounter |
Variables
| Name | Type | Declared | Scope | Description |
| @counter | int | x | NESTED | Iteration counter (from 1) |
| itMember | com.jalios.jcms.Member | x | NESTED | The iterated member |
| itMemberCount | int | x | NESTED | The count of publication for this member |
| itMemberTrends | int | x | NESTED | Trends of the iterated member. |
Example of use:
<table>
<jalios:topMember max="5" ufreq="30">
<tr>
<td><b><%= itCounter %></b></td>
<td><%= itMember.getName() %></td>
<td><%= itMemberCount %></td>
<td>
<% if (itMemberTrends > 0) { %>
<img src="images/jalios/icons/arrowup.gif" />
<% } else if (itMemberTrends < 0) { %>
<img src="images/jalios/icons/arrowdown.gif" />
<% } else { %>
<% } %>
</td>
</tr>
</jalios:topMember>
</table>
|
Description: Formats the body with the wiki text formatting rules.
Attributes
| Name | Type | Required | RT expr. value | Description |
| css | String | - | x | The name of the CSS class to be used. (Default value is 'wiki' css class). |
| span | boolean | - | x | If false, wraps a span tag around the html otherwise wraps a div tag. Default is false. |
Example of use:
TBD.
|
Description: Prints an horizontal bar chart.
Attributes
| Name | Type | Required | RT expr. value | Description |
| printCSS | boolean | - | x | Should print CSS value for chart |
| printChart | boolean | - | x | Should print the Chart |
| mixedChart | boolean | - | x | When multiple chart, indicate if chart should be mixed |
| isPercent | boolean | - | x | Indicate if values are percent or absolute values |
| color | int | - | x | The count of colors the CSS should generate |
| colorFirst | int | - | x | The first color to use in color table |
| colorRotate | int | - | x | Rotate color of a single chart among multiple colors |
| colors | [Ljava.lang.String; | - | x | The color list |
| locale | java.util.Locale | - | x | I18N Units |
| width | int | - | x | The width in pixel of the chart (default value is 100%) |
| fixHLengthWidth | int | - | x | Fix the Horizontal width of the Legend to use a common presentation between charts |
| height | int | - | x | The height in pixel of the vchart (default value is 200px) |
| max | int | - | x | The number of elements to display |
| maxValue | int | - | x | The maximum value to use in the chart (as scale) |
| title | java.lang.String | - | x | The Title of the Chart |
| unit | java.lang.String | - | x | The Unit to display on the opposite side of displayed values |
| sort | java.lang.String | - | x | Indicate how to Sort the Chart: none, greater, lower |
| display | java.lang.String | - | x | The representation display of the chart. Choose between "vchart" (Vertical Chart) and "hchart" (Horizontal Chart) |
| dataMap | com.jalios.util.ObjectIntTreeMap | - | x | An ObjectIntTreeMap representing Chart with key the legend (String) and values int[0] or a sub map with key/int[] |
| beautifier | com.jalios.jtaglib.ChartTagBeautifier | - | x | Use the specified ChartTagBeautifier to convert all displayed String and other field, (usefull for I18N Label, Icons, Styles, Classes ...) |
| legendComparator | java.util.Comparator | - | x | A way to sort legend elemnts. sort param must be null |
Example of use:
<%
ObjectIntTreeMap chart1 = new ObjectIntTreeMap();
chart1.put("Legend A1" , 40);
chart1.put("Legend B1" , 50);
chart1.put("Legend C1" , 60);
chart1.put("Legend D1" , 60);
chart1.put("Legend E1" , 50);
chart1.put("Legend F1" , 40);
%>
<jalios:chart printCSS='<%= true %>' colors='<%= new String[]{"#FF0000","#DD0000","#BB0000","#990000"} %>' />
<jalios:chart max='<%= 5 %>' dataMap='<%= chart1 %>' title='<%= "Single Chart" %>' display='hchart' sort='<%= "lower" %>'/>
To flip vertical chart data add this style:
<style> .chart .vchart DIV { writing-mode: tb-rl; filter: flipv fliph;} </style>
|
Description: Formats the body in an ASCII block.
Attributes
| Name | Type | Required | RT expr. value | Description |
| cols | int | x | x | The max length of a line |
| rows | int | - | x | Number of rows to produce (ignore all the next rows) |
| suffix | String | - | x | The string to be appended if the body has been truncated |
Example of use:
TBD.
|
Description: Outputs the evaluation of the body in a given String variable
Attributes
| Name | Type | Required | RT expr. value | Description |
| name | String | x | x | The name of the output String variable |
| trim | boolean | - | x | If true, the body is trimmed (default value: true) |
Variables
| Name | Type | Declared | Scope | Description |
| @name | java.lang.String | x | AT_END | Contains the formatted body |
Example of use:
This example shows how the <jalios:buffer> tag may be used to send a
personalized email to all the members of the site.
<jalios:foreach collection="<%= channel.getDataSet(Member.class) %>"
name="itMember"
type="Member" >
<jalios:buffer name="mailContent">
Hello <%= itMember.getName() %>,
Here are the 10 latest publications:
<jalios:query name="resultSet" dataset="<%= channel.getDataSet(Content.class) %>" comparator="<%= Publication.getPdateComparator() %>"/>
<jalios:foreach collection="<%= resultSet %>"
name="itPublication" max="10"
type="com.jalios.jcms.Content" >
<%= itCounter %>. <%= itPublication.getTitle() %><br>
----------------------------------
by <%= itPublication.getAuthor() %>
<%= itPublication.getAbstract() %>
</jalios:foreach>
</jalios:buffer>
<jalios:sendmail to="<%= itMember.getEmail() %>"
from="<%= channel.getSenderFullEmail() %>"
subject="Your Personnal Newsletter"
content="<%= mailContent %>" />
</jalios:foreach>
|
Description: Manages chronos organized by name. The following actions are supported:
Attributes
| Name | Type | Required | RT expr. value | Description |
| name | String | x | x | The name of the chrono object |
| action | String | x | x | The action to ask to the chrono (start, stop, step, resume, pause, print, printhtml) |
Example of use:
<jalios:chrono name="chrono" action="start"/>
...
<jalios:chrono name="chrono" action="step"/>
...
<jalios:chrono name="chrono" action="step"/>
...
<jalios:chrono name="chrono" action="stop"/>
Step1: <jalios:duration time="<%= chrono.getDelta(0, 1) %>"/>
Step2: <jalios:duration time="<%= chrono.getDelta(1, 2) %>"/>
Total: <jalios:duration time="<%= chrono.getTime() %>"/>
|
Description: Prints a date. Formats the date with either the value of the "locale" attribute, the value of the context attribute "jtaglib.locale" or the default locale of the JVM (in this order).
Attributes
| Name | Type | Required | RT expr. value | Description |
| date | java.util.Date | - | x | The date to be printed (default value: the current date) |
| format | String | - | x |
The format used to print the date. The following formats are available:
|
| locale | java.util.Locale | - | x | The locale to use (default value: the default locale) |
| nowifnull | boolean | - | x | If true, the current date is printed if the date attribute is null; if false nothing will be printed (default value: true) |
Example of use:
<jalios:date date="<%= myDate %>" format="short"/>
Using a custom format (1996.07.10 AD at 15:08:56 PDT)
<jalios:date date="<%= myDate %>" format="yyyy.MM.dd G 'at' hh:mm:ss z"/>
|
Description: A default tag for the select tag.
Example of use:
<jalios:select>
<jalios:if predicate="<%= 4>5 %>" > NO </jalios:if>
<jalios:default> In Select DEFAULT </jalios:default>
</jalios:select>
|
Description: Prints a duration (e.g. 2 days 8 hours 35 min. 47 s.) Formats the duration with either the value of the "locale" attribute, the value of the context attribute "jtaglib.locale" or the default locale of the JVM (in this order).
Attributes
| Name | Type | Required | RT expr. value | Description |
| begin | java.util.Date | - | x | The begining date (this attribute is exclusive with time attribute). |
| end | java.util.Date | - | x | The ending date (this attribute is exclusive with time attribute). |
| time | long | - | x | The elapsed time in milliseconds (this attribute is exclusive with begin and end attributes). |
| locale | java.util.Locale | - | x | The locale to use (default value: the default locale) |
Example of use:
<jalios:duration begin="<%= beginDate %>" end="<%= endDate %>" />
|
Description: Prints the icon of the given FileDocument.
Attributes
| Name | Type | Required | RT expr. value | Description |
| doc | com.jalios.jcms.FileDocument | x | x | The document to print the icon. |
Example of use:
<jalios:fileicon doc="<%= myDoc%>"/>
|
Description: Prints the formatted size of a file or a FileDocument (e.g. 3.45 MB).
Attributes
| Name | Type | Required | RT expr. value | Description |
| size | long | - | x | The size to be formatted (exclusive with doc attribute). |
| doc | com.jalios.jcms.FileDocument | - | x | The document to format the size (exclusive with doc attribute). |
| locale | java.util.Locale | - | x | The locale to use (default value: the default locale) |
Example of use:
<jalios:filesize size="123455" />
|
Description: Iterates over a collection of objects.
Attributes
| Name | Type | Required | RT expr. value | Description |
| name | String | x | x | The name of the iteration variable |
| type | String | x | x | The type of the iteration variable |
| collection | java.util.Collection | - | x | The collection to iterate over (exclusive with array, iterator and enumeration). |
| array | [Ljava.lang.Object; | - | x | The array to iterate over (exclusive with collection, iterator and enumeration). |
| iterator | java.util.Iterator | - | x | The iterator to iterate over (exclusive with collection, array and enumeration). |
| enumeration | java.util.Enumeration | - | x | The enumeration to use as iterator (exclusive with collection, array and iterator). |
| counter | String | - | x | The name of the counter variable. Default value: itCounter |
| max | int | - | x | Maximum of iterations. Default value: no limits |
| skip | int | - | x | Number of first item to skip. Default value: 0 |
Variables
| Name | Type | Declared | Scope | Description |
| @counter | int | x | NESTED | Iteration counter (from 1) |
| @name | @type | x | NESTED | Iterated object |
Example of use:
Iterate on all members and for each member display his/her number of
publication and his/her group.
<table>
<jalios:foreach collection="<%= channel.getDataSet(Member.class) %>"
name="itMember"
type="Member" >
<tr>
<td><%= itCounter %></td>
<td><%= itMember.getName() %></td>
<td><%= itMember.getPublicationSet().size() %></td>
<td><%= itMember.getGroup().getName() %></td>
</tr>
</jalios:foreach>
</table>
|
Description: Highlights piece of text in the body
Attributes
| Name | Type | Required | RT expr. value | Description |
| text | String | - | x | The text to be highlighted (if missing, check 'hlText' request attribute) |
| mode | String | - | x | The search mode: any or exact. Default value is 'any' (if missing, check 'hlMode' request attribute) |
| prefix | String | - | x | The prefix to preprend for highlight |
| suffix | String | - | x | The suffix to append for highlight |
Example of use:
<jalios:highlight text="lorem">Lorem ipsum...</jalios:highlight>
|
Description: Execute the body only if the predicate is true.
Attributes
| Name | Type | Required | RT expr. value | Description |
| predicate | boolean | x | x | The condition to be tested. |
| breakselect | boolean | - | x | See ConditionalTag |
| not | boolean | - | x | See ConditionalTag |
Example of use:
<jalios:if predicate="<%= 4>5 %>" > NO </jalios:if>
|
Description: Compares two comparable objects. Possible values for comparator are :
Attributes
| Name | Type | Required | RT expr. value | Description |
| obj1 | java.lang.Object | x | x | The first comparable to be tested. |
| obj2 | java.lang.Object | x | x | The second comparable to be tested. |
| comparator | String | - | x | The comparator type (eq,ne,gt,ge,lt,le) |
| breakselect | String | - | x | See ConditionalTag |
| not | String | - | x | See ConditionalTag |
Example of use:
<jalios:ifobjcmp obj1='<%= date1 %>' obj2='<%= date2 %>' comparator='eq'>OK</jalios:ifobjcmp>
|
Description: Compares strings. It extends CompareTag Tag. The following comparators can be used in addition to the parent tag comparators.
Attributes
| Name | Type | Required | RT expr. value | Description |
| source | String | x | x | See CompareTag |
| pattern | String | - | x | See CompareTag |
| comparator | String | x | x | See CompareTag |
| ignorecase | String | - | x | If me should match case |
| srcstart | String | - | x | Where to start matching on source string |
| patternstart | String | - | x | Where to start matching on pattern string |
| breakselect | String | - | x | See ConditionalTag |
| not | String | - | x | See ConditionalTag |
Example of use:
<jalios:ifstrcmp source='dabcxy'
pattern='eABC'
comparator='starts'
srcstart='1'
patternstart='1'
ignorecase='true'>
OK
</jalios:ifstrcmp>
|
Description: Replaces all the spaces in the body with non-breakable spaces (i.e. ).
Example of use:
<jalios:nbsp>Lorem ipsum</jalios:nbsp>
|
Description:
Creates and displays a thumbnail image of a given object (FileDocument, file, web page's URL).
Thumbnail files are created in the same directory of their original file. For URLs the thumbnail will
be created in the webapp directory "upload/thumbnails/".
Attributes
| Name | Type | Required | RT expr. value | Description |
| fileDoc | com.jalios.jcms.FileDocument | - | x | The FileDocument of which to create the thumbnail. |
| file | java.io.File | - | x | The File of which to create the thumbnail. |
| path | java.lang.String | - | x | The full path or "relative to the webapp" path of the file of which to create the thumbnail. |
| url | java.lang.String | - | x | The URL of the web page of which to create the thumbnail. |
| format | java.lang.String | - | x | The format to use for the thumbnail, available format are jpeg and gif, default is gif. |
| width | int | - | x | The maximum width of the thumbnail to create, value is also used in the thumbnail file name. |
| height | int | - | x | The maximum height of the thumbnail to create, value is also used in the thumbnail file name. |
| destination | java.lang.String | - | x | Relative path of the new thumbnail file to create (to the webapp root). Default behavior is to create the thumbnail using the scheme of method FileDocument.getThumbnailFile() (which creates a new file using a specified pattern, in the same directory of the original image). |
| alt | java.lang.String | - | x | The value of the alt attribute to use in the "img" html tag. |
| htmlAttributes | java.lang.String | - | x | The html attributes to use in the "img" html tag. |
| forceUpdate | boolean | - | x | Whether to thumbnail creation even if it already exists |
| useAjaxLoading | boolean | - | x | Whether to delay thumbnail creation through Ajax, default is false |
| ajaxLoadingImage | java.lang.String | - | x | Relative path of the image to use for the "img" src attribute, while Ajax process the thumbnail creation. |
Example of use:
<a href='http://www.jalios.com/'>
<jalios:thumbnail url='http://www.jalios.com/'
width='120' height='90' alt='Jalios WebSite'
htmlAttributes="border='0'">
<%-- Just in case no URL thumbshot is available, use our logo --%>
<img src="images/jalios/icons/jalios.gif" />
</jalios:thumbnail>
</a>
<jalios:thumbnail fileDoc='<%= (FileDocument) channel.getData("oj_6132") %>'
width='60' height='60'>
<%-- If the given fileDoc is not a supported file type for thumbnail creation --%>
<img src="images/file-thumb-not-available.gif" width='60' height='60' />
</jalios:thumbnail>
<jalios:thumbnail path='<%= "upload/myimage.jpg" %>' width='60' height='60'/>
<% File someFile = new File("C:\\webapp\\jcms\\images\my-big-image.jpg"); %>
<jalios:thumbnail file='<%= someFile %>' width='60' height='60'/>
|
Description: Displays a pager menu.
Attributes
| Name | Type | Required | RT expr. value | Description |
| name | java.lang.String | x | - | The name of this pager (will be used to create the handler variable) |
| declare | boolean | - | x |
Whether to declare the associated PagerHandler scripting variable, default is false. You will usually need to set this variable to true on the first call to the pager in your jsp. |
| action | java.lang.String | - | x | The action to be done, possible actions are:
|
| paramPrefix | java.lang.String | - | x | The prefix of every URL parameter (default is empty) usefull when using multiple pager on one page |
| size | int | - | x | The number items to be managed by the pager |
| pageSize | int | - | x |
The default number of items to be displayed by page, default is 10 (if this value was
not specified in pageSizes values, it is added to possible page sizes). Can only be used with "init" action, otherwise ignored. |
| sort | java.lang.String | - | x |
When used with "init action: The default sort order used, default is "date". When used with "showSort" action: the sort action to be used to generated the sort link. |
| reverse | boolean | - | x |
The default reverse order used, default is false. Can only be used with "init" action, otherwise ignored. |
| pageSizes | java.lang.String | - | x |
Coma separated value of page sizes to be used (displayed) by the pager. Can only be used with "init" action, otherwise ignored. |
| pagerAllLimit | int | - | x |
The maximum items number above which pager all link is not shown.
Negative value defaults to JCMS pager all limit property, use 0 to hide pager all link. Can only be used with "init" action, otherwise ignored. |
| sortTitle | java.lang.String | - | x |
The JCMS property to be used as title of the sort link (empty by default). Can only be used with "showSort" action, otherwise ignored. |
| parameterMap | java.util.Map | - | x | An optional Map of parameters (String name ==> String value) to add/modify/delete for the generated URLs. Can only be used with "init" action, otherwise ignored. |
Variables
| Name | Type | Declared | Scope | Description |
| @name | com.jalios.jcms.handler.PagerHandler | x | AT_BEGIN | Pager handler that can be used to retrieve iteration informations. Variable created only when attribute "declare" is set to true. |
Example of use:
Example 1:
<jalios:query name="resultSet" types="Content" />
<jalios:pager name="myPager1" declare='true' action="init"
size="<%= resultSet.size() %>"/>
<jalios:foreach name='number' type='Integer' collection='<%= resultSet %>'
max='<%= myPager1.getPageSize() %>'
skip='<%= myPager1.getStart() %>'>
<%= number %><br>
</jalios:foreach>
<jalios:pager name="myPager1" /><br>
Example 2:
<jalios:pager name='myPager2' declare='true' action='init' sort='cdate' paramPrefix='p2_'/>
<jalios:query name='resultSet' types='Article'
comparator='<%= Publication.getComparator(myPager2.getSort(), myPager2.isReverse()) %>'/>
<jalios:pager name='myPager2' action='compute' size='<%= resultSet.size() %>'/>
<table class='listBorder' cellspacing='1' cellpadding='3'>
<tr>
<td class='listHeader'>
<jalios:pager name='myPager2' action='showSort' sort='title' sortTitle='ui.com.lbl.title'/>
</td>
<td class='listHeader'>
<jalios:pager name='myPager2' action='showSort' sort='cdate' sortTitle='ui.com.lbl.cdate-long'/>
</td>
</tr>
<jalios:foreach name='itArticle' type='Article'
collection='<%= resultSet %>'
max='<%= myPager2.getPageSize() %>'
skip='<%= myPager2.getStart() %>'>
<tr class='<%= (itCounter.intValue() % 2 == 0) ? "listOddRow" : "listEvenRow" %>'>
<td><%= itArticle.getTitle() %></td>
<td><jalios:date date='<%= itArticle.getCdate() %>'/> <jalios:time date='<%= itArticle.getCdate() %>'/></td>
</tr>
</jalios:foreach>
</table>
<jalios:pager name='myPager2' />
|
Description: Parse an RSS source.
Attributes
| Name | Type | Required | RT expr. value | Description |
| id | String | x | x | The id of the RssChannel |
| name | String | x | x | The name of the variable containing the RssChannel |
| source | String | x | x | The URI of the RSS source |
| ufreq | long | - | x | Update frequency in minute, used if no ttl tag (Time To Live) is found in the RSS feed. Default value: 60 minutes. |
Variables
| Name | Type | Declared | Scope | Description |
| @name | com.jalios.util.RssChannel | x | AT_END | The RssChannel object |
Example of use:
TBD.
|
Description: Switches between ConditionalTag to execute the body that are true until a ConditionalTag breaks the switch.
Example of use:
<jalios:select>
<jalios:if predicate="<%= 4>5 %>" > NO </jalios:if>
<jalios:if predicate="<%= 5>5 %>" > NO </jalios:if>
<jalios:if predicate="<%= 6>5 %>" breakselect='false'>O</jalios:if>
<jalios:if predicate="<%= 7>5 %>">K</jalios:if>
<jalios:default> In Select DEFAULT </jalios:default>
</jalios:select>
|
Description: Sends a mail.
Attributes
| Name | Type | Required | RT expr. value | Description |
| to | String | x | x | A comma separated list of TO recipient email addresses. |
| cc | String | - | x | A comma separated list of CC recipient email addresses. |
| bcc | String | - | x | A comma separated list of BCC recipient email addresses. |
| from | String | x | x | Email of the sender |
| subject | String | x | x | Subject of the mail |
| content | String | - | x | Content of the mail (unused if there is a body). |
| host | String | - | x | Sendmail server hostname (Default value: property smtp.host) |
| port | String | - | x | Sendmail server port (Default value: property smtp.port) |
Example of use:
See <jalios:buffer> example.
|
Description: Prints a time. Formats the time with either the value of the "locale" attribute, the value of the context attribute "jtaglib.locale" or the default locale of the JVM (in this order).
Attributes
| Name | Type | Required | RT expr. value | Description |
| date | java.util.Date | - | x | The date to be printed (default value: the current date) |
| format | String | - | x |
The format used to print the time. The following formats are available:
|
| locale | java.util.Locale | - | x | The locale to use (default value: the default locale) |
| nowifnull | boolean | - | x | True if the current time must be printed if the date attribute is null; if false nothing will be printed (default value: true) |
Example of use:
<jalios:time date="<%= myDate %>" format="short"/>
Using a custom format (12:34 PM, PST)
<jalios:time date="<%= myDate %>" format="K:mm a, z"/>
|
Description: Truncates the content of the body to a given length or to a given number of sentences (if none of these attributes is provided, print the original body).
Attributes
| Name | Type | Required | RT expr. value | Description |
| length | int | - | x | The length of the truncature. |
| sentences | int | - | x | The number of sentences to display. |
| suffix | String | - | x | The string to append if the body has been truncatured |
Example of use:
<jalios:truncate length="10" suffix="..." >
A very very very very very very very long sentences.
</jalios:truncate>
<jalios:truncate sentences="2" suffix="..." >
A first setence. A second setence. A thrid sentence.
</jalios:truncate>
|
Description: Prints the category tree
Attributes
| Name | Type | Required | RT expr. value | Description |
| rootSet | java.util.Set | - | x | This attribute defines a set of categories to display has root category. |
| rootCat | com.jalios.jcms.Category | - | x | This attribute defines a category to display has root category. |
| rootDisplay | boolean | - | x | This attribute defines that given roots must be displayed or not.Default value is true. |
| widgetCounterName | java.lang.String | - | x | This attribute defines the generated variable name of the form element counter. |
| level | int | - | x | This attribute defines the level of category to generate before using ajax. Default value is 0. May be overrided by openLevel if inferior to open level |
| nodeFunction | java.lang.String | - | x | This attribute sets a the JavaScript function to call while clicking on a Node icon onclick. |
| nodeFunctionAjax | java.lang.String | - | x | This attribute sets a the JavaScript function to call while clicking on a Node icon onclick with children not already downloded by AJAX. Default value is: "Ajax.Tree.importChildren(event,this);" If an ajax suffix has been set then the method is change to "Ajax.Tree.importChildren(event,this,suffix);" |
| nodeAjaxSuffix | java.lang.String | - | x | This method set an ajax suffix for TreeCat used more than once in a page. WARNING: This method will update the AjaxNodeFunction if it has not already been set. So the method setNodeFunctionAjax() must be called before this method. |
| openedCatSet | java.util.Set | - | x | This attribute sets a Set of categories that must be openend while generating the category tree. |
| openParent | boolean | - | x | This attribute specifies if parent category of opened category must be opened. Default value is true. |
| openLevel | int | - | x | This attribute specifies levels to open while generating tree. It overrides level attributes. |
| removedCatSet | java.util.Set | - | x | This attribute sets a Set of categories that must be removed while generating the category tree. |
| highlightCatSet | java.util.Set | - | x | This attribute sets a Set of categories that must be highlighted while generating the category tree. |
| openHighlighted | boolean | - | x | This attribute specifies if parent category of highlighted categories must be opened. Default value is true. |
| highlightDescendant | boolean | - | x | This attribute specifies if children categories must be also highlighted. Default value is false. |
| widget | short | - | x | This attribute specifies the widget to display after each node icon values may be:
|
| widgetName | java.lang.String | - | x | This attribute specifies the name of the widget. his parameter is required if a widget is specified. |
| widgetSelectedSet | java.util.Set | - | x | This attribute sets a Set of categories that must have a widget selected while generating the category tree. |
| openWidgetSelected | boolean | - | x | This attribute specifies if parent category of selected categories must be opened. Default value is true. |
| widgetSelectDescendant | boolean | - | x | This attribute specifies if descendant category are also selected. Default value is false. NB: If check is done by JavaScript and some descendant have not been* already downloaded then they will not be checked. |
| widgetSelectParent | boolean | - | x | This attribute specifies if parent category are also selected. Default value is false. |
| widgetDisabledSet | java.util.Set | - | x | This attribute sets a Set of categories that must have a widget disabled. while generating the category tree. |
| widgetDisableDescendant | boolean | - | x | This attribute specifies if descendant category are also disabled. Default value is false. |
| widgetDisableParent | boolean | - | x | This attribute specifies if parent category are also disabled. Default value is false. |
| widgetDisableSelectable | boolean | - | x | This attribute specifies if category not selectable are also disabled. Default value is true. |
| widgetDisablePubCount | boolean | - | x | This attribute specifies to disable widget that didn't have categorized publication. |
| widgetFunction | java.lang.String | - | x | This attribute specifies the onclick function for each widget. Function will be called after internal treecat widget function. |
| widgetExclusive | boolean | - | x | This attribute specifies to uncheck other widget while checking a given widget. At a same time two widget cannot be checked. |
| rightsDisplay | boolean | - | x | This attribute specifies to display explicit rights member or groups rights for a given category. Defaut icon is a key. Default value is true. |
| helpDisplay | boolean | - | x | This attribute specifies to display description for a given category. Default value is true. |
| portalDisplay | boolean | - | x | This attribute specifies to display attached portal for a given category. It display, Portal, Redirect, and Multiple Portals. Default value is true. |
| workspaceDisplay | boolean | - | x | This attribute specifies to display attached workspace for a given category. It display Workspace or multiple workspace. |
| workspaceModelDisplay | boolean | - | x | This attribute specifies to display attached workspace model for a given category. |
| editDisplay | boolean | - | x | This attribute specifies to display edit category icon. |
| pubCountDisplay | boolean | - | x | This method specify to display publication count. Default value is false. |
| pubReadableDisplay | boolean | - | x | This attribute specifies to display readable publication. Default value is false. |
| filterMember | short | - | x | This attribute specifies filters to apply on displayed categories. It depends on logged Member rights. Values may be:
|
| filterWorkspace | boolean | - | x | This attribute specifies if Category are filtered by workspace categories. Default value is false. |
| pubCountClass | java.lang.Class | - | x | This attribute specifies the class of catezgorized publication to count. Default value is Content.class. This field must not be set to null. |
| pubCountPstatus | boolean | - | x | This attribute specifies if publication count must check pstatus for visible states. Default value is true. |
| pubCountSet | java.util.Set | - | x | This attribute specifies a Set of Publication to interSet with current publication's category for publication count. |
| editParam | java.lang.String | - | x | This attribute specifies additional parameters for the edit link. Parameter redirect and id are internally set. |
| nameStrong | boolean | - | x | This attribute specifies to Strong category name when category is descendant of the current workspace. Default value is false. |
| nameLink | java.lang.String | - | x | This attribute specifies link for name of categories. The link may be parsed by a Regular Expression matching something_CATID_something otherwise the category if will be append at the end of the link. |
| nameLinkPubCount | boolean | - | x | This attribute specifies to display link only on category having a publication count > 0. Default value is false. |
| nameLinkNavigate | boolean | - | x | This attribute specifies that generated links will be used for navigation or refinement. Regexp will be only apply on Navigate. Default value is true |
| nameLinkRegexp | boolean | - | x | This attribute specifies that name links will be parsed by a regular expresion replacing _CATID_ by the category id. Default value is false |
| redirect | java.lang.String | - | x | This attribute specifies redirect url for edit icon. See also jcmsContext. |
| loggedMember | com.jalios.jcms.Member | - | x | This attribute specifies the logged member. See also jcmsContext. |
| userLang | java.lang.String | - | x | This attribute specifies the user lang. See also jcmsContext. |
| workspace | com.jalios.jcms.workspace.Workspace | - | x | This attribute specifies the workspace. See also jcmsContext. |
| ctxCategories | [Lcom.jalios.jcms.Category; | - | x | This attribute specifies the contextual categories used for refinement. See also jcmsContext. |
| resourcePath | java.lang.String | - | x | This attribute specifies the resource path used for refinement. See also jcmsContext. |
| parameterMap | java.util.Map | - |