Question

<display:table list="ratecenter" name="ratecenter" cellpadding="0" cellspacing="0" class="tableStyle" style="width:90%">
    <% name = ratecenter.get(0); %>
    <s:if >
    <display:column property="rateCenterName" title="Rate Center" />
    <display:column property="didNumber" title="Did Number" />

</display:table

How can I check the data of the list "ratecenter" in this jsp? This list contains the ratecenter number and did number but I want to print the ratecenter number only once because there is only 3 ratecentre but did to 1 ratecenter is more than 1 so I want that rate center no is only print once in column and then didnumber of that rate center and when ratecenter iname is changed then it will print the next ratecentre name in column then did to this ratecenter and so on

Was it helpful?

Solution 2

You can use group attribute of <display:column>

<display:column property="rateCenterName" title="Rate Center" group="1" />  

See also

OTHER TIPS

If I understand correctly, you want a column to only display a value if it's the first row to have this value, and have the subsequent rows with the same value not display anything in this column. That's what the group property of the display:column tag is for:

group The grouping level (starting at 1 and incrementing) of this column (indicates if successive contain the same values, then they should not be displayed). The level indicates that if a lower level no longer matches, then the matching for this higher level should start over as well. If this attribute is not included, then no grouping is performed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top