You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Justin Miller <ju...@gmail.com> on 2008/06/17 17:34:46 UTC

[ORCHESTRA] problems with master/detail pages

I have two screens in a master/detail type setup.

Both of those pages access the same two managed beans, yet I find that on
the first access of the detail screen, one of the beans is removed from the
conversation. Therefore, when I try and access anything on the detail page,
I get a null pointer. If I try it again, subsequent accesses works.

Any thoughts what could be wrong?

This seems like a pretty standard scenario and usage.

Thanks in advance,
Justin

Re: [ORCHESTRA] problems with master/detail pages

Posted by Justin Miller <ju...@gmail.com>.
I just looked at:

http://www.nabble.com/orchestra-conversation-closed-by-stylesheet-td16350445.html

Could the reason this statis resource is being picked up by the JSF
lifecycle have anything to do w/ path mapping vs. extension mapping? For
instance, my faces-servlet is mapped to /faces/* rather than *.jsf. I might
try switching to extension mapping, although I thought for some reason, for
some library I'm using - maybe richfaces - something required path mapping.

Is your post from the link above what you are referring to when you suggest
ignoring those resources?

Justin

On Tue, Jun 17, 2008 at 12:50 PM, simon <si...@chello.at> wrote:

> Yep, that looks like the cause. Presumably one of your beans is in
> "access" scope, while the other is not? And it is the one in access
> scope that is disappearing?
>
> Some libraries have the habit of rendering resources (css, javascript,
> etc) by running a complete JSF lifecycle. Orchestra sees that just like
> a normal view access which doesn't use the access-scoped bean. Therefore
> it flushes it.
>
> There is a feature in Orchestra to configure a set of views to ignore.
> It is really intended to be used for skipping things like "ping"
> requests that some apps use to keep sessions alive. But it can also be
> used to ignore "resource" requests.
>
> I don't remember exactly how to specify views to ignore but I'm sure it
> is documented on the orchestra site.
>
> Regards,
> Simon
>
> On Tue, 2008-06-17 at 12:16 -0400, Justin Miller wrote:
> > Update:
> >
> > I'm using RichFaces. After turning on orchestra debug logging,
> > Orchestra appears to clear an access scoped conversation when it
> > renders:
> >
> > org/richfaces/renderkit/html/css/dragIndicator.xcss
> >
> > This css file doesn't appear to be rendered every time the page loads,
> > which would explain why it's generally just the first page load that I
> > get the null pointer.
> >
> > Does that help any?
> >
> > On Tue, Jun 17, 2008 at 11:34 AM, Justin Miller
> > <ju...@gmail.com> wrote:
> >         I have two screens in a master/detail type setup.
> >
> >         Both of those pages access the same two managed beans, yet I
> >         find that on the first access of the detail screen, one of the
> >         beans is removed from the conversation. Therefore, when I try
> >         and access anything on the detail page, I get a null pointer.
> >         If I try it again, subsequent accesses works.
> >
> >         Any thoughts what could be wrong?
> >
> >         This seems like a pretty standard scenario and usage.
> >
> >         Thanks in advance,
> >         Justin
> >
>
>

Re: [ORCHESTRA] problems with master/detail pages

Posted by simon <si...@chello.at>.
Yep, that looks like the cause. Presumably one of your beans is in
"access" scope, while the other is not? And it is the one in access
scope that is disappearing?

Some libraries have the habit of rendering resources (css, javascript,
etc) by running a complete JSF lifecycle. Orchestra sees that just like
a normal view access which doesn't use the access-scoped bean. Therefore
it flushes it.

There is a feature in Orchestra to configure a set of views to ignore.
It is really intended to be used for skipping things like "ping"
requests that some apps use to keep sessions alive. But it can also be
used to ignore "resource" requests.

I don't remember exactly how to specify views to ignore but I'm sure it
is documented on the orchestra site.

Regards,
Simon

On Tue, 2008-06-17 at 12:16 -0400, Justin Miller wrote:
> Update:
> 
> I'm using RichFaces. After turning on orchestra debug logging,
> Orchestra appears to clear an access scoped conversation when it
> renders:
> 
> org/richfaces/renderkit/html/css/dragIndicator.xcss
> 
> This css file doesn't appear to be rendered every time the page loads,
> which would explain why it's generally just the first page load that I
> get the null pointer.
> 
> Does that help any?
> 
> On Tue, Jun 17, 2008 at 11:34 AM, Justin Miller
> <ju...@gmail.com> wrote:
>         I have two screens in a master/detail type setup.
>         
>         Both of those pages access the same two managed beans, yet I
>         find that on the first access of the detail screen, one of the
>         beans is removed from the conversation. Therefore, when I try
>         and access anything on the detail page, I get a null pointer.
>         If I try it again, subsequent accesses works.
>         
>         Any thoughts what could be wrong?
>         
>         This seems like a pretty standard scenario and usage. 
>         
>         Thanks in advance,
>         Justin
> 


Re: [ORCHESTRA] problems with master/detail pages

Posted by Justin Miller <ju...@gmail.com>.
Update:

I'm using RichFaces. After turning on orchestra debug logging, Orchestra
appears to clear an access scoped conversation when it renders:

org/richfaces/renderkit/html/css/dragIndicator.xcss

This css file doesn't appear to be rendered every time the page loads, which
would explain why it's generally just the first page load that I get the
null pointer.

Does that help any?

On Tue, Jun 17, 2008 at 11:34 AM, Justin Miller <
justin.adam.miller@gmail.com> wrote:

> I have two screens in a master/detail type setup.
>
> Both of those pages access the same two managed beans, yet I find that on
> the first access of the detail screen, one of the beans is removed from the
> conversation. Therefore, when I try and access anything on the detail page,
> I get a null pointer. If I try it again, subsequent accesses works.
>
> Any thoughts what could be wrong?
>
> This seems like a pretty standard scenario and usage.
>
> Thanks in advance,
> Justin
>

Re: [ORCHESTRA] problems with master/detail pages

Posted by simon <si...@chello.at>.
On Tue, 2008-06-17 at 11:34 -0400, Justin Miller wrote:
> I have two screens in a master/detail type setup.
> 
> Both of those pages access the same two managed beans, yet I find that
> on the first access of the detail screen, one of the beans is removed
> from the conversation. Therefore, when I try and access anything on
> the detail page, I get a null pointer. If I try it again, subsequent
> accesses works.
> 
> Any thoughts what could be wrong?
> 
> This seems like a pretty standard scenario and usage. 

This sounds a lot like the simple example in the orchestra examples
project. Running that and looking at the code might help.

You can check out:
http://svn.apache.org/repos/asf/myfaces/orchestra/trunk/examples/
(See comments in the pom.xml file)

You will probably need to put the commons snapshot repository in your
maven settings file as this example project uses a tomahawk snapshot.

If you still can't figure it out, then you'll need to provide some more
details (spring config file, jsp/facelets pages).

Regards,
Simon