You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Ralf Hauser (JIRA)" <ji...@apache.org> on 2006/05/19 23:59:21 UTC

[jira] Created: (SB-20) support enum

support enum
------------

         Key: SB-20
         URL: http://issues.apache.org/struts/browse/SB-20
     Project: Sandbox
        Type: New Feature

 Environment: any
    Reporter: Ralf Hauser


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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (SB-20) support enum

Posted by "Ralf Hauser (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/SB-20?page=comments#action_37377 ] 

Ralf Hauser commented on SB-20:
-------------------------------

oops, references across project borders appear to require the full URL http://issues.apache.org/jira/browse/LANG-258

> support enum
> ------------
>
>          Key: SB-20
>          URL: http://issues.apache.org/struts/browse/SB-20
>      Project: Sandbox
>         Type: New Feature

>  Environment: any
>     Reporter: Ralf Hauser
>  Attachments: EqualTag.java
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (SB-20) support enum

Posted by "Ralf Hauser (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/SB-20?page=comments#action_37377 ] 

Ralf Hauser commented on SB-20:
-------------------------------

oops, references across project borders appear to require the full URL http://issues.apache.org/jira/browse/LANG-258

> support enum
> ------------
>
>          Key: SB-20
>          URL: http://issues.apache.org/struts/browse/SB-20
>      Project: Sandbox
>         Type: New Feature

>  Environment: any
>     Reporter: Ralf Hauser
>  Attachments: EqualTag.java
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Moved: (STR-2943) support enum

Posted by "Wendy Smoak (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/struts/browse/STR-2943?page=all ]

Wendy Smoak moved SB-20 to STR-2943:
------------------------------------

    Project: Struts 1  (was: Sandbox)
        Key: STR-2943  (was: SB-20)

> support enum
> ------------
>
>                 Key: STR-2943
>                 URL: http://issues.apache.org/struts/browse/STR-2943
>             Project: Struts 1
>          Issue Type: New Feature
>         Environment: any
>            Reporter: Ralf Hauser
>         Attachments: EqualTag.java
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (STR-2943) support enum

Posted by "Wendy Smoak (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/struts/browse/STR-2943?page=all ]

Wendy Smoak updated STR-2943:
-----------------------------

    Component/s: Taglibs

> support enum
> ------------
>
>                 Key: STR-2943
>                 URL: http://issues.apache.org/struts/browse/STR-2943
>             Project: Struts 1
>          Issue Type: New Feature
>          Components: Taglibs
>         Environment: any
>            Reporter: Ralf Hauser
>         Attachments: EqualTag.java
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (SB-20) support enum

Posted by "Ralf Hauser (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/struts/browse/SB-20?page=all ]

Ralf Hauser updated SB-20:
--------------------------

    Attachment: EqualTag.java

Got around to extend the equal tag...

see also  	 LANG-258

> support enum
> ------------
>
>          Key: SB-20
>          URL: http://issues.apache.org/struts/browse/SB-20
>      Project: Sandbox
>         Type: New Feature

>  Environment: any
>     Reporter: Ralf Hauser
>  Attachments: EqualTag.java
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (STR-2943) support enum

Posted by "Paul Benedict (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/STR-2943?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Benedict updated STR-2943:
-------------------------------

    Fix Version/s: Future

> support enum
> ------------
>
>                 Key: STR-2943
>                 URL: https://issues.apache.org/struts/browse/STR-2943
>             Project: Struts 1
>          Issue Type: New Feature
>          Components: Taglibs
>         Environment: any
>            Reporter: Ralf Hauser
>             Fix For: Future
>
>         Attachments: EqualTag.java
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SB-20) support enum

Posted by "Ralf Hauser (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/SB-20?page=comments#action_37386 ] 

Ralf Hauser commented on SB-20:
-------------------------------

see also STR-2388 , STR-2435

also, I enhanced the bean-write's "formatValue(Object valueToFormat)" as a first step like this:

if (value instanceof ValuedEnum) {
	ValuedEnum ve = (ValuedEnum) value;
	return String.valueOf(ve.getValue());
}

> support enum
> ------------
>
>          Key: SB-20
>          URL: http://issues.apache.org/struts/browse/SB-20
>      Project: Sandbox
>         Type: New Feature

>  Environment: any
>     Reporter: Ralf Hauser
>  Attachments: EqualTag.java
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Updated: (SB-20) support enum

Posted by "Ralf Hauser (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/struts/browse/SB-20?page=all ]

Ralf Hauser updated SB-20:
--------------------------

    Attachment: EqualTag.java

Got around to extend the equal tag...

see also  	 LANG-258

> support enum
> ------------
>
>          Key: SB-20
>          URL: http://issues.apache.org/struts/browse/SB-20
>      Project: Sandbox
>         Type: New Feature

>  Environment: any
>     Reporter: Ralf Hauser
>  Attachments: EqualTag.java
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (SB-20) support enum

Posted by "Ralf Hauser (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/SB-20?page=comments#action_37395 ] 

Ralf Hauser commented on SB-20:
-------------------------------

heads up: ValueEnum might not be as type-safe as you wish it to be  http://issues.apache.org/jira/browse/LANG-259

> support enum
> ------------
>
>          Key: SB-20
>          URL: http://issues.apache.org/struts/browse/SB-20
>      Project: Sandbox
>         Type: New Feature

>  Environment: any
>     Reporter: Ralf Hauser
>  Attachments: EqualTag.java
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (SB-20) support enum

Posted by "Ralf Hauser (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/SB-20?page=comments#action_37395 ] 

Ralf Hauser commented on SB-20:
-------------------------------

heads up: ValueEnum might not be as type-safe as you wish it to be  http://issues.apache.org/jira/browse/LANG-259

> support enum
> ------------
>
>          Key: SB-20
>          URL: http://issues.apache.org/struts/browse/SB-20
>      Project: Sandbox
>         Type: New Feature

>  Environment: any
>     Reporter: Ralf Hauser
>  Attachments: EqualTag.java
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (SB-20) support enum

Posted by "Ralf Hauser (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/SB-20?page=comments#action_37386 ] 

Ralf Hauser commented on SB-20:
-------------------------------

see also STR-2388 , STR-2435

also, I enhanced the bean-write's "formatValue(Object valueToFormat)" as a first step like this:

if (value instanceof ValuedEnum) {
	ValuedEnum ve = (ValuedEnum) value;
	return String.valueOf(ve.getValue());
}

> support enum
> ------------
>
>          Key: SB-20
>          URL: http://issues.apache.org/struts/browse/SB-20
>      Project: Sandbox
>         Type: New Feature

>  Environment: any
>     Reporter: Ralf Hauser
>  Attachments: EqualTag.java
>
> 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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira