Meaningless Drivel is fun!*
The moose likes Struts and the fly likes Struts 2 - Display tag Serial Number Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 - Display tag Serial Number Problem" Watch "Struts 2 - Display tag Serial Number Problem" New topic
Author

Struts 2 - Display tag Serial Number Problem

shashi wagh
Ranch Hand

Joined: Oct 30, 2008
Posts: 38
I am display tag for my project.
I want to show Serial number in my table
for that I am using following code.



but problem is when I sort the data for other column the serial number also get change.
I want fixed serial number for the table.



Thanks in advance.
Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 688

Hi,

Please first Add in your jsp jstl library.

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

then add code

<display:table requestURI="retrieveBooking.action" id="row" name="lstBooking" decorator="com.gts.crmw.common.utility.PagingDisplayDecorator"
pagesize="10" sort="list" >

<display:column title="#" headerClass="Table-Head">
<c ut value="${row_rowNum}" />
</display:column>


Please change your id to "row"



Thanks,
Nishan Patel.


Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD Java Developer,My Blog
shashi wagh
Ranch Hand

Joined: Oct 30, 2008
Posts: 38
Thanks Nishan for your replay,

But it is working same as mine previous code
when I sort any column the serial number also gets change

Example





thanks in advance
shashi wagh
Ranch Hand

Joined: Oct 30, 2008
Posts: 38
Hello still not found any solution
Please help me!!!1


Thanks in advance.
 
Don't get me started about those stupid light bulbs.
 
subject: Struts 2 - Display tag Serial Number Problem