I think you should get the"ethnicityArray" (maybe from DB) again in every request and put it into the request (this may happen in validate method before it returns). No need for getter and setter methods.
----- Original Message -----
From: cahana
Sent: Monday, July 09, 2001 11:46 AM
Subject: Re: validation

I tried putting the "ethnicityArray" into my ActionForm class, so i made a getter and setter for it.  It shows up on the jsp form ok.  When i hit submit and a validation error occurs, i think i lose the array because the ActionForm falls out of scope and a new one is created to show the errors that occurred.  I have a setter method for "ethnicityArray", but the array doesn't get passed in with the request (on submit) because it's not associated with any input type fields.  This may be a stupid question, but is there a way to pass this object as a hidden field?
 
cameron
 
 
----- Original Message -----
Sent: Sunday, July 08, 2001 4:27 PM
Subject: Re: validation

You still put the "ethncityArray" into request but you should put in your ActionForm class, before the function validate return, instead of in the method perform of your Action class
Hope it helps
 
Quan
----- Original Message -----
From: cahana
Sent: Sunday, July 08, 2001 1:47 PM
Subject: validation

I have a jsp page that has input fields for personal information, so i made a PersonalInfoForm with all the setters and getters and a validate method.  On this jsp i also have a drop down list that gets created by an array of beans:
 
<html:select name="personalInfoForm" property="ethnicity" >
        <html:option value=""/>
        <html:options name="translateItem" collection="ethnicityArray" property="code" labelProperty="longdescr" />
</html:select>
 
I pass "ethncityArray", which is an array of TranslateItem beans, to this page via the request.  The problem i have is that when the validate method is called when i hit submit and an error occurs, it goes back to the jsp but the jsp can no longer find "ethnicityArray".  Subsequently an error is thrown.  Does anyone know how i can fix this, aside from putting it in the session?
 
cameron

Reply via email to