aspose file tools
The moose likes Struts and the fly likes html:options won't work with Map Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "html:options won Watch "html:options won New topic
Author

html:options won't work with Map

Gregg Bolinger
Ranch Hand

Joined: Jul 11, 2001
Posts: 15230

Anyone know why the <htmlptoins> tag won't work with a Map? It seems silly for me to hava a JavaBean just for an ID and a Value. It would be much simpler if I could just say:



And then in the JSP



The JSP code doesn't change much, but the Java code changes a bit and adds several object to memory when doing it with JavaBeans and putting those in an ArrayList or some sort of Collection.

So I would be interested in some insight into this.
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 4351

Try this



hope this helps!
[ August 11, 2004: Message edited by: Roel De Nijs ]

SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
Gregg Bolinger
Ranch Hand

Joined: Jul 11, 2001
Posts: 15230



hope this helps!

[ August 11, 2004: Message edited by: Roel De Nijs ][/qb]<hr></blockquote>

Yeah, I knew I could that. I was just hoping someone knew why the <html ptions> didn't support a Map for the Collection.
[ August 11, 2004: Message edited by: Gregg Bolinger ]
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4725

optionsCollection should work fine without the logic:iterate or bean:define --



A good workman is known by his tools.
Gregg Bolinger
Ranch Hand

Joined: Jul 11, 2001
Posts: 15230

Originally posted by Marc Peabody:
optionsCollection should work fine without the logic:iterate or bean efine --



Thanks, I'll give that a shot.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: html:options won't work with Map
 
Similar Threads
html:options usage
html:options
Problem with html:options
html:options?
html:options - Composite labelProperty?