Here is an example of how to use DynaActionForm:
In struts-config.xml under <form-beans> tag:
<form-bean name="loginUserForm"
type="org.apache.struts.action.DynaActionForm" dynamic="true">
<form-property name="userName" type="java.lang.String" />
<form-property name="password" type="java.lang.String" />
</form-bean>
In the controller's execute method you have setup for this form:
public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception
{
DynaActionForm loginUserForm = (DynaActionForm) form;
String userName = form.get("userName");
String password = form.get("passWord");
}
Now the local variables userName and password would have the values entered
by the user on the loginForm.
Make sense?
Craig.
>From: "James Mitchell" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: RE: ActionForms
>Date: Thu, 5 Sep 2002 14:51:24 -0400
>
>Or...use DynaActionForm.
>
>See documentation for details.
>
>James RTFM Mitchell
>Software Engineer\Struts Evangelist
>Struts-Atlanta, the "Open Minded Developer Network"
>http://www.open-tools.org/struts-atlanta
>
>
>
>
> > -----Original Message-----
> > From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, September 05, 2002 1:41 PM
> > To: 'Struts Users Mailing List'
> > Subject: RE: ActionForms
> >
> >
> > Threaten it with replacement by .NET.
> >
> > -----Original Message-----
> > From: Smith, Johnathan M. [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, September 05, 2002 1:28 PM
> >
> > How can I make Struts automatically created a ActionForm
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
> >
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
Craig W. Tataryn
Programmer/Analyst
Compuware
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>