[ 
http://www.stripesframework.org/jira/browse/STS-298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Frederic Daoud closed STS-298.
------------------------------

    Resolution: Not a Bug

Populate the tag from the enum= attribute to keep things simple and consistent.

> Alternatives for enum= attribute in options-enumeration
> -------------------------------------------------------
>
>                 Key: STS-298
>                 URL: http://www.stripesframework.org/jira/browse/STS-298
>             Project: Stripes
>          Issue Type: Improvement
>          Components: Tag Library
>    Affects Versions: Release 1.4.1
>            Reporter: Andy
>            Priority: Minor
>
> Currently the stripes:options-enumeration tag requires the enum= attribute to 
> specify the full class name of the enum.
> <stripes:form action="/MyAB.action">
> <stripes:select name="myProperty">
> <stripes:options-enumeration enum="xxx.enums.MyEnum"/>
> </stripes:select>
> </stripes:form>
> Assuming that MyAB.getMyProperty() is declared to return xxx.enums.MyEnum, a 
> better way to specify the enum class is to specify the property name 
> ("myProperty" in this case). The actual enum class is then looked up in the 
> action bean that is specified in the enclosing stripes:form.
> <stripes:form action="/MyAB.action">
> <stripes:select name="myProperty">
> <stripes:options-enumeration for="myProperty"/>
> </stripes:select>
> </stripes:form>
> An even better way is to omit the for= and enum= attributes altogether, 
> because the property name is already specified in the enclosing 
> stripes:select tag.
> <stripes:form action="/MyAB.action">
> <stripes:select name="myProperty">
> <stripes:options-enumeration/>
> </stripes:select>
> </stripes:form>
> However the for= attribute may be useful in the rare cases where the name 
> property in stripes:select refers to a different property.
> With this enhancement, the enum= attribute becomes non-mandatory, the for= 
> attribute is added, and it is an error to specify both.

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

        

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to