struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sujay D'Souza <sadso...@yahoo.com>
Subject re: Velocity. Validator and Indexed Properties
Date Tue, 18 Feb 2003 13:10:17 GMT
Thank you for the reply.

Yup am using dynabeans. Actually validation works just
fine, and populating the Value Object from the form
(velocity template) works just fine too. My only
problem is when after validation occurs, how do i keep
or retain values for each form attribute since they
are indexed? When i initially setup the form bean
(dynabean) within the struts-config file i use a
primitive string array like below(its a dynamic form
storing dependents), and population, and validation
work fine. Below is a snip from the Velocity template.
I think velocity doesn't support primitive array just
ArrayList - which is where the problem occurs in
displaying the value back. Hope its a bit clear now.
Thank once again for the reply.

Sujay 

<form-property name="firstname" 
type="java.lang.String[]"/>

<form-property name="lastname"
type="java.lang.String[]"/>


---- Velocity Template -------

<input type="text" name="firstname" size="20"
maxlength="20" value="$!dependentForm.firstname">

<input type="text" name="lastname" size="20"
maxlength="20" value="$!dependentForm.lastname">




 --- Ted Husted <ted@husted.com> wrote: >  > Does
anybody have any tips for getting the
> validation portion working
>  > along with vel-struts.
> 
> I'm using the Velocity View Tools for Struts with
> the Validator and 
> conventional beans without a problem.
> 
> What happens if you just fail validation without
> using the validator?
> 
> Or use conventional ActionForms instead?
> 
> I'm guessing it's a dynabean issue.
> 
> You might also try slipping a conventional JSP in,
> just to confirm that 
> everything else is working right.
> 
> -Ted.
> 
> -- 
> Ted Husted,
> Struts in Action
> <http://husted.com/struts/book.html>
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
>  

______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca

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


Mime
View raw message