JCMS 5.0.4 Tag Library

Description:

The JCMS Tag Library provides a compehensive set of tag to easily access and present data stored in the current channel.

Tags Summary
  1. jalios:archive
  2. jalios:ascii
  3. jalios:buffer
  4. jalios:cache
  5. jalios:caddy
  6. jalios:categories
  7. jalios:chart
  8. jalios:chrono
  9. jalios:datachooser
  10. jalios:date
  11. jalios:datechooser
  12. jalios:default
  13. jalios:delete
  14. jalios:duration
  15. jalios:durationchooser
  16. jalios:edit
  17. jalios:fileicon
  18. jalios:filesize
  19. jalios:foreach
  20. jalios:highlight
  21. jalios:if
  22. jalios:ifobjcmp
  23. jalios:ifstrcmp
  24. jalios:image
  25. jalios:include
  26. jalios:lang
  27. jalios:nbsp
  28. jalios:pager
  29. jalios:pdf
  30. jalios:pubicon
  31. jalios:query
  32. jalios:rating
  33. jalios:rss
  34. jalios:screenshot
  35. jalios:select
  36. jalios:sendmail
  37. jalios:sortbar
  38. jalios:time
  39. jalios:topmember
  40. jalios:tree
  41. jalios:treecat
  42. jalios:treeportlet
  43. jalios:truncate
  44. jalios:webhelp
  45. jalios:widget
  46. jalios:wiki
  47. jalios:workspace

<jalios:cache> ... </jalios:cache>

Description: Manages a cache for the content of the body.

Attributes

NameTypeRequiredRT expr. valueDescription
idjava.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, this cache will be invalidated. 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, this cache will be invalidated. For publications, it only concerns instances in a visible state.
timeoutlong - x The timeout of the cache (in minutes). The next time the cache will be accessed, if the timeout is reached, the cache will be refresh.
sessionboolean - 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.
refreshboolean - x If true the cached content is refreshed. Default value: false.
disabledboolean - 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>

    


<jalios:caddy/>

Description: Prints the caddy icon.

Attributes

NameTypeRequiredRT expr. valueDescription
pubcom.jalios.jcms.Publication - x The publication to be put in the caddy (exclusive with 'pubs' attribute. If no pub nor pubs, try to fetch results from the query string.)
pubsjava.util.Collection - x A collection of publications to be put in the caddy (exclusive with 'pub' attribute. If no pub nor pubs, try to fetch results from the query string.)
icon String - x Specify the icon of the caddy
queryStringjava.lang.String - x A query String: all matching publications will be added to the caddy.
checkPstatusboolean - x Indicates whether the pstatus has to be checked. Default is true.

Example of use:

<jalios:caddy pub="<%= itPub %>">.

    


<jalios:tree> ... </jalios:tree>

Description: Visits all the sub-nodes of a given TreeNode

Attributes

NameTypeRequiredRT expr. valueDescription
rootcom.jalios.util.TreeNode x x Root TreeNode
visiterootboolean - x True if the root category must be visited. Default value: false.
visitejava.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

NameTypeDeclaredScopeDescription
@counterint x NESTED Iteration counter (from 1)
itNodecom.jalios.util.TreeNode x NESTED The iterated TreeNode with given name and given type represented by parameter name and type
itLevelint x NESTED Level of the iterated node
itLevelVariationint x NESTED Level variation of the iterated node respect to the previous node
itLevelNextVariationint x NESTED Level variation of the next node respect to the current node (at last iteration, next level is considered to be zero).
itPositionint x NESTED Position of the iterated node respect to its siblings
itHasNextboolean x NESTED True if there is at least one node to visit
itNextNodecom.jalios.util.TreeNode x NESTED The next node to visite (null if iterating on the last one)
itLastChildboolean x NESTED True if this node is the last of this level

Example of use:

<jalios:tree root="<%= previewTree %>" visiteroot="true">
  <%= itNode %>
</jalios:tree>

    


<jalios:categories> ... </jalios:categories>

Description: Visits all the sub-categories from a given category.

Attributes

