struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ambaris Mohanty" <ambaris.moha...@lifestylestores.com>
Subject RE: Extending DynaValidatorForm
Date Mon, 11 Jun 2007 05:09:14 GMT
My code is as following...
struts-config.xml

<form-beans>
        <form-bean name="DynaLoginForm"
type="org.apache.struts.validator.DynaValidatorForm">
            <form-property name="username" type="java.lang.String"/>
            <form-property name="password" type="java.lang.String"/>
        </form-bean>

-----Original Message-----
From: David Durham, Jr. [mailto:david.durham.jr@gmail.com] 
Sent: Saturday, June 09, 2007 2:46 AM
To: Struts Users Mailing List
Subject: Re: Extending DynaValidatorForm

On 6/8/07, David Durham, Jr. <david.durham.jr@gmail.com> wrote:
> On 6/8/07, Ambaris Mohanty <ambaris.mohanty@lifestylestores.com> wrote:
> > Please someone send me the sample code for extending DynaValidatorForm
and
> > implementing the reset method. I have no idea on how to do it. Please
help.
> > I'm using struts 1.2.9.
> > Thank you,
>
>
> HTML has the concept of a reset button:
>
>    http://www.w3.org/TR/html401/interact/forms.html#reset-button
>
> ...

Hmm, guess you were asking about extending DynaValidatorForm.  I must
have been thinking of some other question that was similar to this
one.  Anyway, a DynaValidatorForm is a DynaBean, so you can call
set("propertyName", "reset Value") from your reset override method.
These API versions aren't exact, but I don't think these classes have
changed much:

http://struts.apache.org/1.3.8/apidocs/org/apache/struts/validator/DynaValid
atorForm.html
http://jakarta.apache.org/commons/beanutils/commons-beanutils-1.6.1/docs/api
/org/apache/commons/beanutils/DynaBean.html

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message