A script-enabled browser is required for this page to function properly.

<rw:seq>

The rw:seq tag defines a sequence of values. The rw:seq and rw:seqval tags work together to define and operate on a sequence of values. The rw:seq tag defines the sequence, and the rw:seqval tag operates on the sequence. The sequence is a list of values.

Syntax

<rw:seq name="sequence_id" seq="sequence_elements" >
   [tag body]
</rw:seq>

Attribute Value

Description

sequence_id

A unique identifier in the page scope. If the name is new in the current page, then this seq tag defines a new sequence object. Otherwise, if the name already appeared in the current page, the sequence elements will accumulate.

sequence_elements

Defines the elements of the sequence. Multiple elements are separated by a comma (,). For example: <rw:seq name="myNames" seq="Jim, James">

The set of elements in a particular sequence object is cumulative. For example: if we already have the above myNames sequence defined in the page, and we add the following in this page <rw:seq id="myNames" seq="Jimmy">, after this point in the page, the sequence myNames will have three elements: Jim, James, and Jimmy.

Example

This example shows the rw:seq tag used to change the background colors of a table row. Note how rw:seqval operates on the sequence defined by rw:seq.

<rw:seq name="bgcolor" seq="#bbbbbb, #ffffff"/>
<rw:foreach id="R_G_EMP_NAME_1" src="G_EMP_NAME">
   <tr bgcolor="<rw:seqval ref="bgcolor" op="nextval"/>">
      <td headers="<%= idEmpName %>"> 
        <rw:getValue id="myEmpName" src="EMP_NAME"/><%= myEmpName %></td> 
      <td headers="<%= idEmpId %>"> 
	     <rw:field id="F_EMPLOYEE_ID" src="EMPLOYEE_ID"> F_EMPLOYEE_ID </rw:field></td>
      <td headers="<%= idHireDate %>"> 
         <rw:field id="F_HIRE_DATE" src="HIRE_DATE"> F_HIRE_DATE </rw:field></td>
      <td headers="<%= idSalary %>">    
         <rw:field id="F_SALARY" src="SALARY"> F_SALARY </rw:field></td>    
      <td headers="<%= idCommision %>"> 
         <rw:field id="F_COMM_PCT" src="COMMISSION_PCT"> F_COMM_PCT </rw:field></td> 
      <td headers="<%= idManager %>"> 
         <rw:field id="F_EMPLOYEE_ID1" src="EMPLOYEE_ID1"> F_EMPLOYEE_ID </rw:field></td>
      <td headers="<%= idTotal %>"> 
         <rw:field id="F_TotalSALARY" src="TotalSALARYPerEMPLOYEE_ID"    
          formatMask="%NNNNN.00"> F_TotalSALARY </rw:field></td>
      </tr>
   </rw:foreach>

See also

Oracle Reports JSP tags

About JSP tags

About JavaServer Pages and servlets