1 of 1 people found this helpful
you can do this via a a4j:commandButton/a4j:command link .
on action goto the bean and there process the logic for delete . If the process is sucessful / failure you update a variable which is bindinded with UI h:inputText which is hidden [you have to give this in reRender attribute of a4j:commandButton/a4j:command link ]. now oncomplete of a4j:commandButton/a4j:command link you check for that hidden h:inputText value . if it is sucess then show a modal window with ok button for sucessful deletion, and click of the "ok" rerender the grid and close the modal window. Else if its faliure show another modal window with failure message , here on click of ok, don't rerender the grid.
You can bind reRender to your bean:
And set this property in your action/actionListener code.
Thanks Deb and Nick
Nick's solution seems very easy, I'll try this for sure. Actually never thought of doing it this way, this will solve some of my hacks on the UI.