Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to track changes made in a jsf form element.

843844Dec 12 2007 — edited Dec 14 2007
I am in a page and editing some form elements. I click on some other link which will take me to another page. Before moving to another page I want to check if there are some unsaved data in the page. If some form elements are edited, I want to throw a confirmation alert, if the user wants to move to the other page without saving the edited data.

This can be accomplished by having a hidden flag which will keep a track. On change of any element, a javascript function will be called to set the hidden flag. So before going to any page we can check the flag and throw an alert.

But this process will be needing much coding effort. Is there a way in JSF to track the change in a form by backing bean or some other process?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 11 2008
Added on Dec 12 2007
8 comments
839 views