Issue Details (XML | Word | Printable)

Key: STR-2943
Type: New Feature New Feature
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Ralf Hauser
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Struts 1

support enum

Created: 20/May/06 04:57 AM   Updated: 01/Sep/07 03:41 AM
Return to search
Component/s: Tag Libraries
Affects Version/s: None
Fix Version/s: Future

File Attachments:
  Size
Java Source File Licensed for inclusion in ASF works EqualTag.java 2006-05-21 12:56 AM Ralf Hauser 5 kB
Environment: any


 Description  « Hide
It would be great if struts would support enum concepts.
Apparently, http://jakarta.apache.org/commons/lang/api/org/apache/commons/lang/enums/Enum.html is partially supported as per http://marc.theaimsgroup.com/?l=struts-dev&m=98960078911784&w=2 for example in <html:options>

However, it would very useful to also support http://java.sun.com/j2se/1.5.0/docs/guide/language/enums.html in a way that the programmer no longer needs to think of strings.

Also, "Struts Action 1" users may be forced to stay on jdk1.4, but would like to already use a design pattern the will require minimum refactoring when migrating to 5.0. Does anybody have any experience in this sector (or could http://retroweaver.sourceforge.net/ be a good source of inspiration even though it does exactly the opposite...)

My vision is that
<logic:iterate>, <logic:equal>, <html:options>, <html:radio>, ... could work directly on 5.0 enum

Also, the strings to which enum will be mapped should carefully kept as short as possible, because GET URLs may end-up in email messages that sometimes force-hyphenate them, i.e destroy them for avaerage users.

Lastly, it would be great if the chosen approach somehow could also be leveraged for persistence frameworks such as http://www.hibernate.org/288.html

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Ralf Hauser made changes - 21/May/06 12:56 AM
Field Original Value New Value
Attachment EqualTag.java [ 13055 ]
Wendy Smoak made changes - 02/Sep/06 07:03 PM
Key SB-20 STR-2943
Project Sandbox [ 10122 ] Struts 1 [ 10121 ]
Wendy Smoak made changes - 02/Sep/06 07:03 PM
Component/s Taglibs [ 21242 ]
Paul Benedict made changes - 01/Sep/07 03:41 AM
Fix Version/s Future [ 21701 ]