velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David You <David....@hds.com>
Subject RE: Struts Javascript Validators
Date Wed, 10 Nov 2004 19:08:43 GMT
Well, I mentioned in the first email, you need the name="simpleSearchForm"
not only in the submit action( Which is for the server validation), you also
need it in the action where you put you search parameters(For the javascript
validator).
Also the input name parameter is CASE sensitive(I fell for this one also).


David


-----Original Message-----
From: Eric Fixler [mailto:fix@fixler.com] 
Sent: Wednesday, November 10, 2004 10:54 AM
To: Velocity Users List
Subject: Re: Struts Javascript Validators

Thanks for the reply...


On Nov 10, 2004, at 9:56 AM, David You wrote:
> Not this one, mention the bean in the Actionmapping with
> name="simpleSearchForm"
>

It's mentioned in an action mapping here:

<action
	path="/simpleSearch"
	type="org.smete.exploratorium.action.SearchAction"
	name="simpleSearchForm"
	scope="request"
	validate="true">
</action>

But, if my mental model of things is correct, the actionmapping isn't 
referenced until the request is submitted, i.e. after the [dynamic] 
javascript has already been written. (I tried adding an 'input' 
parameter in the action, but this had no effect either)

BTW, validate true/false has no effect, I believe this refers to 
server-side validation.

thanks...still trying
eric



> -----Original Message-----
> From: Eric Fixler [mailto:fix@fixler.com]
> Sent: Wednesday, November 10, 2004 9:21 AM
> To: Velocity Users List
> Subject: Re: Struts Javascript Validators
>
> It's already there...if you mean this [the form name is
> simpleSearchForm]
>
>   <form-bean
>      	name="simpleSearchForm"
>      	type="org.apache.struts.validator.DynaValidatorForm">
>      	<form-property name="keyword" type="java.lang.String"/>
>   </form-bean>
>
> eric
---------------------------------------------------------------------
Eric Fixler
fix@fixler.com


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

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


Mime
View raw message