Ok, ill try to explain in better way:
AJAX goes to the server and update the model, server response xml and update the client, i hav tags in my jsp like saveState (save the state of object), its a tomahawk component, the jsf_sequence goes with AJAX, i need save the view state using that sequence, because another sequence will be back to the client.
When client go with normal request (get, post), the server doenst restore my previous state (because i think ajax ended the lifecycle first).
Some time ago, i did something like this:
Map map = context.getExternalContext().getRequestMap();
Integer sequence = (Integer) map.get(RendererUtils.SEQUENCE_PARAM);
if (sequence == null || sequence == 1) {
logger.warn("JSF_SEQUENCE error");
} else {
sequence--;
synchronized (context.getExternalContext().getSession(true)) {
context.getExternalContext().getSessionMap().put(
RendererUtils.SEQUENCE_PARAM, sequence);
}
synchronized (map) {
map.put(RendererUtils.SEQUENCE_PARAM, sequence);
}
}
context.getApplication().getStateManager().saveSerializedView(
context);
The code back the jsf_sequence and i dont touch in the jsf_sequence on cliente, so when client post with normal away, everything is fine because faces saved the last view in that sequence. I dont wanna do that again, i wanna discover a soft way.
tkz.
Message was edited by:
CasMeiron