NameTypeRequiredRT expr. valueDescription
root String - x Id of the root. Default value: root of categories.
canReadboolean - x If we should check category read rights (by default it is true)
visiterootboolean - x True if the root category must be visited. Default value: false.
visitejava.lang.String - x Visit order. Possible values :
  • order (default value)
  • children-first
  • children-last
counter String - x The name of the counter variable. Default value: itCounter

Variables

NameTypeDeclaredScopeDescription
@counterint x NESTED Iteration counter (from 1)
itCategorycom.jalios.jcms.Category x NESTED The iterated category
itLevelint x NESTED Level of the iterated category
itLevelVariationint x NESTED Level variation of the iterated category respect to the previous category
itLevelNextVariationint x NESTED Level variation of the next category respect to the current category (at last iteration, next level is considered to be zero).
itPositionint x NESTED Position of the iterated category respect to its siblings
itHasNextboolean x NESTED True if there is at least one category to visit
itNextCategorycom.jalios.jcms.Category x NESTED The next category to visite (null if iterating on the last one)
itLastChildboolean 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 %>">&nbsp;</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>

   


<jalios:edit/>

Description: Prints the edit icon.

Attributes

NameTypeRequiredRT expr. valueDescription
id String - x The id of the object to edit (exclusive with 'type' attribute)
pub String - x The publication that should be edited (exclusive with 'type' attribute)
type String - x The type of the object to create (exclusive with 'id' attribute), may have multiple type separated by ,
querystring String - x Extract cids and types from a queryString
layerId String - x The Id to used for the layer displayed by tag
cids String - x A blank-separated list of category id to check when adding a new publication
typeSetjava.util.Set - x A set of types
target String - x The frame target
redirect String - x An optional attribute to set the JSP to redirect on after the edition has been performed (Default value is managed by the EditFormHandler)
params String - x An optional attribute to set additional parameters to request (must respect the URL syntax for parameters, e.g. p1=v1&p2=v2%20with%20space, ...)
popupboolean - x If true open the simplified editor in a popup window (default value: false)
fields String - x A comma-separated list of fields to edit (default value: all the field).

Example of use:

<jalios:edit type="SmallNews" redirect="index.jsp" />
<jalios:edit id="<%= itPublication.getId() %>" />
<jalios:edit pub="<%= itPublication %>" />

    


<jalios:delete/>

Description: Prints the delete icon.

Attributes

NameTypeRequiredRT expr. valueDescription
id String - x The id of the data to delete
data String - x The data to deleted
redirect String - x An optional attribute to set the JSP to redirect 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 %>" />

    


<jalios:archive/>

Description: Prints the archive icon.

Attributes

NameTypeRequiredRT expr. valueDescription
id String - x The id of the publication to be archived
pub String - x The publication to be archived
redirect String - x An optional attribute to set the JSP to redirect 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 %>" />

    


<jalios:lang/>

Description: Prints the flag languages.

Attributes

NameTypeRequiredRT expr. valueDescription
lang String - x The language to display (default value is the user language).
title String - x The title (tooltips) to use on 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.

<jalios:webhelp/>

Description: Prints the webhelp icon.


<jalios:workspace/>

Description: Prints the workspace icon.

Attributes

NameTypeRequiredRT expr. valueDescription
allWorkspaceboolean - x Allow all workspace mode
allWorkspaceUrljava.lang.String - x The All Workspace URL

<jalios:pdf/>

Description: Prints the PDF link of the given file (if it exists).

Attributes

NameTypeRequiredRT expr. valueDescription
doccom.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 name of a frame where the PDF is to be opened.

Example of use:

<jalios:pdf filename="upload/test.pdf" />

    


<jalios:datachooser/>

Description: Prints a data chooser (publication or member) HTML form input.

Attributes

NameTypeRequiredRT expr. valueDescription
superClassjava.lang.Class x x The super class to choose an instance (default value: Publication)
multivalueboolean - x If the result have multiple value
multivalueIdSeparatorjava.lang.String - x The separator to be used when filling the id field. (Default value is ",")
listvalueboolean - x If the result should be proposed in a list
data String - x The data to fill the input with
dataListjava.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
sizeint - x The size of input which contains the title of the data
addCountint - x The initial editor count
incCountint - x The increment editor count
formElementCountint - 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' />

    


