1 Reply Latest reply on Mar 18, 2008 1:46 PM by Sergey Smirnov

    Modal Panel and Ajax

    Yohan Liyanage Newbie


      I am developing a web site which provides an online diary. In this, I want to allow users to edit their diary entries. The diary entries are shown in a DataTable and I have a Edit button.

      I want to use a Modal Panel to show the Edit form. However, I have to change the content of the fields of the form whenever a user clicks Edit for a perticular record.

      So, what I did was, I created my own JavaScript function and called it onclick event of Edit button. With in my javascript function, I call updateEdit(id_of_record), which is an a4j:jsFunction. So this method is supposed to create a Ajax call to my backing bean and rerender the Edit form with values related to requested record.

      Then, I call the showModalPanel method.

      However, when I executed this, all I get is a empty form without values. I can see that there's a Ajax request, but the fields are empty. I am wondering what went wrong.

      Any help, suggestion is appreciated.

      Thanks in advance.