4 Replies Latest reply on Dec 19, 2009 10:05 AM by Chris Wagnor

    Conditional rerender post a4j:command link action

    Chris Wagnor Newbie

      Hi All

       

      I was going through all the online documentation and couldn't find solution to my problem.

      Is it possible to render or process different things depending on the output of a4j:commandButton or link?

       

      My scenario:

      I have a datalist where I display a few records. With each record I have "Delete" option. This link should delete the record in the database and refresh the current datalist. Currently my action associated with Delete link is returning void. However I want to explore options of where I can return a string value for failure/success and depending on the return value, I can either show modal window (for failure) OR reRender the datalist (for success).

       

      Any help will be appreciated to achieve this.

       

      Thanks

      ~Chris