• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic