Nested validation errors reported when validating a null or zero length map.
----------------------------------------------------------------------------
Key: STS-303
URL: http://mc4j.org/jira/browse/STS-303
Project: Stripes
Issue Type: Bug
Components: Validation
Affects Versions: Release 1.4.1
Environment: Windows / Tomcat 5.5
Reporter: Simon Engledew
Assigned To: Tim Fennell
I've been working on a javascript-enabled form that allows you to dynamically
add and remove 'rows' in a table, represented by TreeMaps of beans stripes-side:
public TreeMap<Long, ChannelDataBean> getChannels() { return this.channels; }
public void setChannels(TreeMap<Long, ChannelDataBean> channels) {
this.channels = channels; }
@ValidateNestedProperties
({
@Validate(field="name", required=true, minlength=3, maxlength=50),
@Validate(field="incomingUsername", required=true, minlength=3,
maxlength=50),
@Validate(field="outgoingUsername", required=true, minlength=3,
maxlength=50),
@Validate(field="incomingPassword", required=true, minlength=3,
maxlength=50),
@Validate(field="outgoingPassword", required=true, minlength=3,
maxlength=50)
})
private TreeMap<Long, ChannelDataBean> channels;
and their appropriate inputs, generated by reflection, page side.
It works great -- unless you try and submit a form with no elements at all. In
this case, Stripes reports validation errors for every single bean property
described in the corresponding nested @Validate annotation.
Is there a work-around for this, aside from implementing a
ValidationErrorHandler (I kind of want the solution to be totally portable and
generic, which it is currently), or is this a bug.
Cheers
Si
PS: I love stripes, it's seriously excellent. Cheers for the terrific framework.
--
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