Hello all,
Just a quick question about something that seems dirty and I wish I
could do better - I have an action bean like so:
public class StatusAction extends ... BaseActionBean {
....
@ValidateNestedProperties({
@Validate(field="key",required=true,on="put"),
@Validate(field="accountId",required=true,on="put"),
@Validate(field="status",required=true,on="put"),
@Validate(field="progress",required=true,minvalue=0.0,
maxvalue=1.0,on="put")
})
Status status;
public Resolution put() {
...
}
public Resolution get() {
...
}
}
Notice I only want the validation to run on the "put" event. However
I had to repeat that declaration (on="put") 4 times, once for each
@Validate inside the nested properties. Is there any way to avoid
that repetition and just say that the whole "status" object is only to
be validated for a "put" and not for a "get"?
Cheers & thanks for any advice!
Simon.
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users