Hi

here's the deal.

Suppose I want to display a <s:radio> tag showing a list of TicketDescriptions where each has the property ticketName, i.e. a method getTicketName()). getTicketName itself returns an instance of type LocalizedString for which I wrote a custom struts conversion. LocalizedString is basically an enhanced java.util.String object which contains the TicketDescription's name.
After the conversion ticketName will be of type java.lang.String.

So this is what I use so far:

                        <s:radio name="ticket"
                                 list="ticketDescriptions"
                                 listKey="id"
                                 listValue="ticketName"
                                 />


and as an example results in
[ ] student ticket
[ ] VIP ticket
[ ]...



BUT what I really would like to see is

[ ] student ticket (10 Euro)
[ ] VIP ticket (100 Euro)
[ ]...



This is what I tried so far but with no avail


                        <s:radio name="ticket"
                                 list="ticketDescriptions"
                                 listKey="id"
listValue="%{ticketName + ' (100 Euro)' }"
                                 />


The output is

[ ] xx.xx.LocalizedString@1bb8d3e[ID=373,Locale=en,Title="student ticket"] (100 Euro) [ ] xx.xx.LocalizedString@1bb8d3e[ID=374,Locale=en,Title="VIP ticket"] (100 Euro)

Any ideas? thanks!




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to