struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "fea jabi" <>
Subject Re: reset method with DyanValidatorForm
Date Wed, 01 Nov 2006 16:36:18 GMT
Thanks. This forum has been great help to me.

we are using 1.2.7 so, can't use this nice feature yet.

But where can I get the new features added after 1.2.7 version from?

>From: "Niall Pemberton" <>
>Reply-To: "Struts Users Mailing List" <>
>To: "Struts Users Mailing List" <>
>Subject: Re: reset method with DyanValidatorForm
>Date: Wed, 1 Nov 2006 15:35:44 +0000
>On 1/6/06, Wendy Smoak <> wrote:
>>On 1/6/06, fea jabi <> wrote:
>> > So, I might have to reset the checkboxes now.
>> >
>> > Do, I have no other choice but to create a formbean Class with all the
>> > setter's and getter's and then add reset method too for it.
>> >
>> > or is there an easier way to do this using DynaValidatorForm?
>>You don't have to add the get/set methods.  Just extend
>>DynaValidatorForm and add the reset method -- then be sure to change
>>the type of the form in struts-config.xml to your new form type.
>>package com.example.myapp;
>>public final class AccountForm extends DynaValidatorActionForm
>>implements Serializable {...}
>>        <form-bean
>>             name="accountForm"
>>             type="com.example.myapp.AccountForm">
>Hubert added a new feature in Struts 1.3.x that allows you to
>configure "reset" behaviour on a property-by-property basis in the
>struts-config.xml - I believe you just  add reset="true" attributes to
>your <form-property> elements and it will reset the values to whatever
>is (or isn't) specified by the "initial" attribute. Something like the
>    <form-bean  name="fooForm" 
>        <form-property name="state"  type="java.lang.String"
>initial="INITIAL" reset="true"/>
>        <form-property name="unsubscribe" type="java.lang.String"
>initial="true" reset="true"/>
>    </form-bean>
>  </form-beans>
>To unsubscribe, e-mail:
>For additional commands, e-mail:

Get FREE company branded e-mail accounts and business Web site from 
Microsoft Office Live

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message