File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes html:options collection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:options collection" Watch "html:options collection" New topic

html:options collection

Sujeevan Nagarajah

Joined: Sep 09, 2007
Posts: 8
Can I use html ptions collection tag with 'label' property assigned to concatenation of two bean properties of the collection element bean. Is that possible? In not I know I have to go for scriptlet or need to change the bean.

I am expecting your valuable advice.

Thank you in advance.

Sujeevan Nagarajah.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
No, you can't concatenate two properties in an htmlptionsCollection tag. My advice is to create a new getter for the bean that performs the needed concatenation.

Consultant, Sima Solutions
Sujeevan Nagarajah

Joined: Sep 09, 2007
Posts: 8
Thank you Merrill.
I agree. Here's the link:
subject: html:options collection
It's not a secret anymore!