You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shale.apache.org by Jason Vincent <jt...@gmail.com> on 2006/11/08 01:31:55 UTC

Session Scoped ViewController not calling prerender.

Hi all,

I recently upgraded to Shale 1.0.3 and now my session scoped view
controllers don't work.
I found that the prerender method is not getting called... ever -
(even if it was the first time the page was requested).

Any ideas?

Thanks,
Jason

Re: Session Scoped ViewController not calling prerender.

Posted by Craig McClanahan <cr...@apache.org>.
On 11/7/06, Kito D. Mann <km...@virtua.com> wrote:
>
>
> > Session scoped view controllers are not supported (the fact
> > that they sort of worked earlier was really a bug), and I
> > don't plan to support them as there are perfectly reasonable
> > workarounds (put the state information you need to save into
> > session scoped data beans, but keep your event handlers in a
> > request scoped view handler).
> >
> > And yes, this fact needs to be made VERY clear in the docs,
> > so shame on us for that :-)
> >
> >
> > Craig
>
> Craig,
>
> How about throwing an exception whenever a ViewController instance (or a
> class with a ViewController annotation) is instantiated via the MBCF?


That seems like an interesting idea ... fail fast instead of letting people
wonder why the methods did not get called.

(Another good reason to expose an API for accessing Faces config at
> startup).


You mean at the JSF spec level?  If so, I agree ... and with the JSF
1.2config being defined by a schema, plus the existence of JAXB,
there's not a
compelling "too hard to implement" rationale for not doing so :-).  On the
other hand, what should it be possible for the application to do, and when?
Having read-only access, for example, wouldn't help with this use case, but
read/write access *before* the runtime implementation processed the beans
would be interesting ... for example, the Tiger extensions could merge in
the annotation based settings, without having to basically re-implement
everything related to navigation and managed beans.

Craig


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Kito D. Mann (kmann@virtua.com)
> Author, JavaServer Faces in Action
> http://www.virtua.com - JSF/Java EE consulting, training, and mentoring
> http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info
> phone: +1 203-653-2989
> fax: +1 203-653-2988
>
>
>
>

RE: Session Scoped ViewController not calling prerender.

Posted by "Kito D. Mann" <km...@virtua.com>.
> Session scoped view controllers are not supported (the fact 
> that they sort of worked earlier was really a bug), and I 
> don't plan to support them as there are perfectly reasonable 
> workarounds (put the state information you need to save into 
> session scoped data beans, but keep your event handlers in a 
> request scoped view handler).
> 
> And yes, this fact needs to be made VERY clear in the docs, 
> so shame on us for that :-)
> 
> 
> Craig

Craig,

How about throwing an exception whenever a ViewController instance (or a
class with a ViewController annotation) is instantiated via the MBCF?

(Another good reason to expose an API for accessing Faces config at
startup).

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kito D. Mann (kmann@virtua.com)
Author, JavaServer Faces in Action
http://www.virtua.com - JSF/Java EE consulting, training, and mentoring
http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info
phone: +1 203-653-2989 
fax: +1 203-653-2988




Re: Session Scoped ViewController not calling prerender.

Posted by Craig McClanahan <cr...@apache.org>.
On 11/7/06, Jason Vincent <jt...@gmail.com> wrote:
>
> Hi all,
>
> I recently upgraded to Shale 1.0.3 and now my session scoped view
> controllers don't work.
> I found that the prerender method is not getting called... ever -
> (even if it was the first time the page was requested).


Session scoped view controllers are not supported (the fact that they sort
of worked earlier was really a bug), and I don't plan to support them as
there are perfectly reasonable workarounds (put the state information you
need to save into session scoped data beans, but keep your event handlers in
a request scoped view handler).

And yes, this fact needs to be made VERY clear in the docs, so shame on us
for that :-)

Any ideas?
>
> Thanks,
> Jason
>


Craig