Some <t:saveState> gotchas

MyFaces offers an alternative to putting JSF backing bean elements in session scope with its <t:savestate> tag. However, some colleagues and I recently ran into a couple of gotchas while we were trying to debug our usage of this tag:

1) If you use Facelets, and are employing a template, make sure your <t:savestate> declaration is in a place in the template that won’t be replaced by client code.

2) To have <t:savestate> work properly, you must have the form submit. Just jumping to another page via a link will not work. Use <h:commandbutton> or <h:commandlink> instead.


About buffalobillion

Web Developer, JavaScript Balrog, Java dude, Ruby/Rails enthusiast. Guitar Playa.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s