my dog learned polymorphism*
The moose likes JSF and the fly likes How to find UI values are changed by the user or not? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "How to find UI values are changed by the user or not?" Watch "How to find UI values are changed by the user or not?" New topic
Author

How to find UI values are changed by the user or not?

Srinivas Bonala
Greenhorn

Joined: Feb 14, 2012
Posts: 15
thanks in advance...

Am new to JSF Technology and We have an application developed by JSF technology. In that we have scenario called editUserDetails.
When the user enter into edit scenario we will display all details of the user at the time of registration.

Few of this details will be displaying in input feilds and some of in checkboxes and some in selection fields.

My requirement is that we want to show a pop up when the user tries to changing the actual values.

Example:
If the user changed his username in the username field. and he tries to click on other link(goto home page or site map or FAQ's links)
in that page. When he changed something value and trying to click on any other link i want to
show the pop up with two buttons, one for save the changes button and second one for discard the
changes.

My question is how do we know that the actual values are changed by the user or not. If changed i want to display pop up else we need to navigate the user to the perticular link.

Can any one please give me a possible scenario how to do this.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15950
    
  19

If I read you correctly, what you want is all client-side processing, and the standard JSF tags don't provide a service like that.

You can, however, write JavaScript that attaches to each control and have the control's onchange method set a "dirty" flag. Then a link or submit button could test that flag and display a confirm dialog.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to find UI values are changed by the user or not?
 
Similar Threads
Need to work with more windows.
check whether the text box is filled with value or not
Click tracking in Java
Can I pass data from a JSP to popup window?
How to retain the values selected in the jsp page when traversing back from a pop up jsp?