Thanks for the responses. I was using the way that you showed. I figured out that my problem was with my struts-config.xml where I should have been using:org.apache.struts.validator.DynaValidatorForm instead of org.apache.struts.action.DynaValidatorForm.

Adam Hardy wrote:

DynaValidatorForm dynaForm = (DynaValidatorForm) form;
String value = (String) dynaForm.get("myFieldName");



On 04/09/2004 02:52 PM Brad Balmer wrote:

Using the DynaValidatorForm, how do you get the form variable data out of the form inside the action? All examples I've seen are purely the setup and none show the action getting the values.

My struts-config.xml:
       <form-bean
           name="loginForm"
           type="org.apache.struts.action.DynaValidatorForm">
           <form-property name="username" type="java.lang.String"/>
           <form-property name="password" type="java.lang.String"/>
       </form-bean>

My validation.xml:
 <form name="loginForm">
   <field property="username" depends="required">
     <arg0 key="label.username"/>
   </field>
   <field property="password" depends="required">
     <arg0 key="label.password"/>
   </field>
 </form>


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to