[ http://mc4j.org/jira/browse/STS-290?page=all ]
Tim Fennell updated STS-290:
----------------------------
Fix Version/s: Release 1.4.2
(was: Release 1.4.1)
Description:
In Stripes 1.4.1, DefaultFormatterFactory doesn't recognize enums of the
following format:
enum Xxx {
Aaa { public int Mmm() { return 1; } },
Bbb { public int Mmm() { return 2; } };
public abstract int Mmm();
}
The following patch to DefaultFormatterFactory should fix it.
- else if (clazz.isEnum()) {
+ else if (Enum.class.isAssignableFrom(clazz)) {
was:I have a 1.5 enum in an ActionBean. I have a few pages submitting to the
same ActionBean. In one page, the content of the enum is presented in
stripes:options-enumeration; in another, the submitted content is preserved
using stripes:hidden. I found that stripes:hidden uses the enumeration's
.toString() and not .name(), and that breaks things badly...
Affects Version/s: Release 1.4.1
(was: Release 1.4)
> Formatter needed for anonymous-inner-class Enum types to ensure name() is
> used to turn enums into Strings
> ---------------------------------------------------------------------------------------------------------
>
> Key: STS-290
> URL: http://mc4j.org/jira/browse/STS-290
> Project: Stripes
> Issue Type: Improvement
> Components: Formatting
> Affects Versions: Release 1.4.1
> Reporter: Andy
> Assigned To: Tim Fennell
> Fix For: Release 1.4.2
>
>
> In Stripes 1.4.1, DefaultFormatterFactory doesn't recognize enums of the
> following format:
> enum Xxx {
> Aaa { public int Mmm() { return 1; } },
> Bbb { public int Mmm() { return 2; } };
> public abstract int Mmm();
> }
> The following patch to DefaultFormatterFactory should fix it.
> - else if (clazz.isEnum()) {
> + else if (Enum.class.isAssignableFrom(clazz)) {
--
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