Using HashMap in the struts <html:option> tag

Posted on 2004-08-24
Last Modified: 2008-03-17
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()"/>
Question by:mikehalfsheen
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
LVL 35

Accepted Solution

TimYates earned 250 total points
ID: 11878968
<html:options collection="userBaskets" property="key" labelproperty=""/>

LVL 35

Expert Comment

ID: 11878972
Can you post some code? (assuming that doesn't work)?

Author Comment

ID: 11879084
lovely ;)
LVL 35

Expert Comment

ID: 11879151
:-)  Woo!  

Good luck!


Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
spring AOP 6 94
Set up Wildfly 10 8 471
JavaScript parse form with colon separated values 2 79
jsp login check 12 67
Had a business requirement to store the mobile number in an environmental variable. This is just a quick article on how this was done.
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit If you want to manage em…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question