Thanks james and vic.
I converted all my forms to DynaActionForm except one that use index
property.
here is more info
// In form (normal action form)
private ArrayList list; // hold my value object, that has ID & Label info
---- get/set method
---index property
public void setLabel(int index, Strig label){
MYVO vo = (MYVO)list.get(index)
vo.setLabel(label);
}
In my JSP file, I'm displaying label and user can modify those label. I
want to update only those label in database that user has modified.
Is this possible with DynamActionForm?
Deepak
-----Original Message-----
From: Struts Newsgroup [mailto:@[EMAIL PROTECTED]]
Sent: Tuesday, April 30, 2002 10:25 AM
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
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]>