Hi,
do you use preserveDataModel="true" in your dataTables? If not, the
problem might origin from this case.
In which scope do you have defined this bean?
I prefer setting it to request scope wherever possible, and if needed
extending the life of the bean via serializing it with t:saveState
(value is the name of the bean).
cheers,
Gerald
On 9/25/06, Vivek Pandey <[EMAIL PROTECTED]> wrote:
Hi
I was earlier using MyFaces 1.1.1 and am trying to move to 1.1.3 right now.
I am getting numerous serialization issues which I am fixing one by one.
However I am stuck at a point from where I am not able to go forward. My
page renders the first time but whenever I request it again (by clicking on
the sort button for example in the datatable) my viewroot becomes NULL. In
the logs, I see this...
DEBUG - jsp.JspStateManagerImpl - Processing deserializeView - deserializing
serialized state. Bytes : 21335
DEBUG - jsp.JspStateManagerImpl - Tree structure restored from server
session
DEBUG - jsp.JspStateManagerImpl - Exiting restoreTreeStructure
DEBUG - jsp.JspStateManagerImpl - Entering restoreComponentState
ERROR - lifecycle.PhaseListenerManager - Exception in PhaseListener
RESTORE_VIEW(1) afterPhase
java.lang.NullPointerException
at
org.apache.myfaces.renderkit.html.util.AutoScrollPhaseListener.afterPhase(Lj
avax.faces.event.PhaseEvent;)V(AutoScrollPhaseListener.java:52)
at
org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(
Ljavax.faces.event.PhaseId;)V(PhaseListenerManager.java:89)
at
org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(Ljavax.faces.context.
FacesContext;Lorg.apache.myfaces.lifecycle.PhaseListenerManager;)Z(Lifecycle
Impl.java:181)
at
org.apache.myfaces.lifecycle.LifecycleImpl.execute(Ljavax.faces.context.Face
sContext;)V(LifecycleImpl.java:66)
Oddly enough there is no "Exiting restoreComponentState" log message which
leads me to assume the method restoreComponentState failed somewhere in
between. But I cannot make out the reason why.
It maybe that deserialization is not happening properly (and that too most
probably for the datatable component in my page). My guess is it is because
I am using an aliased bean for my datatable and the value field for the
datatable is set to a ListDataModel field variable in the actual bean that I
am setting to the aliasbean. But how do I begin to find out the problem ?
The log messages as well as going through code in JspStateManagerImpl is not
of much help.
Pleas help.
--
http://www.irian.at
Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German
Professional Support for Apache MyFaces