<jalios:durationchooser/>

Description: Prints a duration chooser (value / unit) HTML 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

NameTypeRequiredRT expr. valueDescription
formName String - x The name of the enclosing HTML form
widgetName String - x The name of the HTML input
formElementCountint - 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 (add a span with the given CSS class around the generated HTML code)
durationlong - x The initial duration
resolutionlong - 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 %>'/>

    


<jalios:pubicon/>

Description: Prints the icon of a given publication. The map associating a publication type to a flag image must be set in the properties. Each entry must follow the following syntax:

tag.pubicon.ShortClassName: output
ShortClassName: is the short class name of the publication type (eg. WebPage, Article, ...)).
output: is the string which will will print (eg. WebPage)

Attributes

NameTypeRequiredRT expr. valueDescription
pubcom.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 %>"/>

    


<jalios:query/>

Description: Performs a query over a dataset with a set of criteria and sort results with a comparator.

Attributes

NameTypeRequiredRT expr. valueDescription
name String x x The name of the variable containing the result set
datasetjava.util.Set - x The data set on which perform the selection. Default value: all publications.
selectorcom.jalios.jcms.DataSelector - x A DataSelector. Default value: null (i.e. all data are selected)
comparatorjava.util.Comparator - x A Comparator. Default value: null (i.e. sort in the reverse order of the creation date (cdate))
text String - x A text to match (according the mode value).
mode String - x The full-text search mode. Possible values are : all, any, exact, word. Default value is all.
catNameboolean - x If true expands the full-text search to the category names (i.e. add in the result set, all the publications using categories which names match the given text). Default value is false.
exactCatboolean - x If catMode is set to "exact", do not expand the category search to the sub-categories. Default value is false.
searchInPubboolean - x If true search in searchable text of publication. Default value is true.
searchInFilesboolean - x If true expands the full-text search to attached files (i.e. add in the result set, all the publications targeting files 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).
exacttypeboolean - x If true, do not expand type search 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.
replaceFileDocboolean - x Indicates whether the FileDocuments must be replaced by their referrers if they exist. Default is false.
datesince String - x Search publications published since given days. This attribute replaces the previous attribute 'daterange'. Exclusive with beginDate and endDate.
begindatejava.util.Date - x Value of the begin date. Exclusive with beginday, beginmonth, beginyear.
enddatejava.util.Date - x Value of the end date. Exclusive with endday, endmonth, endyear.
begindayint - x Value for the day of the begin date. Exclusive with begindate.
beginmonthint - x Value for the month of the begin date. Exclusive with begindate.
beginyearint - x Value for the year of the begin date. Exclusive with begindate.
enddayint - x Value for the day of the end date. Exclusive with enddate.
endmonthint - x Value for the month of the end date. Exclusive with enddate.
endyearint - 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

NameTypeDeclaredScopeDescription
@namejava.util.SortedSet x AT_ENDThe 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>

    


<jalios:rating/>

Description: Prints the rating of a given publication.

Attributes

NameTypeRequiredRT expr. valueDescription
pubcom.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, ...)
ratingint - x The rating value (this attribute is exclusive with pub attribute)

Example of use:

<jalios:rating pub="<%= itPublication %>"/>

    


<jalios:image/>

Description: Generates an html image tag (this tag is used as super tag for some icon tags)

Attributes

NameTypeRequiredRT expr. valueDescription
alignjava.lang.String - x Image Alignement left, right, center
altjava.lang.String - x Description of the image on mouse over
namejava.lang.String - x name parameter of the image
idjava.lang.String - x id parameter of the image
clazzjava.lang.String - x class parameter of the image
borderint - x Image Border
heightjava.lang.String - x Image height (could be in % or in px)
widthjava.lang.String - x Image Width (could be in % or in px)
hspaceint - x Horizontale Margin of the image
vspaceint - x Verticale Margin of the image
srcjava.lang.String x x Source of the Image
usemapjava.lang.String - x Use a client side map for the image
linkjava.lang.String - x Create a A HREF Tag for the image using the link
targetjava.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"/>

    


