Justin,
I'm not sure if you caught my post the other day, but my friend has
been getting this error on his box (running in OS X, Tomcat 5.5.4) ,
except the same code works fine on mine.
javax.servlet.ServletException: /browse.jsp(53,5) Attribute
sortProperty invalid for tag column according to TLD
We're both are using displaytag-1.0. Here's the code that's calling it:
<display:table name="model.listings" class="list" requestURI=""
id="listing" export="false">
<display:column sortable="true" href="listing.html" paramId="id"
paramProperty="id"
property="shortDesc" titleKey="listing.shortDesc"/>
<display:column sortProperty="price" sortable="true" width="70"
titleKey="listing.price">
<fmt:formatNumber type="currency" value="${listing.price}"/>
</display:column>
</display:table>
Any help would be great.
Thanks,
PJ
On Wed, 2 Feb 2005 10:26:55 -0800, Justin James
<[EMAIL PROTECTED]> wrote:
> Use sortProperty which hangs off the column tag. The sort property can
> come directly from the data object or can be provided by the decorator.
> In your case, you might want to use a column decorator, and add a method
> "getIdAsInteger()" which converts the String to Integer. Then make the
> sort property for the ID column, idAsInteger. e.g.
>
> <display:column property="id" title="ID" headerClass="sortable"
> sortProperty="idAsInteger" decorator="com.package.IdColunmDecoartor" />
>
> HTH,
> Justin
>
> -----Original Message-----
> From: Smith, Thad [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, February 02, 2005 9:50 AM
> To: [email protected]
> Subject: [displaytag-user] FW: Unusual request
>
> 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
>
> -------------------------------------------------------
> 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
>
-------------------------------------------------------
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