-
1. Re: Conditional rerender post a4j:command link action
user1234 Dec 19, 2009 4:16 AM (in response to cwagnor)1 of 1 people found this helpfulyou 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.
-
2. Re: Conditional rerender post a4j:command link action
user1234 Dec 19, 2009 4:19 AM (in response to user1234)Note:if you don't want to show sucessful message, then check by javascript if that hidden h:inputText value is sucess , then instade of showing sucessful message panel , just click a another hidden a4j:commadButton there specify the grid id in reRender attribute.1 of 1 people found this helpful -
3. Re: Conditional rerender post a4j:command link action
nbelaevski Dec 19, 2009 8:34 AM (in response to cwagnor)Hi Chris,
You can bind reRender to your bean:
reRender="#{yourBean.someProp}"
And set this property in your action/actionListener code.
-
4. Re: Conditional rerender post a4j:command link action
cwagnor Dec 19, 2009 10:05 AM (in response to cwagnor)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.
Thanks again
~Chris