You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Dennis Byrne <de...@dbyrne.net> on 2006/03/28 10:11:03 UTC

Preserving non-value client side view state

I would like to know if anyone out there has had success preserving non-value view state. In plain English, I want to be able to programmtically 
change the style class or disabled attribute of a control w/ javascript,
and have these changes preserved on the next post back. Even better would be to preserve client side creation/removal of HTML elements.

The best idea I have so far is to intercept the form submit w/ an event handler that crawls the DOM, recording what it observes in an XML document that is stored in a hidden field just before the POST. Then on the server, just after the view has been restored the "old fashioned way", the non-value attributes are placed upon the newly restored view state. 

Please let me know if anything like this has already been implemented in OS, as I would like to avoid creating this for a client.

Dennis Byrne