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

select tag question

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using the select tag for a multilist box.

Here is the code.

<html:select style="width: 125px;" property="avRoles" multiple="true" size="5" >
<html ptions property="availRoleNames" />
</html:select>

my question is I pass "availRoleNames" (Set) for options. This sets the same value to the option:value and option:label.

I wanted to set different values option:value option:label.
I can pass another Set "availRoleIds" for option:value and use this availRoleNames for option:label.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In this case you would write the following tag:
<html:options property="availRoleIds" labelProperty="avaiRoleNames" />

See the following link for more information on the html:options tag

http://struts.apache.org/userGuide/struts-html.html#options
reply
    Bookmark Topic Watch Topic
  • New Topic