This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Struts and the fly likes enum + select on Struts 2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "enum + select on Struts 2" Watch "enum + select on Struts 2" New topic
Author

enum + select on Struts 2

Mad Java
Greenhorn

Joined: Feb 22, 2010
Posts: 1
Hello all! I'm having a problem with Struts 2 using select and enum

Lets say I have an Enum:



I want to populate an select with it, but I can't do it! So please help! I'll post what I'm trying:

- The request Action



- The JSP



- The result Action:



Ok, so this doesn't work because the select is returning the id as string, so I made a bad code:




Well, this works with one enum, but in another enum in the same class it doesn't work anymore (don't ask me why).

Anyone has a better, good idea, how to use enums with select on Struts 2?!?! =(
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: enum + select on Struts 2
 
Similar Threads
Struts 2 checkboxlist error - list key could not be resolved
Using Struts Creating the Radio Button for gender
org.apache.jasper.JasperException: tag 'select', field 'list', name 'usingMap' in struts2
syntax error
Storing Enum Types