Portlet Factory, Version 6.1.2


 

Repeated Region builder inputs

This topic describes the inputs for the Repeated Region builder.

 

General Inputs

Table 1. General Inputs
Input Name Description
Name Name for this builder call. The WebSphere Portlet Factory Designer displays this name in the builder call list.
Page Location Page or pages on which this builder call acts.
Source Data Specify the XML structure over which the repeated region loops. You can use the reference chooser to select a variable or method that returns the XML structure.

You can also specify a method or Java expression that returns an object that implements java.util.Collection or an Iterator for a Java collection.

Loop Variable Specify the variable to be used to store each element as the block is repeated.

Use the select box to choose the name of the variable that stores the current XML structure. You can also enter a name for a new variable, which the builder call adds to the model when you click OK.

You can refer to the Loop variable in other builder calls with this notation:

${Variables/LoopVariableName}

 

Counter Variable

Table 2. Counter Variable inputs
Input Name Description
Counter Variable Specify the variable to be used to store the current number of repeated items.

Use the select box to choose the name of the variable. You can also enter a name for a new variable, which the builder call adds to the model when you click OK.

You can refer to the value in this input in other builder calls with the following notation.

${Variables/CounterVariableName}
(Optional) Start Count Enter one of the following:

  • A number at which to begin the repetition.

  • A call out to the variable that contains the number at which to begin the repetition. For example ${Variables/startrepetitionvariable}.

Typically you create a method that writes the number to the variable.

The default value is 0.

(Optional) End Count Enter one of the following:

  • A number at which to end the repetition.

  • A call out to the variable that contains the number at which to end the repetition. For example ${Variables/endrepetitionvariable}.

Typically you create a method that writes the number to the variable.

If you specify a value greater than the number of items in the source data, the Repeated Region builder goes through the items again until it reaches the End Count value.

 

Source Data Filter

Use the inputs in this group to repeat over elements that have no container element.

Table 3. Source Data Filter inputs
Input Name Description
(Optional) Skip this many elements Enter the number of items to be omitted (from the beginning of the list) in the repeated region.

Note: Item numbering starts with zero.

Do not use this input if it is to be applied to paged data. The input causes that many elements to be skipped on each page.

Use elements named Element names corresponding to the values to be viewed. The builder filters out the remaining elements.For example, assume you have XML in a variable that contains the following types of elements.
<Locations>
  <City>New York</City>
  <Town>Grover's Grove</Town>
  <City>Boston</City>
  <Borough>Glen Ridge</Borough>
  <City>San Francisco</City>
  <Town>Plainville</Town>
  <City>Chicago</City>
</Locations>
To display only the values assigned to the City element, enter City.

Do not use this input if it is to be applied to paged data. Specifying the filter causes unnecessary work, because the data is already filtered.

Parent topic: Repeated Region builder


Library | Support |