CanInvokeMethod Method for Presentation Models

The CanInvokeMethod method that Siebel Open UI uses for presentation models determines whether or not Siebel Open UI can invoke a method. It returns one of the following values:

  • true. Siebel Open UI can invoke the method.

  • false. Siebel Open UI cannot invoke the method.

It uses the following syntax:

CanInvokeMethod(method_name) 

where:

  • method_name is a string that contains the name of the method that CanInvokeMethod examines. You must enclose this string in double quotation marks, or use a literal value of methodName.

For example, you can add the following code in a physical renderer to determine whether or not Siebel Open UI can call the method that method_name specifies, and if it can call this method on the control that control specifies:

var controlSet = this.GetPM().Get("GetControls");
for(var control in controlSet){
 if(controlSet.hasOwnProperty(control)){
 var caninvoke = this.GetPM().ExecuteMethod("CanInvokeMethod", controlSet[
 control ].GetMethodName());
 }
}

To avoid an error on the Siebel Server, it is recommended that you configure Siebel Open UI to use CanInvokeMethod immediately before it uses InvokeMethod to make sure it can call the method.

For information about the CanInvokeMethod method that Siebel Open UI uses for application models, see CanInvokeMethod Method for Application Models.

For more examples that use CanInvokeMethod, see the following topics: