struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig McClanahan" <craig...@apache.org>
Subject Re: Where dose JSP works in JSF request lifecycle?
Date Fri, 28 Apr 2006 18:19:45 GMT
On 4/28/06, Bernhard Slominski <bernhard.slominski@zooplus.com> wrote:
>
> > So, how do you make sure that the right dynamic data gets
> > loaded so that the
> > page displays the right stuff?  That's where Shale comes in
> > handy.  If your
> > backing bean implements the ViewController interface, then
> > prerender() will
> > get called just before the JSP page is invoked.  This is the
> > perfect place
> > to grab any data you need from your database to display the
> > requested page.
> >
> > You can do this without Shale, but there's somewhat more pain
> > involved.
>
> So how would you do it in "plain JSF" without the ViewController?
> In the contructor?


The constructor logic is going to get called on a postback as well as when a
page is rendered, so you would need to distinguish the two cases.  You also
would not want to do the data setup if you're actually going to havigate to
a different page instead.

See my previous answer in this thread about using a phase listener.

Bernhard


Craig

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message