Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in using display tag sorting with Struts

 
Charanjit Sidhu
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a requirement of a table on a screen with the option of sorting on all columns. I was thinking that display tag will be a nice solution. But sorting is not working as the sorting link points to the JSP and my JSP is under WEB-INF and additionally in Struts we should always go through 'actions'.

I have the following in my JSP:
<display:column property="loanNumber" title="Loan #" sortable="true"/>

and the generated link on field 'Loan #' is:

http://host:7001/webapp/WEB-INF/layout/layout.jsp?d-16544-s=1&d-16544-o=2

Is there a solution to this problem or I will have to drop the idea of using Display tag for this requirement?

Thanks!
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't really used the display tag library, so I couldn't help you much with information on what it does or doesn't do. If it needs to redisplay the page in the manner you've described, though, it doesn't look like it's going to work in your situation.

I've been using WebFX Sortable Table to sort my tables. This is an all javaScript solution that does not require the page to be submitted or redisplayed. If you determine that the display tags aren't going to work for you, you might give sortable table a try.
[ February 22, 2006: Message edited by: Merrill Higginson ]
 
Hugh Heff
Greenhorn
Posts: 1
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to set the requestURI parameter.
e.g. for the action called 'layout':
<display:table .... requestURI="layout.action" ....>

where .... is whatever other parameters you have in the display table tag.

Enjoy,
Heff
 
Kenneth J Medlock
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was having exactly the same issue. Thanks for the fix.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic