I am using the iterate tag to display the results from a query to a
database.

<logic:iterate id="echaResults" name="phsEchaSummaryForm"
property="echaResults">
    <td><bean:write name="echaResults" property="id"/></td>
    <td><bean:write name="echaResults" property="caseDate"/></td>
    <td><bean:write name="echaResults" property="gccDescription"/></td>
    <td><bean:write name="echaResults" property="gcExpandedResult"/></td>
</logic:iterate> 

This produces result in the following manner:

1   4/2/2000    First description for 1     An expanded result for 1
1   4/2/2000    Second description for 1    Another expanded result for 1
1   4/2/2000    Third description for 1     And another expanded result for
1
2   5/30/2000   First description for 2     An expanded result for 2
2   5/30/2000   Second description for 2    Another expanded result for 2

The problem I am having is that I do not want to display the id and caseDate
unless they change (the last two columns are essentially a subquery). I
would rather display it in the following way:

1   4/2/2000    First description for 1     An expanded result for 1
                     Second description for 1    Another expanded result for
1
                     Third description for 1     And another expanded result
for 1

2   5/30/2000   First description for 2     An expanded result for 2
                      Second description for 2    Another expanded result
for 2

To do this I will probably need to use <logic:equal name="echaResults"
property="id">, but I am just not certain how I would store the previous id
in a temporary variable. 

Any suggestions or ideas would be greatly appreciated.


> Steve Taylor
> Systems Consultant
> Pangaea Systems Inc.
> (250) 360-0111
        http://www.pangaeainc.com

Reply via email to