struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Durham, Jr." <david.durham...@gmail.com>
Subject Re: Extending DynaValidatorForm
Date Mon, 11 Jun 2007 19:23:18 GMT
On 6/11/07, Ambaris Mohanty <ambaris.mohanty@lifestylestores.com> wrote:
> 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>


Is this something where just adding "initial" will work for you?

<form-property name="username" type="java.lang.String"
initial="&lt;username&gt;"/>

This will affect the behavior of an html-reset control, because it
determines the initial value of new form elements.

Otherwise, if you're going to actually override
DynaValidatorForm.reset, something like this might work for you
(method signature truncated) :

reset(mapping, request) {
   set("username", "<username>");
}

This is one step removed from the html-reset control, because it will
be executed within your servlet context, *not* from within a browser.

What's the actual problem you're trying to solve.

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


Mime
View raw message