I have a simple DynaValidatorForm
<form-bean name="categoryForm" type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="description" type="java.lang.String" />
<form-property name="name" type="java.lang.String" />
<form-property name="id" type="java.lang.String" />
<form-property name="parent" type="java.lang.String" />
</form-bean>
that is called whtin an action
<action path="/categories-edit" attribute="categoryForm" input="msys.categories-edit" name="categoryForm" scope="request" validate="true" type="de.sbow.struts.action.Categories.EditAction"> <forward name="success" path="/categories-edit-finish.do" /> </action>
that inserts so data into the request inside its execute method
public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception {
// read CategoriesTree and put it into request scope
try {
CategoriesModel categories = new CategoriesModel();
request.setAttribute(Constants.CATEGORY_TREE, categories.getCategories());
} catch (ApplicationException e) {
request.setAttribute(Constants.CATEGORY_TREE, null);
}
return mapping.findForward("success");
}
This works quite well during the form's initial display. But if I enter wrong values so that the validation fails, the CATEGORY_TREE-attribute is missing and thus the JSP-view fails.
Isn't the execute-method called again when the validation fails? Anything else wrong here?
Thanks for any help, Alexander
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]