On 8/22/05, Rick Reumann <[EMAIL PROTECTED]> wrote:
> David Haynes wrote the following on 8/22/2005 3:57 PM:
> 
> > public List getList() {
> >    List list = populateList();
> >    return list;
> > }
> >
> > The getList would be invoked during the jsp:useBean wouldn't it?
> >
> > I'm probably missing something obvious here, but this seems so much
> > simpler.
> 
> I would think that I should be able to do this easily without having to
> use jsp:useBean? Heck, it seems like I'm taking two steps backwards
> now:) Funny how with Struts the goal was to move 'away' from making any
> calls to your business objects from the view.  JSF seems to encourage
> this? Trust me, I don't mind this - as long as it's clean and easy to
> maintain. Sort of funny, though, that if someone proposed this on the
> Struts list (having a JSP make a useBean call in order to get a List in
> scope) people would have a cow.
> 

I wouldn't suggest using <jsp:useBean> at all in this scenario.  Put
the getList() method on your backing bean that contains the event
handlers for that page, which would be registered as a managed bean
(in request scope).  Then, you can use value binding expressions to
connect your components to the list values.

The only thing I would do differently from David's example is put the
populateList() call in prerender(), instead of in the getter method.

Craig

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

Reply via email to