• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

html:options multiple labelProperty question

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a bean in the request that contians several properties. I want to display all of the values in the labelProperties attribute. ie instead of just showing the First Name in the labelProperty attribute, I'd like to conatenate the values of the row in the bean ie Last Name,FirstName,SSN etc. Is this possible?
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not easily, as far as I know. There are two things you could do, however:

1. Write a scriptlet that defines a string as the concatenation of all the things you want (first name, last name, ssn, etc) and use that string as the labelProperty.

2 (Better, in my opinion). Modify your bean so that there is a getLabel() method that returns firstName + lastName + ssn etc. and use labelProperty="label" in the tag.

Hope that helps.
 
Lisa Carter
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks, I just got a chance to read your response. I did the later and it worked beautifully.
 
reply
    Bookmark Topic Watch Topic
  • New Topic