<jalios:screenshot/>

Description: Inserts a screenshot processed by the screenshooter using jcms properties.

Attributes

NameTypeRequiredRT expr. valueDescription
alignjava.lang.String - x Image Alignement left, right, center
altjava.lang.String - x Description of the image on mouse over
borderint - x Image Border
hspaceint - x Horizontale Margin of the image
vspaceint - x Verticale Margin of the image
namejava.lang.String - x name parameter of the image
idjava.lang.String - x id parameter of the image
clazzjava.lang.String - x class parameter of the image
usemapjava.lang.String - x Use a client side map for the image
linkjava.lang.String - x Create a A HREF Tag for the image using the link
targetjava.lang.String - x The target parameter for the A HREF tag (_blank,_self,_parent,_top)
widthint - x Image width
heightint - x Image height
nocacheboolean - x Do not use cached image
waitUrl String - x The url of the image to display when waiting grab to be done
url String - x The website url to grab

Example of use:

      <jalios:screenshot width='200' url='http://www.jalios.com/' />

    


<jalios:sortbar/>

Description: Displays a sort bar.

Attributes

NameTypeRequiredRT expr. valueDescription
sort String - x Parameter name of the current sort
datelabel String - x Label of the date sort
dateParam String - x Sort param of the date sort
ratinglabel String - x Label of the rating sort
titlelabel String - x Label of the title sort
authorlabel String - x Label of the author sort
categorylabel String - x Label of the category sort
typelabel String - x Label of the type sort
reviewlabel String - x Label of the review sort
separator String - x Label separator

<jalios:topmember> ... </jalios:topmember>

Description: Lists members who have published the most

Attributes

NameTypeRequiredRT expr. valueDescription
maxint x x number of member to display. Default value: 10.
ufreqlong - x update frequency in minute ; used to compute trends. Default value: 60 minutes.
counter String - x The name of the counter variable. Default value: itCounter

Variables

NameTypeDeclaredScopeDescription
@counterint x NESTED Iteration counter (from 1)
itMembercom.jalios.jcms.Member x NESTED The iterated member
itMemberCountint x NESTED The count of publication of this member
itMemberTrendsint 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 { %>
      &nbsp;
      <% } %>
    </td>
  </tr>
</jalios:topMember>
</table>

    


<jalios:wiki> ... </jalios:wiki>

Description: Formats the body according the wiki text formatting rules.

Attributes

NameTypeRequiredRT expr. valueDescription
css String - x The name of the css class to use. (Default value is 'wiki' css class).
spanboolean - x If false, wraps a span tag around the html otherwise wraps a div tag. Default is false.

Example of use:
TBD.
    


<jalios:chart> ... </jalios:chart>

Description: Prints an horizontal bar chart.

Attributes

