G
gk
when i use Form Bean i use ActionErrors to validate
example :
public final class HelloForm extends ActionForm {
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if ((person == null) || (person.length() < 1))
errors.add("person", new
ActionError("ch03.hello.no.person.error"));
return errors;
}
But when if i use DynaActionForm how do i validate ?
i DONT want to use Struts validation.xml + validation-rules.xml.
how do i do field checking if there is DynaActionForm ?
example :
public final class HelloForm extends ActionForm {
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if ((person == null) || (person.length() < 1))
errors.add("person", new
ActionError("ch03.hello.no.person.error"));
return errors;
}
But when if i use DynaActionForm how do i validate ?
i DONT want to use Struts validation.xml + validation-rules.xml.
how do i do field checking if there is DynaActionForm ?