Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 43056 invoked from network); 1 Nov 2006 15:36:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Nov 2006 15:36:19 -0000 Received: (qmail 28089 invoked by uid 500); 1 Nov 2006 15:36:17 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 28065 invoked by uid 500); 1 Nov 2006 15:36:17 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 28054 invoked by uid 99); 1 Nov 2006 15:36:17 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Nov 2006 07:36:17 -0800 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of niall.pemberton@gmail.com designates 66.249.82.226 as permitted sender) Received: from [66.249.82.226] (HELO wx-out-0506.google.com) (66.249.82.226) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Nov 2006 07:36:04 -0800 Received: by wx-out-0506.google.com with SMTP id s9so2653467wxc for ; Wed, 01 Nov 2006 07:35:44 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=aKAPeZr/xpxcetahu4BXWwiDwcH1/w48drOUZxN1J5uEb+ira53p4ayoNRPdR7JxPSJelamAPWR1amzQ7/OLaMG/0bG3Pr6lW47h1S63lDXSc+M2doPYfeuAt2oMPKXhTKtFdC1FsB3zLMW231/7e9OQo/8BhH6fapcZH2ZbRsE= Received: by 10.90.72.10 with SMTP id u10mr3244914aga; Wed, 01 Nov 2006 07:35:44 -0800 (PST) Received: by 10.90.65.9 with HTTP; Wed, 1 Nov 2006 07:35:44 -0800 (PST) Message-ID: <55afdc850611010735i6c48a6dcsb288c97aa0689eb2@mail.gmail.com> Date: Wed, 1 Nov 2006 15:35:44 +0000 From: "Niall Pemberton" To: "Struts Users Mailing List" Subject: Re: reset method with DyanValidatorForm In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Checked: Checked by ClamAV on apache.org 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 {...} > > 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 elements and it will reset the values to whatever is (or isn't) specified by the "initial" attribute. Something like the following: Niall > -- > Wendy --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org