I am not controlling the sorting of columns myself, just letting display tag do it (see below for a code sample).
<display:table name="model.users"
id="row" defaultsort="1"
requestURI="complianceDetails.do" sort="list"
>
<display:column title="IP" sortable="true" headerClass="thborder"
class="thborder">
<input type="button" value="${row.currentIpAddress}" id="edit"
onclick="javascript:clientDetails(
${row.clientId} );" />
</display:column>
<display:column property="macaddress" title="MAC" sortable="true"
headerClass="thborder" class="thborder" />
<display:column property="lastPrincipal" title="User Name"
sortable="true" headerClass="thborder" class="thborder"/>
<display:column property="hostType.label" title="Device"
sortable="true" headerClass="thborder" class="thborder" />
<display:column property="group.label" title="Group" sortable="true"
headerClass="thborder" class="thborder"/>
</display:table>
This code generates the following html (not all shown);
<thead>
<tr>
<th class="thborder sortable sorted order1">
<a
href="complianceDetails.do?baseStat=Active+Users&d-16544-p=1&d-16544-s=0&d-16544-o=1">IP</a></th>
<th class="thborder sortable">
<a
href="complianceDetails.do?baseStat=Active+Users&d-16544-p=1&d-16544-s=1&d-16544-o=2">MAC</a></th>
<th class="thborder sortable">
<a
href="complianceDetails.do?baseStat=Active+Users&d-16544-p=1&d-16544-s=2&d-16544-o=2">User
Name</a></th>
<th class="thborder sortable">
<a
href="complianceDetails.do?baseStat=Active+Users&d-16544-p=1&d-16544-s=3&d-16544-o=2">Device</a></th>
<th class="thborder">Status</th>
<th class="thborder sortable">
<a
href="complianceDetails.do?baseStat=Active+Users&d-16544-p=1&d-16544-s=5&d-16544-o=2">Group</a></th></tr></thead>
OK, now for the question. Should I ignore the e.g.,
d-16544-p=1&d-16544-s=0&d-16544-o=1 paramaters in my
complianceDetails.do controller (Spring MVC)? Ignoring them causes the
collection to be rebuild again which in some cases is not appropriate. What is
the best way to not ignore them thereby returning to the jsp and having the
current (session scoped) collection sorted? I don't want to put in code in
every controller that basically looks for paramaters with names like "d-".
Would you implement a filter? How are other people handling the sorting without
rebuilding the collection.
Thanks,
Jeff
Jeff Boring
[EMAIL PROTECTED]
Impulse Point, Lakeland, FL
http://jroller.com/page/jwboring
<<winmail.dat>>
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ displaytag-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/displaytag-user

