The way I handled this situation was to create a method called
populateLists() in the form. I then call this method from 2 places:
1. The action, as myForm.populateLists()
and 2. from the validate method in the form, incase validation fails and the
action is never invoked.

populateLists(), fcourse, is the method that sets the lists up, to be used
by html:select/option
HTH,
Pankaj


-----Original Message-----
From: Yaman Kumar [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 15, 2001 6:32 AM
To: [EMAIL PROTECTED]
Cc: Struts-User-Help@Jakarta. Apache. Org
Subject: Most interesting question.


Hi,
I have a problem in rendering data from an object that is
bound to request object in myaction class.
      request.setAttribute("myVector",results);
and that is fetched and put it in html select component in myJSP.

        <jsp:useBean id="myVector" class="java.util.Vector" scope="request"
/>

        <html:select property="selectStatus">
        <html:options collection="myVector" property="value"
labelProperty="label"/>
      </html:select>
So far this is fine..
When I'm validating the form that is in myJSP.jsp
and if it finds any errors the same page(myJSP.jsp) is supplied back to
user,
but i am not able to see the data in select box again,

How could i get the data that is in myVector instance as it is bound to
request.
or How could i retain the data in select box.

I can't bind myVector object to session scope.
Can any one help me out in this?

Many Thanks,
rayaku


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

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

Reply via email to