I'm new to using displaytag, but am very impressed at how easily and
powerfully it works. I'm developing an interface to a j2ee app that was
developed by another company. The problem I'm having is with sorting.

I'm required to use the entity beans in the other companies application
for retrieving the data. I then use your tag library to display lists of
the data like:

<display:table name="contactList" cellpadding="2" cellspacing="2"
border="0" defaultorder="ascending" defaultsort="1" sort="list">
        <display:column property="id" title="ID" headerClass="sortable"
href="ContactView.do" paramId="id" sortable="true" />
        <display:column property="name" sortable="true" />
        <display:column property="phone1" title="Primary Phone" />
        <display:column property="email" autolink="true" />
</display:table>

Everything works great, except for the ID column. The problem is that
the list that gets passed to me by the third party entity bean passes
the id field as a String, even though it's kept in the database as an
integer (specifically a Numeric type which can handle floats, but the
ids get generated from a sequence...hence an integer).

This presents a problem since sorting Strings sorts 4000 before 32. Is
there any way I can convert the value to an integer to be used as the
sorting value?

Regards,

Thad Smith



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to