jmasta 0 Light Poster

Hello everyone,

I have a table with a bunch of rows and columns. You choose an item, and then you can look at the properties of the item in a popup window. You can change some properties and then save, or you can cancel. If you cancel, the window should just close and the main page with the table should not refresh. However, I need to call the destroy method in the backing bean, otherwise when you choose a new item it displays the information of the last one.

Right now, when you close the popup, I have javascript grabbing a hidden <h:commandLink> with the bean's destroy method as the action and then click it. This submits the page, causing a refresh.

My question: Is there a way (using AJAX, or something else) to invoke a method from the backing bean without submitting the page?

Thank you,
Jmasta