I cannot edit the topmost part, so I post it here:
In your struts-config.xml, you have defined the a dyna form named testTableForm. But you also need to specify, which ACTION you want the form to be served, so, you need:
In this case, when your JSP, say testTableForm0.jsp, contains an action that named "testTableAction", the data inside the JSP (if specified correctly using Struts Tags) will be copied into the DynaForm, and the corresponding method() will be called to process this request with the dyna form.
Joined: Jun 16, 2003
Hi Nicholas ,
Thanks a lot for your reply it cleared a lot for me,
I have a question what we get when we set JSP form properties in Dyna form, how does this validate the form fields?
Joined: Nov 07, 2003
I have a question what we get when we set JSP form properties in Dyna form,
The Struts engine will put the corresponding value of the variables into the Sturts by the DynaForm's getter and setter method:
You need not to do anything, all these actions are performed by the Struts engine.
how does this validate the form fields?
As you can see the <action> tag, the value of the attribute validate must be set to true!
By doing so, the validate(ActionMapping mapping, HttpServletRequest request) method will be called automatically by the Struts engine.
And, all checking logics are located inside this method.
In such case, if the errors contains elements, the Struts engine will redirect the request back to the caller page, and you can see the errors inside ActionErrors.