How to combine Client and Server-side Events?

Hello all,

I want to run some actions when user clicks a radio button.

the action will firstly be client side (i.e. a java script function) then server side (a method in a the java behaviour class)

the client side script is as follows:

function onClickCtrl(source) {

....

postServerEvent(null, null, null, "onClickDisplayCompany");

}

and in java class

public void onClickDisplayCompany(com.documentum.web.form.Control c, com.documentum.web.common.ArgumentList args)
    {


        DfLogger.debug(this, "onClickDisplayCompany", null, null);

    }

The client side ran fine. but I get the following error message when it tries to run the server-side script.

invokeMethod() failed trying to call:  onClickDisplayCompany( com.documentum.web.form.Control,  com.documentum.web.common.ArgumentList )
class  java.lang.NoSuchMethodException

does anyone know what I have done wrong? may be I need to change the postServerEvent to the following?

postServerEvent(null, null, null, "onClickDisplayCompany", null, null);

thanks.

Best Answer

Answers

  • dnvhariprasaddnvhariprasad Hari Prasad Dontu
    edited July 19, 2010

    do you have container in your component?

  • edited July 20, 2010

    thanks Rajalakshmi.

    the post helped and I was able to call the server-side action.

    dnvhariprasad,

    yes I do have container.

  • Can you please post the content of above link here. Old link does not work. I want to call server side event from JS inside a JSP page but not sure what is issue. Getting error message cannot call method. Same as above

Sign In or Register to comment.