Or, since you're using the core JSTL library, you should also have access to
the format library, and you can use 'fmt:formatNumber' instead of 'c:out' and
do the formatting there.
Probably, an even better alternative would be to use the or 'url' attribute of
the <column> tag itself, and put your "value=${...}" inside the <column> tag
too; in that case, you should be able to use the 'format' attribute as desired.
Your tag would end up looking something like:
<display:column class="numbercell" title="Budget Line Balance Amount"
total="true"
format="{ 0, number, currency }" url="glBalanceInquiry.do"
value="${row.currentBudgetLineBalanceAmount}" />
Also, your <a> tag should have href="glBalanceInquiry.do" target="_blank", so
the browser knows you're using the 'target' attribute.
John J. DiLeo, D.Sc.
USDA TAAF Development Lead
Echota Technologies Corp.
Office: (816) 823-5395
Mobile: (816) 803-2678
This message (and any attachments) may contain sensitive (Privacy Act
Protected) data as defined in FSA IRM-371. It is your responsibility to adhere
to FSA policies and notices in the internal use and protection of sensitive
data. If you authorize the release of this information to other government
entities for official business purposes you must ensure the recipient is
notified that the data is sensitive and that the recipient must be responsible
for securing and protecting the data.
From: Rick.Wellman [mailto:rick.well...@kiewit.com]
Sent: Friday, March 18, 2011 10:53 AM
To: displaytag-user@lists.sourceforge.net
Subject: Re: [displaytag-user] Display tag with total=true and href
Displaytag is trying to convert your entire href string into a number (which
it/java obviously cannot do). I notice that you're not using the property
attribute on the tag; you may have to use that with a decorator to get the
desired effect.
From: sumathie s [mailto:sumathi...@yahoo.co.in]
Sent: Friday, March 18, 2011 10:48 AM
To: displaytag-user@lists.sourceforge.net
Subject: [displaytag-user] Display tag with total=true and href
Hi
Having an issue with using total= true and href to open in the new window in
the display column
<display:column
class="numbercell" title="Budget Line Balance Amount"
total="true"
format="{0,number, currency}" >
<a href="glBalanceInquiry.do target_blank /><c:out
value="${row.currentBudgetLineBalanceAmount}" /></a>
</display:column>
Error message
java.lang.ClassCastException: java.lang.String cannot be cast to
java.lang.Number
at org.displaytag.model.HeaderCell.addToTotal(HeaderCell.java:593)
at org.displaytag.model.HeaderCell.addCell(HeaderCell.java:618)
Please help
Thanks
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user