Also, if you don't care that they keep the input already on the page, you
can put the input in the struts-config file as the loader class (whatever is
loading the collection onto the jsp).
so instead of your action looking like:
<action path="/action" type="com.blah.gum.actions.Action" name="myForm"
scope="request" input="input.jsp">
<forward name="success" path="/success.jsp"/>
</action>
it would read
<action path="/action" type="com.blah.gum.actions.Action" name="myForm"
scope="request" input="preInput.do">
<forward name="success" path="/success.jsp"/>
</action>
where preInput is the action that precedes the JSP.
Denis
----- Original Message -----
From: "Joe at Team345" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, September 12, 2003 11:30 AM
Subject: Validator, DynaForms, and Collections
> 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]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]