<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.
<rw:seq name="sequence_id" seq="sequence_elements" >
[tag body]
</rw:seq>
Attribute Value |
Description |
|
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 ( |
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>
About JavaServer Pages and servlets
Copyright © 1984, 2005, Oracle. All rights reserved.