Hi Jorge,
Thanks for the info, but in the JSP page, I would like to pass the result list
to the struts taglib, e.g.
<html:select property="profileName" onchange="submitProfileForm();">
<html:options collection="resultlist" property="name" />
</html:select>
how do i do that? thanks.
regards,
Jin S. Voon
Quoting "Jorge Ruiz (SX)" <[EMAIL PROTECTED]>:
> This is how to put it in your action:
>
> List resultList = someClass.getResultList( request );
> request.setAttribute("resultList", resultList);
>
> This could also be done by someClass.getResultList directly.
>
> This is how to get it in you JSP:
>
> List resultList = (List) request.getAttribute("resultList");
>
> Hope this helps.
>
> Cheers
>
> Jorge
> ----- Original Message -----
> From: "Jin Siong Voon" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Wednesday, January 16, 2002 7:07 PM
> Subject: Recommended method to pass back result to the JSP
>
>
> > Hi all,
> > I've been doing some poking around, and still can't decide on the
> method
> to use
> > to pass results back to the jsp page. this is the scenario:
> >
> > 1. click on something on jsp page, e.g. click on a category
> > 2. the appropriate action class will do perform(), which gets all
> the
> category
> > items based on the category id which was selected and put the result
> into
> a
> > list.
> > 3. the jsp page will render the categories (in a table) based on the
> list
> >
> > 3. the question is, where do i put the list? i've seen people putting
> it
> into
> > the session, and some people talked about putting it into the request.
> i
> don't
> > really fancy putting the list into the session as i believe we should
> keep
> the
> > session object small? so far i haven't seen any code as on how to put
> that
> into
> > the request object and how do i access that in the forwarded jsp?
> >
> > thanks for your help.
> >
> > Regards,
> > Jin S. Voon
> >
> > --
> > 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]>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>