myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stan Carney <stan.java....@moohoffa.com>
Subject Re: [Myfaces 1.1.5] Myfaces always saving state in client?!
Date Mon, 11 Jun 2007 01:44:08 GMT
I'm not sure of what the JSF spec says or the intentions of the MyFaces 
developers but I have observered when the state is set to server 
,javax.faces.ViewState is rendered but it only contains the viewId and 
the sequence. No state information. All the state information is stored 
in the StateManager and pushed into the HttpSession.

This caused me similar problems when trying to create a mechanism for 
AJAX enabled pages to interact with JSF forms without using components. 
My solution was to recreate the ViewState by using some internal MyFaces 
classes to do it and have taconite update the value of 
javax.faces.ViewState on the client. If I didn't the sequence number 
would be wrong and on form submission the wrong state information would 
be recreated and used.

Would be nice to get some clarification.

Thanks,
Stan


CasMeiron wrote:
> Hi, i have a problem, i already set the parameter in my web.xml 
> "javax.faces.STATE_SAVING_METHOD" to "server" but myfaces keep 
> rendering the javax.viewState into client, why?! With 1.1.5-SNAPSHOT i 
> had no problem. And, i saw this in source code:
>
> HtmlFormRendererBase:
>  
>         //write state marker at the end of the form
>         //Todo: this breaks client-side enabled AJAX components again 
> which are searching for the state
>         //we'll need to fix this
>
> Myfaces write now a STATE MARK and later this is replaced by state 
> bytes, how can i discover what id/name of element myfaces used to 
> render the state?! (ajax problem).
>
> Tkz.
> -- 
> Paulo Cesar Silva Reis
> -------------------------------
> Powered by GMAIL 


Mime
View raw message