You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Nabil Abdi <ab...@dialexia.com> on 2003/07/07 19:42:47 UTC

prepopulate a DynaActionForm

Hi,

I am using struts 1.1,
I want to prepopulate a DynaActionForm but my Action receive a null form:

my DynaActionForm configuration looks like :
<form-bean dynamic="true" name="pbxUserForm" type="org.apache.struts.action.DynaActionForm">
            <form-property name="email" type="java.lang.String" />
            .....
</form-bean>

and the Action config:

	  <action
            name="pbxUserForm"
            path="/users/showuser"
            scope="request"
            type="com.webapp.action.PopulateUserAction"
            validate="false">
            <forward name="next" path="/users/user.jsp" />
        </action>


in PopulateUserAction execute method i receive a null form ?

If i use an ActionForm instead of DynaActionForm the form is NOT null ?

Is there some extra setting i need.

Thank you







---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: prepopulate a DynaActionForm

Posted by Adam Hardy <ah...@cyberspaceroad.com>.
Have you got any exceptions logged or on the console?

Where did you get the dynamic="true" attribute from? I don't use it, & 
don't need it. What does it do?

Have you got the validating parameter set in web.xml for the action servlet?

<init-param>
       <param-name>validating</param-name>
       <param-value>true</param-value>
     </init-param>

Hope that helps.
Adam

Nabil Abdi wrote:
> Hi,
> 
> I am using struts 1.1,
> I want to prepopulate a DynaActionForm but my Action receive a null form:
> 
> my DynaActionForm configuration looks like :
> <form-bean dynamic="true" name="pbxUserForm" type="org.apache.struts.action.DynaActionForm">
>             <form-property name="email" type="java.lang.String" />
>             .....
> </form-bean>
> 
> and the Action config:
> 
> 	  <action
>             name="pbxUserForm"
>             path="/users/showuser"
>             scope="request"
>             type="com.webapp.action.PopulateUserAction"
>             validate="false">
>             <forward name="next" path="/users/user.jsp" />
>         </action>
> 
> 
> in PopulateUserAction execute method i receive a null form ?
> 
> If i use an ActionForm instead of DynaActionForm the form is NOT null ?
> 
> Is there some extra setting i need.
> 
> Thank you
> 
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org