NameTypeRequiredRT expr. valueDescription
printCSSboolean - x Should print CSS value for chart
printChartboolean - x Should print the Chart
mixedChartboolean - x When multiple chart, indicate if chart should be mixed
isPercentboolean - x Indicate if values are percent or absolute values
colorint - x The count of colors the CSS should generate
colorFirstint - x The first color to use in color table
colorRotateint - x Rotate color of a single chart among multiple colors
colors[Ljava.lang.String; - x The color list
localejava.util.Locale - x I18N Units
widthint - x The width in pixel of the chart (default value is 100%)
fixHLengthWidthint - x Fix the Horizontal width of the Legend to use a common presentation between charts
heightint - x The height in pixel of the vchart (default value is 200px)
maxint - x The number of elements to display
maxValueint - x The maximum value to use in the chart (as scale)
titlejava.lang.String - x The Title of the Chart
unitjava.lang.String - x The Unit to display on the opposite side of displayed values
sortjava.lang.String - x Indicate how to Sort the Chart: none, greater, lower
displayjava.lang.String - x The representation display of the chart. Choose between "vchart" (Vertical Chart) and "hchart" (Horizontal Chart)
dataMapcom.jalios.util.ObjectIntTreeMap - x An ObjectIntTreeMap representing Chart with key the legend (String) and values int[0] or a sub map with key/int[]
beautifiercom.jalios.jtaglib.ChartTagBeautifier - x Use the specified ChartTagBeautifier to convert all displayed String and other field, (usefull for I18N Label, Icons, Styles, Classes ...)
legendComparatorjava.util.Comparator - x A way to sort legend elemnts. sort param must be null

Example of use:
    
This tag display using a given common css:
<%
 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>
    
    


<jalios:ascii> ... </jalios:ascii>

Description: Formats the body in an ASCII block.

Attributes

NameTypeRequiredRT expr. valueDescription
colsint x x The max length of a line
rowsint - x Number of rows to produce (ignore all the next rows)
suffix String - x The string to append if the body has been truncated

Example of use:
TBD.
    


<jalios:buffer> ... </jalios:buffer>

Description: Outputs the evaluation of the body in a given String variable

Attributes

NameTypeRequiredRT expr. valueDescription
name String x x The name of the output String variable
trimboolean - x True if the body must be trimmed (default value: true)

Variables

NameTypeDeclaredScopeDescription
@namejava.lang.String x AT_ENDContains 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 channel.


<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>

    


<jalios:chrono/>

Description: Manages chronos organized by name. The following actions are supported:

A Chrono object is also aivailable until end of page with the name given in parameter.

Attributes

NameTypeRequiredRT expr. valueDescription
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() %>"/>

    


<jalios:date/>

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

NameTypeRequiredRT expr. valueDescription
datejava.util.Date - x The date to print (default value: the current date)
format String - x The format to print the date. The following formats are available:
  • 'short' (e.g.: 12.13.52)
  • 'medium' (e.g.: Jan 12, 1952)
  • 'long' (e.g. January 12, 1952). Default format.
  • 'full' (e.g.: Tuesday, April 12, 1952 AD).
  • A custom format, conformed to the Java SimpleDateFormat (see Javadoc of java.text.SimpleDateFormat class).
localejava.util.Locale - x The locale to use (default value: the default locale)
nowifnullboolean - x True if the current date must be 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"/>

    


<jalios:default> ... </jalios:default>

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>

    


<jalios:duration/>

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

NameTypeRequiredRT expr. valueDescription
beginjava.util.Date - x The begining date (this attribute is exclusive with time attribute).
endjava.util.Date - x The ending date (this attribute is exclusive with time attribute).
timelong - x The elapsed time in milliseconds (this attribute is exclusive with begin and end attributes).
localejava.util.Locale - x The locale to use (default value: the default locale)

Example of use:

<jalios:duration begin="<%= beginDate %>" end="<%= endDate %>" />

    


<jalios:fileicon/>

Description: Prints the icon of the given FileDocument.

Attributes

NameTypeRequiredRT expr. valueDescription
doccom.jalios.jcms.FileDocument x x The document to print the icon.

Example of use:

<jalios:fileicon doc="<%= myDoc%>"/>

    


<jalios:filesize/>

Description: Prints the formatted size of a file or a FileDocument (e.g. 3.45 MB).

Attributes

NameTypeRequiredRT expr. valueDescription
sizelong - x The size to format (exclusive with doc attribute).
doccom.jalios.jcms.FileDocument - x The document to format the size (exclusive with doc attribute).
localejava.util.Locale - x The locale to use (default value: the default locale)

Example of use:

<jalios:filesize size="123455" />

    


<jalios:foreach> ... </jalios:foreach>

Description: Iterates over a collection of objects.

Attributes

NameTypeRequiredRT expr. valueDescription
name String x x The name of the iteration variable
type String x x The type of the iteration variable
collectionjava.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).
iteratorjava.util.Iterator - x The iterator to iterate over (exclusive with collection, array and enumeration).
enumerationjava.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
maxint - x Maximum of iterations. Default value: no limits
skipint - x Number of first item to skip. Default value: 0

Variables

NameTypeDeclaredScopeDescription
@counterint 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>

    


<jalios:highlight> ... </jalios:highlight>

Description: Highlights piece of text in the body

Attributes

