On 8/30/06, Jason Vincent <[EMAIL PROTECTED]> wrote:
Hi all, For the life of me I can't get JSF to stinkn forget values that were entered on a form. The view controller is "request" scope.
Are you using Shale for this? If so, you'd be best off joining the Shale user list, as Shale is now it's own top level project. See < http://shale.apache.org/mail-lists.html> for signup details. If I start to enter data in a form and then click the "Cancel" button,
which has immediate="true", the values entered by the user reappear in the form when I return to the page. The action of the Cancel button returns "home" which maps to a navigational rule to the home page that is a "redirect". I've tried these two things which haven't worked: 1) traverse the ViewRoot looking for UIInputs and setting the submitted value to null. 2) set the value binding to the VC managed bean to null. I had read that JSF will reuse evaluated expressions if they aren't null.
Setting the cancel button's immediate property to "true" is the right general behavior, because you want to bypass validation and model value updates. However, that should actually be irrelevant if you are redirecting to the new page. The only way I can think of that you should expect the behavior you describe is if you have bound components on the page to a bean that is in session scope, rather than request scope. Any help is greatly appreciated.
Jason --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Craig