[Logo]
Forums Register Login
updating table in calling page after closing a dialog
I have a JSF page that has a table full of data... In the table, there is a create new record button. By clicking on the create new record button a dialog is opened. Once you add the record and close the dialog box, the new record is added to the database, but the update is not shown in the table... Any idea on how to have the update to be shown in the table after the dialog is closed?
By dialog box do you mean a javascript dialog box? Did you try refreshing the page if it shows the new added record? You might have to find a way to do a page refresh programmatically after you close the dialog.
Just use a Ajax-request after you have done the update so the user wouldn't know that you're getting new values from the server.

I use AJAX4JSF for that.
IIRC, I had a similar problem, my solution: after the dialog is submitted (so the data is persisted) I send a "refresh" to the main page through javascript.
We're all out of roofs. But we still have tiny ads:
ScroogeXHTML 7.1 - RTF to HTML5 / XHTML converter
https://coderanch.com/t/690611/ScroogeXHTML-RTF-HTML-XHTML-converter


This thread has been viewed 1468 times.

All times above are in ranch (not your local) time.
The current ranch time is
Feb 18, 2018 10:43:55.