NameTypeRequiredRT expr. valueDescription
text String - x The text to highlight (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:
TBD.
    


<jalios:if> ... </jalios:if>

Description: A simple condition tag that execute only if condition is true. It extends Conditional Tag.

Attributes

NameTypeRequiredRT expr. valueDescription
predicateboolean x x The condition to test
breakselectboolean - x See ConditionalTag
notboolean - x See ConditionalTag

Example of use:

<jalios:if predicate="<%= 4>5 %>" > NO </jalios:if>

    


<jalios:ifobjcmp> ... </jalios:ifobjcmp>

Description: Compares two Comparable Objects. It extends Conditional Tag. The comparator could be: - eq for EQual - ne for Not Equal - gt for Greater Than - ge for Greater or Equal - lt for Less Than - le for Less or Equal

Attributes

NameTypeRequiredRT expr. valueDescription
obj1java.lang.Object x x The Comparable to test
obj2java.lang.Object x x The other Comparable to test with
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>

    


<jalios:ifstrcmp> ... </jalios:ifstrcmp>

Description: Compares Strings. It extends CompareTag Tag. The following comparators can be used in addition to the parent tag comparators. - notempty for String with only spaces ... - starts for String which starts with the pattern - ends for String which ends with the pattern - contains for String which contains with the pattern - match for String which match with the Perl5 pattern regexp

Attributes

NameTypeRequiredRT expr. valueDescription
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>

    


<jalios:nbsp> ... </jalios:nbsp>

Description: Replaces spaces in the body by non-breakable spaces.

Example of use:
TBD.
    


<jalios:pager/>

Description: Displays a pager menu.

Attributes

NameTypeRequiredRT expr. valueDescription
size String x x The size of the data set
maxint x x Slice size.
skipint x x Number of first item that have been skipped.
prevjava.lang.String - x The HTML content which will be displayed to go to the previous page.
nextjava.lang.String - x The HTML content which will be displayed to go to the next page.
localejava.util.Locale - x The locale to use (default value: the default locale)
paramPrefixjava.lang.String - x A value to preprend to anchor parameters. E.g. if parmPrefix is "abc.", anchor's params will be named 'abc.skip' and 'abc.pagerAll' (default value: an empty string)

Example of use:

<jsp:useBean id="pagerHandler" scope="page" class="com.jalios.jcms.handler.PagerHandler">
  <jsp:setProperty name="pagerHandler" property="skip" />
  <jsp:setProperty name="pagerHandler" property="pagerAll" />
  <jsp:setProperty name="pagerHandler" property="sort" />
  <jsp:setProperty name="pagerHandler" property="reverse" /> 
</jsp:useBean>

<% Comparator comparator = Publication.getComparator(pagerHandler.getSort(),pagerHandler.isReverse()); %>
<jalios:query name="resultSet" request="<%= request %>" comparator="<%= comparator %>" />
<jalios:foreach name='itPub'
                type='Publication'
                collection='<%= resultSet %>'
                max="<%= pagerHandler.getMax(10, resultSet.size()) %>"
                skip="<%= pagerHandler.getSkip() %>">
  <%-- Display the results... --%>
</jalios:foreach>

<jalios:pager
  size='<%= resultSet.size() %>'
  skip="<%= pagerHandler.getSkip() %>"
  max="<%= pagerHandler.getMax(10, resultSet.size()) %>"
  prev="<img src='images/jalios/icons/prev.gif' border='0'>"
  next="<img src='images/jalios/icons/next.gif' border='0'>"
/>

    


<jalios:rss/>

Description: Parse an RSS source.

Attributes

NameTypeRequiredRT expr. valueDescription
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
ufreqlong - x Update frequency in minute, used if no ttl tag (Time To Live) is found in the RSS feed. Default value: 60 minutes.

Variables

NameTypeDeclaredScopeDescription
@namecom.jalios.util.RssChannel x AT_ENDThe RssChannel object

Example of use:
TBD.
    


<jalios:select> ... </jalios:select>

Description: Switches between ConditionalTag to execute content of tagthat are true until a ConditionalTag break 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>

    


<jalios:sendmail> ... </jalios:sendmail>

Description: Sends a mail.

Attributes

NameTypeRequiredRT expr. valueDescription
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 daemon hostname (Default value: property smtp.host)
port String - x Sendmail daemon port (Default value: property smtp.port)

Example of use:

See <jalios:buffer> example.

    


<jalios:time/>

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

NameTypeRequiredRT expr. valueDescription
datejava.util.Date - x The date to print (default value: the current date)
format String - x The format to print the time. The following formats are available:
  • 'short' (e.g.: 3:30pm)
  • 'long' (e.g.: 3:30:32pm). Default format.
  • 'full' (e.g.: 3:30:42pm PST).
  • A custom format conformed to the Java SimpleDateFormat (see Javadoc of java.text.SimpleDateFormat class).
localejava.util.Locale - x The locale to use (default value: the default locale)
nowifnullboolean - 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"/>

    


<jalios:truncate> ... </jalios:truncate>

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

NameTypeRequiredRT expr. valueDescription
lengthint - x The length of the truncature
sentencesint - x The number of sentences to keep.
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>

    


<jalios:treecat/>

Description: Prints the category tree

Attributes

NameTypeRequiredRT expr. valueDescription
rootCatSetjava.util.Set - x The Set of Root Category
removedCatSetjava.util.Set - x The Set of Removed Root Category
rootCatcom.jalios.jcms.Category - x The Root Category instead of using a Set
link String - x The link on the category name
LinkCheckCount String - x Show Link if no publication available
nodePrefix String - x The prefix of tree if there is multiple tree
visiteRootboolean - x If we should visite roots
navigateboolean - x Indicate to navigate or refine the current page
canReadboolean - x If we should check category read rights (by default it is true)
boldWkspcCatboolean - x Bold Categories children of workspace
widgetIgnoreSelectableboolean - x If true always show widget else depends on isSelectable()
widgetName String - x The name of the form element
widgetType String - x The type of the widget to show (none, checkbox, radio, radiocheck)
widgetCheckCountboolean - x Disable widget if no publication aivailable under it
expandLevelint - x Expand a number of level of branch (-1 to expand all or -2 to expand until one selectable category)
widgetSelectedCatSetjava.util.Set - x The set of checked widget
widgetSelectedDescendantboolean - x Select also children of Highlight cat set
highlightCatSetjava.util.Set - x The set of highlighted branch
highlightDescendantboolean - x Highligh also children of Highlight cat set
helpDisplayboolean - x If we should show helpIcon
rightsDisplayboolean - x It true, display the rightsIcon
portalDisplayboolean - x It true, display the portalIcon
workspaceDisplayboolean - x It true, display the workspaceIcon
portalLink String - x The link on the portal icon
pubCountDisplayboolean - x Display the publication count
pubCountPStatusboolean - x Check the pstatus while displaying the publication count
filterMemberCategoryint - x Filter categories to only see category branch the member can work on. (0 no check, 1 check read rights, 2 check edit right)
widgetCounterjava.lang.String - x The name of the widget counter
pubCountClassjava.lang.Class - x The class to use to count Publication (default is Content.class)
pubCountInterSetjava.util.Set - x The publication sub-set to compute the publication count (default is all the publications)
editCategoryboolean - x Show Edit Icon
editParamjava.lang.String - x Add parameters to Edit Icon link
expandHighlightedboolean - x Will expand highlighted branch
widgetExpandSelectedboolean - x Will expand selected branch
rowChildrenboolean - x Show leaf in a row
edit_icon String - x Override Default Icon
folder_close String - x Override Default Icon
folder_open String - x Override Default Icon
folder_openable String - x Override Default Icon
help_icon String - x Override Default Icon

<jalios:treeportlet/>

Description: Prints the portlet tree

Attributes

NameTypeRequiredRT expr. valueDescription
rootPortletCollectionjava.util.Collection - x The Set of Root Portlet
rootPortletcom.jalios.jcms.portlet.PortalElement - x The Root Portlet instead of using a Set
link String - x The link on the category name
nodePrefix String - x The prefix of tree if there is multiple tree
expandLevelint - x Expand a number of level of branch (-1 to expand all or -2 to expand until one selectable category)
highlightPeSetjava.util.Set - x The set of highlighted branch
expandHighlightedboolean - x Will expand highlighted branch
widgetExpandSelectedboolean - x Will expand selected branch
widgetSelectedPeSetjava.util.Set - x The set of checked widget
widgetName String - x The name of the form element
widgetType String - x The type of the widget to show (none, checkbox, radio)
editPortalElementboolean - x Show Edit Icon

<jalios:datechooser/>

Description: Prints a date chooser HTML form input. It produces 2 form inputs : the date value and the date chooser.

Attributes

NameTypeRequiredRT expr. valueDescription
formName String - x The name of the enclosing HTML form
widgetName String - x The name of the HTML input
formElementCountint - x The position of the inputs in the form (only required when severals DateChooserTag have the same widgetName)
css String - x The CSS to use (add a span with the given CSS class around the generated HTML code)
datejava.util.Date - x The initial date (now if unspecified)
showWeekNumbersboolean - x Will display week numbers in calendar if true (does not apply to calendar displayed in a popup window)
showTimeboolean - x Allow time selection
nowifnullboolean - x True if the current date must be used if the date attribute is null; if false no date is printed in input (default value: true)
inPopupboolean - x Display calendar in new pop-up window, (default value: true).

<jalios:include/>

Description: Includes a portlet, a publication (full display) or an edit form.

Attributes

NameTypeRequiredRT expr. valueDescription
jspjava.lang.String - x The jsp to include
idjava.lang.String - x The publication id to include (exclusive with "pub" attribute).
pubcom.jalios.jcms.Publication - x The publication to include (exclusive with the "id" attribute).
clazzjava.lang.String - x The clazz name of the form to include
incResultDisplayboolean - x Should include the ResultDisplay template or FullDisplay (default) ?

Example of use:


	For Static Include nothing change:
  &lt;%  displayPortlet = (PortalElement) box.getChild(); %&gt;
	&lt;%@ include file='/jcore/portal/doIncludePortlet.jsp' %&gt;

	For Dynamic Include of Publication:
	&lt;jalios:include id='&lt;%= publication.getId() %&gt;' &gt;


    


<jalios:widget/>

Description: Generates an input widget.

Attributes

<
NameTypeRequiredRT expr. valueDescription
label String - x Label of the Field
description String - x Description of the Field
widgetName String x x Name of the Widget
formName String - x Name of the Form
valuejava.lang.Object - x Values of the Field: a String, Collection, Date, [] or not...
multilingualboolean - x Is multilingual field
hiddenboolean - x Print hidden field field
printSeparatorboolean - x Print the Separator
printLabelboolean - x Print the Label
printWidgetboolean - x Print the Widget
requiredboolean - x Is required field
widgetAddCountint - x Count of Widgets to Add
defaultValuejava.lang.String - x Default value when clearing field.
descriptionTypeint - x Kind of description
editorint - x Kind of editor
colsint - x Size of the Area. Used for TextArea.
unitBeforejava.lang.String - x Unit representation before the field. Used for TextField Widget.
unitAfterjava.lang.String - x Unit representation after the field. Used for TextField Widget.
pathjava.lang.String - x Path of FIleChooser. Used for TextField Widget.
tabGroupjava.lang.String - x Identifier for multivalued area tab. Used for TextArea Widget.
rowsint - x Rows of the Field. Used for TextArea Widget.
maxlengthint - x MaxLength of the Field. Used for TextField Widget.
enumLabelsjava.lang.Object - x Enumerate Labels. Used for Enumerate Widget.
enumValuesjava.lang.Object - x Enumerate Labels. Used for Enumerate Widget.
sizeint - x Size of List or TextFields. Used for Enumerate Widget and TextField Widget an d DateChooser Widget.
chooserQSjava.lang.String - x Chooser QueryString. Used for Chooser Widget.
linkTypejava.lang.Class - x Super Type of Doc or PubChooser. Used for Chooser Widget.
wysiwygParamsjava.lang.String - x WYSIWYG parameters. Used for Riche Text Area.