Display popup when there are unsved inputs on dropdown change in JSF

168 views Asked by At

How to display of popup when any of the two dropdowns selection changed and input values are modified using JSF. I am using valuechangelistener. I have added a flag in my Mbean, if any of the input changes, this flag will be true. on change of the value of the dropdown, if this flag is true I need to show popup, but this is not coming

1

There are 1 answers

3
sofarsoghood On

If you're using the<f:ajax/> tag inside of your dropdowns the following code snippet (especially the "onevent" attribute) might be useful:

   <f:ajax render="itemsDataTable" 
    onevent="function(data) { if (data.status === 'success') { 
   alert('it works') ;} }"/>