Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 2 - Display tag Serial Number Problem

 
shashi wagh
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 689
Eclipse IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
shashi wagh
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello still not found any solution
Please help me!!!1


Thanks in advance.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic