Hi all,
I have an object model that is three levels deep. I am trying to use
Stripes, in a single form, to create/update the top-level object and
all of its embedded objects. I am using indexed properties to do
this. I am also using Stripes' approach of having an "empty row" to
facilitate the adding of a new "row".
In this particular situation, I have a validation in my action bean
that simply will not pass:
@ValidateNestedProperties({
@Validate( field="foo", required=true ),
@Validate( field="secondLevelObjects.bar", required=true ),
@Validate( field="secondLevelObjects.thirdLevelObjects.baz",
required=true )
})
private MyObject myObject;
Now, if I have a completely empty row in my form for
"secondLevelObjects", this passes validation as per Stripes
documentation. However, if I have a completely empty row in the form
for "myObject.secondLevelObjects[0].thirdLevelObjects[0]", then
Stripes says that I am missing a required field on
thirdLevelObjects[0]. Even though the row is completely empty... and
should ignored and not submitted for validation.
I have racked my brain on this one for hours and have not been able to
resolve the problem. As a workaround, I have resorted to custom
validation of the third level deep object. Obviously, this is a hack.
I've checked in JIRA and don't see an issue around this. Has anyone
else ever encountered this before?
Thanks.
-- Rick
------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users