Craig McClanahan wrote:
On 11/29/06, *Naresh Bhatia* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
Hi Simon,
Thanks for a quick response.
When I said "navigates through a link", I had first tried h:commandLink.
However, as you mention below, it was posting back to page A and causing
an unnecessary database read (I was doing lazy loading in my bean and
since this was a brand new bean, it was hitting the DB for no good
reason).
FWIW, this is the kind of use case that Shale[1] tries to solve with the
view controller paradigm. The idea is that you put logic like this
database lookup into the prerender() method of the backing bean, which
will only be called if *this* is the view that will be rendered, not if
you navigated to somewhere else instead.
Craig
[1] http://shale.apache.org/
Is what you describe what Naresh really wants? I though he simply wants
a link on the page that navigates to another page without any logic
being processed on the backing bean for the current page.
Shale's view controller can be very useful, and can certainly be used as
you describe to avoid performing database access until the render phase,
but that's not quite the same thing.
Regards,
Simon