One work around that doesn't require you to place your Collection in the
session is to make the input attribute value of your action element  equal
to your "setup" action for the page.
Another thing to think about is if your Collections are composed of static
data,
place them in the ServletContext when your web application starts up and
then a
single copy is available to all users.

robert

> -----Original Message-----
> From: Joe @ Team345 [mailto:[EMAIL PROTECTED]
> Sent: Saturday, September 13, 2003 9:26 AM
> To: Struts Users Mailing List
> Subject: Re: Validator, DynaForms, and Collections
>
>
> Thanks David. This was the only "workaround" I could think of as well.
> Yet it doesn't make sense to me - why are all the non-Collection fields
> on the form maintained (i.e. upon returning the input page text fields,
> etc. are all populated with previous values), but the Collections are not?
>
> Anyone know?
>
> David Graham wrote:
>
> >Make sure your collection is stored in the session.  If it's in the
> >request you will lose it when returning to the input page.
> >
> >David
> >
> >--- Joe at Team345 <[EMAIL PROTECTED]> wrote:
> >
> >
> >>Hi,
> >>
> >>I'm using the Struts Validator (version 1.1 release) on
> >>DynaValidatorForms.
> >>Everything seems to work just fine on forms that don't have collections
> >>on
> >>them.  However, several of my forms have pull-down lists where I do
> >>something like:
> >>
> >><bean:define id="reasons" name="MyFormName" property="reasonCodes" />
> >><html:select property="selectedReason" >
> >>    <html:options collection="reasons" property="value"
> >>labelProperty="label"
> >>/>
> >></html:select>
> >>
> >>Without validation everything works perfectly.  When validation is
> >>enabled
> >>and control returns to this form (because of invalid input), I get a
> >>null
> >>access error for the bean:define.
> >>
> >>Anyone else see such behavior and/or know how to fix it?
> >>
> >>I tried using <html:optionsCollection...> instead (to eliminate the
> >>bean:define).  However, this just results in a different error:  failed
> >>to
> >>obtain specified collection.   Thus, I think there is a problem with
> >>combining the three things listed in the subject.
> >>
> >>Sorry for being so long winded - especially on a Friday!
> >>
> >>any help appreciated,
> >>
> >>Joe Gamache
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >
> >
> >__________________________________
> >Do you Yahoo!?
> >Yahoo! SiteBuilder - Free, easy-to-use web site design software
> >http://sitebuilder.yahoo.com
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to