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.
To accomplish what you asked you would have to use javascript in your results page to cause another window to be opened upon the onload event of the results page.
Your suggestion to display a message sound good to me too. My question is, I get the boolean value true / false when the record is updated. How will I access this variable in the javascript or jsp pages?
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.