On 4/28/06, Bernhard Slominski <[EMAIL PROTECTED]> 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

Reply via email to