Thanks, I am doing just that.
Just a quick question, how do I use the property name as the error key
in the validate() method?
I have this but it uses the form name as the key, not the name of the
property currently validating.
public ActionErrors validate(ActionMapping mapping, HttpServletReque
I would think so, but you'd have to call Validator yourself. Take a
look at how the ValidatorForm#validate() calls it, and base your
nested.validate() code on that. After the call, append the errors
from your main form and those in your nested form.
On Fri, 10 Dec 2004 10:41:36 +1100, Ben <[EMAI
Ben wrote:
I meant this:
UserForm () {
String name;
AddressForm address = new AddressForm();
}
AddressForm () {
String city;
String zipcode;
String country;
validate(...) {
// validate the address
}
}
UserAction () {
UserForm userForm = (UserForm) form;
ActionErrors errors = userForm.
I meant this:
UserForm () {
String name;
AddressForm address = new AddressForm();
}
AddressForm () {
String city;
String zipcode;
String country;
validate(...) {
// validate the address
}
}
UserAction () {
UserForm userForm = (UserForm) form;
ActionErrors errors = userForm.valida
Why not call nested.validate() inside NormalForm#validate(), then add
the appropriate ActionMessage objects in the resulting ActionErrors?
On Fri, 10 Dec 2004 08:57:17 +1100, Ben <[EMAIL PROTECTED]> wrote:
> Hi
>
> Within my normal form there is a nested form. The nested form has
> custom valida
Are you talking something like
If so, then its most likely not possible. Furthermore, it is not
standard HTML, and not guaranteed to work on any browser - whatever you
are doing with nested forms needs to be rethought so as not to use them.
If that is not what you are talking abo
Hi
Within my normal form there is a nested form. The nested form has
custom validation. The validate attribute of the action is set to
false. My question is how do I validate the normal form and
automatically validate the nested form with my custom validation
method?
E.g.
NormalForm () {
NestedF
7 matches
Mail list logo