On Tue, 30 Apr 2002, Struts Newsgroup wrote:
> Date: Tue, 30 Apr 2002 07:25:01 -0700
> From: Struts Newsgroup <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: DynaActionForm example
>
> Subject: Re: DynaActionForm example
> From: Vic Cekvenich <[EMAIL PROTECTED]>
> ===
> Err... just a note: I am not sure if Dynabeans is the best parctice.
> Regular beans isolate the application a bit better.
> my 2 c.
> Vic
>
OK Vic, I'll bite ... how is using a DynaBean for your form bean any
different than a standard ActionForm bean? The only difference I can see
is whether or not you have to write an extra class yourself, or let Struts
configure it dynamically.
Craig
>
> James Mitchell wrote:
> > The struts-example uses it for Logon.
> >
> >
> > struts-config.xml
> > -----------------------------------
> > ...
> > ...
> > <form-bean name="logonForm"
> > type="org.apache.struts.action.DynaActionForm">
> > <form-property name="username" type="java.lang.String"/>
> > <form-property name="password" type="java.lang.String"/>
> > </form-bean>
> > ...
> > ...
> > <!-- Process a user logon -->
> > <action path="/logon"
> > type="org.apache.struts.webapp.example.LogonAction"
> > name="logonForm"
> > scope="request"
> > input="/logon.jsp">
> > <exception
> > key="expired.password"
> >
> > type="org.apache.struts.webapp.example.ExpiredPasswordException"
> > path="/changePassword.jsp"/>
> > </action>
> > ...
> > ...
> >
> >
> >
> >
> > logon.jsp
> > --------------------------------------
> > <html:form action="/logon" focus="username">
> > <table border="0" width="100%">
> >
> > <tr>
> > <th align="right">
> > <bean:message key="prompt.username"/>
> > </th>
> > <td align="left">
> > <html:text property="username" size="16" maxlength="16"/>
> > </td>
> > </tr>
> >
> > <tr>
> > <th align="right">
> > <bean:message key="prompt.password"/>
> > </th>
> > <td align="left">
> > <html:password property="password" size="16" maxlength="16"
> > redisplay="false"/>
> > </td>
> > </tr>
> >
> > <tr>
> > <td align="right">
> > <html:submit property="submit" value="Submit"/>
> > </td>
> > <td align="left">
> > <html:reset/>
> > </td>
> > </tr>
> >
> > </table>
> >
> > </html:form>
> >
> >
> > LogonAction.java
> > --------------------------------------------
> > ...
> > ...
> > // Validate the request parameters specified by the user
> > ActionErrors errors = new ActionErrors();
> > String username = (String)
> > PropertyUtils.getSimpleProperty(form, "username");
> > String password = (String)
> > PropertyUtils.getSimpleProperty(form, "password");
> > ...
> > ...
> >
> >
> >
> > JM
> >
> >
> >
> >
> >
> >
> >>-----Original Message-----
> >>From: Parmar, Dipakkumar [mailto:[EMAIL PROTECTED]]
> >>Sent: Monday, April 29, 2002 11:38 PM
> >>To: Struts Users Mailing List
> >>Subject: DynaActionForm example
> >>
> >>
> >>can anyone point me the DynaActionForm example?
> >>i could not able to find it.
> >>
> >>Tx in advance.
> >>Deepak
> >>
> >>--
> >>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]>
> >
>
>
>
> --
> 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]>