[ http://mc4j.org/jira/browse/STS-300?page=comments#action_10511 ] 
            
Kai Grabfelder commented on STS-300:
------------------------------------

should this functionality really be added on the VIEW level? I think this addes 
quite much complexity to stripes / to the implementation of stripes. 

In my opition from an MVC point of view, filtering information in the view is 
not really the correct approach.

> Filtering for options-enumeration/options-collection
> ----------------------------------------------------
>
>                 Key: STS-300
>                 URL: http://mc4j.org/jira/browse/STS-300
>             Project: Stripes
>          Issue Type: New Feature
>          Components: Tag Library
>    Affects Versions: Release 1.4.1
>            Reporter: Andy
>         Assigned To: Tim Fennell
>
> Currently the options-enumeration and options-collection tags render all 
> values in the enum or collection.
> They will be more useful if filtering criteria can be specified when not all 
> values should be rendered.
> package xxx.enums;
> public enum MyNumber { ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN;
> public boolean getIsPrime() { return this==TWO || this==THREE || this==FIVE 
> || this==SEVEN; }
> public boolean getIsEven() { return (ordinal() % 2) == 1; }
> }
> <stripes:options-enumeration enum="xxx.enums.MyNumber"/>
> (renders all seven options)
> <stripes:options-enumeration enum="xxx.enums.MyNumber" where="isPrime"/>
> (renders only TWO, THREE, FIVE, SEVEN)
> <stripes:options-enumeration enum="xxx.enums.MyNumber" where="isEven"/>
> (renders only TWO, FOUR, SIX)
> If the proposed where= attribute supports some kind of expression language 
> (EL?), it will be much more flexible:
> <stripes:options-enumeration enum="xxx.enums.MyNumber" where="isPrime && 
> !isEven"/>
> (renders only THREE, FIVE, SEVEN)
> For symmetry, the options-collection tag should likewise take a where= 
> attribute.
> A typical use would be, where="theCurrentUserCanSeeThisOption" :)

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

        

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to