You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by David Brunette <Da...@chordiant.com> on 2007/10/01 19:49:48 UTC

[Trinidad] Trouble updating Page Flow Scope during Render Response

 

     Hi...

 

     I have an application that is using the Page Flow Scope a bunch.
In many of our beans' getXyz() methods, we are fetching some data and
putting it in the Flow Scope for later requests to use.  A couple of
additions to one of our pages, which seemed to have nothing to do with
each other, ended up giving me some problems:  adding a <tr:inputText
value="#{myBean.theValue}" /> component whose getTheValue() method put
something in the Flow Scope, a <tr:inputDate /> component, and a button
that would open a dialog.  With that combination, the dialog opened
fine, but I got a NullPointerException when trying to close the dialog
and return to the parent.

 

     Long story made short, I tracked the problem down to the fact that
I was trying to put something into the Flow Scope during the Render
Response phase.  I finally found this thanks this really good comment on
the PageFlowScopeMap._detachIfNeeded() method.  It was a good comment
because it led me to the explanation of what was happening (the Flow
Scope tokens were getting confused, which caused problems when trying to
pop the Flow Scope on return to the parent page)... but I'm still unsure
about *why* it's necessary to detach the Flow Scope if we try to mutate
it during Render Response.  Could anybody please help me understand the
need for this so I can have a better idea of how to avoid this in the
future??

 

     Thanks...

 

Dave

The information transmitted herewith is sensitive      information of Chordiant Software or its customers and is intended only for use to the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon, this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.