File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes updating table in calling page after closing a dialog Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSF
Reply Bookmark "updating table in calling page after closing a dialog" Watch "updating table in calling page after closing a dialog" New topic
Author

updating table in calling page after closing a dialog

Daniel Conner
Ranch Hand

Joined: Jan 25, 2007
Posts: 47
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?
Eugene Abarquez
Ranch Hand

Joined: May 18, 2006
Posts: 211
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.


There's so much to learn in this industry, and not everybody has the necessary interest.
Remko Strating
Ranch Hand

Joined: Dec 28, 2006
Posts: 893
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.


Remko (My website)
SCJP 1.5, SCWCD 1.4, SCDJWS 1.4, SCBCD 1.5, ITIL(Manager), Prince2(Practitioner), Reading/ gaining experience for SCEA,
Gabriel Claramunt
Ranch Hand

Joined: May 26, 2007
Posts: 375
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.


Gabriel
Software Surgeon
 
 
subject: updating table in calling page after closing a dialog
 
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture