Support for deep inner classes in options-enumeration
-----------------------------------------------------

                 Key: STS-299
                 URL: http://mc4j.org/jira/browse/STS-299
             Project: Stripes
          Issue Type: Improvement
          Components: Tag Library
    Affects Versions: Release 1.4.1
            Reporter: Andy
         Assigned To: Tim Fennell
            Priority: Trivial


Currently the options-enumeration tag supports enums in a single-level inner 
class to be specified using dots ('.') only without dollars ('$'). (Refer to 
STS-253)

So in the following, enum="xxx.enums.Outer.LevelOne" works, but 
enum="xxx.enums.Outer.Inner.LevelTwo" does not. The latter enum can still be 
specified as "xxx.enums.Outer$Inner$LevelTwo", which looks ugly.

It will be better if the tag allows any number of dollars to be specified as 
dots.

package xxx.enums;
public class Outer {
public static enum LevelOne { ONE, TWO }
public static class Inner {
public static enum LevelTwo { THREE, FOUR }
}
}

One strategy would be to keep replacing the last (rightmost) dot with a dollar 
until ReflectUtil.findClass works or until there are no more dots (at which 
point, the original exception should be thrown). This code can be placed in a 
utility class (ReflectUtil.findClass itself looks good) and reused in case 
there are inner ActionBean classes to be specified in other tags (form, link, 
url, useActionBean) :)

-- 
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