Send your remarks, comments or wishes to doc team
Subject:
Message:
Your name:
Your email:

JBoss.org Community Documentation

- Prev

## Chapter 11. Template tags overview

## 11.1. <ajax:update>

The <ajax:update> tag allows to update a collection of nodes. By default, Ajax response updates only one node with its children that is marked by id = clientId. If you need to update a number of nodes you should add a comma separated list of ids to <ajax:update> tag.

## 11.2. <c:if />

The <c:if /> tag is a simple conditional tag, which evalutes its body if the supplied condition is true.

Table 11.1. The <c:if /> attributes

Attribute Name | Description | Required
--- | --- | ---
test | Defines the test condition that determines whether or not the body content should be processed. | True

## 11.3. <c:object />

The <c:object /> tag declares a variable that is used in Java code with a value returned by an evaluated expression. A type of the result must match to the type defined by the "type" attribute.

Table 11.2. The <c:object /> attributes

Attribute Name | Description | Required
--- | --- | ---
var | Defines a name of the variable | True
value | Defines an expression to be evaluated | True
type | Defines an object type | True

## 11.4. <c:set />

The <c:set /> tag declares a request scope variable with a value returned by an evaluated expression.

Table 11.3. The <c:set /> attributes

Attribute Name | Description | Required
--- | --- | ---
var | Defines a name of the variable which holds the value | True
value | Defines an expression to be evaluated | True

## 11.5. <f:attribute />

The <f:attribute /> tag assigns a value to a component attribute.

Table 11.4. The <f:attribute /> attributes

Attribute Name | Description | Required
--- | --- | ---
name | Defines the name of a component attribute | True
value | Defines a value of the attribute | True

## 11.6. <f:clientid />

The <f:clientid /> tag declares a ﻿variable with a ClientId of the component as the value.

Table 11.5. The <f:clientid /> attributes

Attribute Name | Description | Required
--- | --- | ---
var | Defines a variable name | True

## 11.7. <c:forEach />

The <c:forEach /> iterates over a collection, iterator or an array of objects. It uses the same syntax as the standard JSTL <c:forEach /> tag.

Table 11.6. The <c:forEach /> attributes

Attribute Name | Description | Required
--- | --- | ---
begin | Defines the starting index | False
end | Defines the ending index | False
items | Defines the expression used to iterate over. This expression could resolve to an Iterator, Collection, Map, Array, Enumeration or comma separated String. | False
step | Defines the index increment step | False
var | Defines the variable name to export for the item being iterated over | True

## 11.8. <f:call />

The <f:call /> tag calls a method. For example it calls an additional method from the base class.

Table 11.7. The <f:call /> attributes

Attribute Name | Description | Required
--- | --- | ---
name | Defines a name of a method | True
class | Defines a class name | True

## 11.9. <f:parameter />

The <f:parameter /> tag specifies a parameter value for a method invoking. It is used within <f:call /> tag.

Table 11.8. The <f:parameter /> attributes

Attribute Name | Description | Required
--- | --- | ---
name | Defines a parameter name | True
value | Defines a parameter value | True

## 11.10. <f:insert />

The <f:insert /> tag calls some subTemplate.

Table 11.9. The <f:insert /> attributes

Attribute Name | Description | Required
--- | --- | ---
name | Defines a template name | True

## 11.11. <f:resource />

The <f:resource /> tag is responsible for receiving a resource object such as image.

Table 11.10. The <f:resource /> attributes

Attribute Name | Description | Required
--- | --- | ---
name | Defines a resource name which contains a path to the resource | True
var | Defines a resource variable that is used in a template | True

## 11.12. <f:root />

The <f:root /> tag defines a root element for the renderer template.

Table 11.11. The <f:root /> attributes

Attribute Name | Description | Required
--- | --- | ---
class | Defines a name for the generated class | True
baseclass | Defines a name for a base class for the renderer | True
component | Defines a component name | True

## 11.13. <h:scripts>

The <h:scripts> tag defines a static resource or class for JavaScript that is added to a page at rendering time.

## 11.14. <h:styles>

The <h:styles> tag defines a CSS or XCSS resource that is added to a page at rendering time.

## 11.15. <jsp:declaration />

The <jsp:declaration /> tag declares a Java code that is inserted in a renderer class.

## 11.16. <jsp:directive.page />

The <jsp:directive.page /> tag allows you to import classes or packages in a renderer class.

Table 11.12. The <jsp:directive.page /> attributes

Attribute Name | Description | Required
--- | --- | ---
extends | Defines a base class for the imported classes | False
import | Defines classes or packages that are imported in a renderer class | True

## 11.17. <jsp:scriptlet>

The <jsp:scriptlet> tag inserts its content into the main rendering method.

## 11.18. <u:insertFacet />

The <u:insertFacet /> tag inserts specified facet.

Table 11.13. The <u:insertFacet /> attributes

Attribute Name | Description | Required
--- | --- | ---
name | Defines a name of a facet | True

## 11.19. <vcp:body />

The <vcp:body /> tag allows to split a template content into parts that are passed to encode() methods and defines when children elements rendering should be invoked:

- the template content before the <vcp:body /> tag is inputted into `encodeBegin()` method

- the template content after the <vcp:body /> tag is inputted into `encodeEnd()` method

- on the <vcp:body /> tag the `encodeChildren()` method is invoked

## 11.20. <vcp:mock />

The <vcp:mock /> tag is used to mark a non-processing area.

- PrevChapter 10. Naming conventions
- Top of page
- Front page