Display tag with total=true and href

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Display tag with total=true and href

sumathie s
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/displaytag-user
Reply | Threaded
Open this post in threaded view
|

Re: Display tag with total=true and href

Rick.Wellman

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:[hidden email]]
Sent: Friday, March 18, 2011 10:48 AM
To: [hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/displaytag-user
Reply | Threaded
Open this post in threaded view
|

Re: Display tag with total=true and href

sumathie s
Thanks Rick for the reply.
When I put the property i didn't see the link in that column.

Could you please provide me an example of how to use decorator for this?

Thanks

--- On Fri, 18/3/11, Rick.Wellman <[hidden email]> wrote:

From: Rick.Wellman <[hidden email]>
Subject: Re: [displaytag-user] Display tag with total=true and href
To: [hidden email]
Date: Friday, 18 March, 2011, 9:23 PM

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:[hidden email]]
Sent: Friday, March 18, 2011 10:48 AM
To: [hidden email]
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

 


-----Inline Attachment Follows-----

------------------------------------------------------------------------------
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

-----Inline Attachment Follows-----

_______________________________________________
displaytag-user mailing list
displaytag-user@...
https://lists.sourceforge.net/lists/listinfo/displaytag-user


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/displaytag-user
Reply | Threaded
Open this post in threaded view
|

Re: Display tag with total=true and href

Dileo, John - Kansas City, MO
In reply to this post by Rick.Wellman

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:[hidden email]]
Sent: Friday, March 18, 2011 10:53 AM
To: [hidden email]
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:[hidden email]]
Sent: Friday, March 18, 2011 10:48 AM
To: [hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/displaytag-user