struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sujay D'Souza <>
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.


<form-property name="firstname" 

<form-property name="lastname"

---- 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 <> 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
> <>
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Post your free ad now!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message