This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am having a problem in tryign to get a pop up window.
When a user tries to update data in a table, teh action class calls a method that updates data. If teh table is updated, this method returns tru. Now, I would like to inform the user using a pop up window that the table has been updated. Can some one please let me know way to achieve this?
I would find that very frustrating if I, as a user, had to close a popup window every time I changed a table. I recommend displaying a message on the results screen instead. Just my 2cents.
A good workman is known by his tools.
Joined: Mar 11, 2004
Thanks Marc for your response.
One way to do this would be to instantiate an org.apache.struts.action.ActionMessages object, place an org.apache.struts.action.ActionMessage object in it using the add() method, and then calling the saveMessages() method from the Action class (It's declared in the Action superClass). Within your jsp, insert a <html:messages /> tag where you want the message to be displayed. It will only be displayed if there actually is a message to display.