myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Igor Couto" <couto.i...@gmail.com>
Subject SerializedViewCollection and State Management
Date Sun, 30 Jul 2006 13:27:32 GMT
Hi guys,

For some reason (developing a kind of ajax component with myfaces), i
have an UIViewRoot updated that won't have saved by StateManager,
because of setResponseComplete(that i call further):

Example:

UiViewRoot newView = context.getViewRoot();
//I can have a serializable view too... (i made a lot of tests)
StateManager.SerializedView newViewSerialized =
getSerializedView(context) //this get is a own method;

The saved view root:
JspStateManagerImpl impl = (JspStateManagerImpl)
context.getApplication().getStateManager();
UIViewRoot viewOld =
impl.restoreView(context,context.getViewRoot().getViewId(),context.getViewRoot().getRenderKitId());

New view and oldView has component states different.

I try:
1) context.getApplication().getStateManager().writeState(context,newView);
2) impl.saveSerializedView(context);

But none works.

I know that's all the serializable views are on
ExternalContext.getSessionMap, but on the 1.1.3 the value is a
SerializedViewCollection (a protected class) so i cannot override the
values manually.

I really do need this, because a call (context.setResponseComplete),
so the states of the view are not updated by the default lifecycle.

If i call newView.processDecodes(context), the values are updated, but
the ActionEvent is called again.

Could anyone help me ?

Tks a lot!

Igor Couto
Delhi Consultoria

Mime
View raw message