[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 832
  • Last Modified:

Using HashMap in the struts <html:option> tag

Hi,
I know you can use a HashMap with the otpions like:-
      <html:options collection="userBaskets" property="key" />
but if the value of in HashMap is an object, how do you use a property of the value as the label,

eg   <html:options collection="userBaskets" property="key" labelproperty="value.getName()"/>
0
mikehalfsheen
Asked:
mikehalfsheen
  • 3
1 Solution
 
TimYatesCommented:
<html:options collection="userBaskets" property="key" labelproperty="value.name"/>

?
0
 
TimYatesCommented:
Can you post some code? (assuming that doesn't work)?
0
 
mikehalfsheenAuthor Commented:
lovely ;)
0
 
TimYatesCommented:
:-)  Woo!  

Good luck!

Tim
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now