...
The iterator tag iterates over a collection of elements in a collection object in a named attribute. The individual elements are placed in a pageContext attribute, and made available in the JSP Java context for use in scriptlets.
Attribute Name | Required? | ExprVal? | Description |
---|---|---|---|
ame | Y | N | The name of the attribute that the collection of elements will come from. Can be in the page, request, session or application contexts. |
property | N | N | The name of the attribute and Java variable that the individual elements will be put into as the iterator iterates. |
type | N | N | The type of the elements within the collections. This must be specified so that the Java context variable can be created. Defaults to org.ofbiz.entity.GenericValue, which is one of the more common objects to iterate over in OFBiz framework based applications. |
expandMap | N | N | If expandMap is true then the iterator elements must implement the Map interface the the keys in the Map entries must be Strings. Each map entry will be put into the pageContext if this is set using the Map key value as the attribute name. Must be true or false. Defaults to false. |
offset | N | Y | If specified the iteration will start at the given offset index instead of at the beginning of the collection. |
limit | N | Y | If specified only the specified number of iterations will be done. In other words this limits the number of elements pulled from the iterator. |
Sub-Element Name | How Many | Description |
---|---|---|
iterateNext | 0 to many | Described below. |
iteratorHasNext | 0 to many | Described below. |
Grab the next element in the collection of the parent iterator tag.
Attribute Name | Required? | ExprVal? | Description |
---|---|---|---|
name | N | N | The name of the attribute to put the element in. Defaults to the name specified in the property attribute of the parent iterator tag. |
type | N | N | The type of the elements within the collections. This must be specified so that the Java context variable can be created. Defaults to org.ofbiz.entity.GenericValue, which is one of the more common objects to iterate over in OFBiz framework based applications. |
expandMap | N | N | If expandMap is true then the iterator elements must implement the Map interface the the keys in the Map entries must be Strings. Each map entry will be put into the pageContext if this is set using the Map key value as the attribute name. Must be true or false. Defaults to false. |
Only process body if parent iterator tag has another entry.
This tag has no attributes.
Data Presentation Tags
Formats dates, numbers and currencies from the value in the body of the tag. It has one attribute that specifies how the text should be formatted.
Attribute Name | Required? | ExprVal? | Description |
---|---|---|---|
type | N | N | Specified how the type of format to apply to the body value. Must be "currency", "number", or "date". If not type is specified the original value is printed. |
Prints an attribute from the pageContext. If null prints the default value or nothing if no default is specified.
Attribute Name | Required? | ExprVal? | Description |
---|---|---|---|
attribute | Y | Y | The name of the attribute to print. |
default | N | Y | The default value to print if the specified attribute is not found. |
Displays a properly formatted string from field in the specified attribute.
Attribute Name | Required? | ExprVal? | Description |
---|---|---|---|
attribute | Y | N | The name of the attribute that contains the field to print. |
type | N | N | Optionally specifies the type of the field to print. Can be "currency" or any of the Java field types. If not specified the tag will automatically determine the Java type. |
default | N | Y | The default value to print if the specified field is not found. |
prefix | N | N | If the resulting message is not empty this string will be printed before the field value. |
suffix | N | N | If the resulting message is not empty this string will be printed after the field value. |
Displays a properly formatted localized string from a field in the entity in the specified attribute. The prefix and suffix attribute contents will print before/after if the field is not null or empty.