943,955 Members | Top Members by Rank

Ad:
Jun 10th, 2009
0

Access bean method w/out submit

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
jmasta is offline Offline
26 posts
since Apr 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: "Automation server can't create object"
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: how to do interactive form validation





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC