ExecuteMethod Method

The ExecuteMethod method runs a method. You can use it to run a predefined or custom method that the presentation model contains. It makes sure Siebel Open UI runs all dependency chains for the method that it calls. For more information about dependency chains, see About Dependency Injection.

If the method that ExecuteMethod specifies:

  • Exists. It returns a value from the method that it specifies.

  • Does not exist. It returns the following string:

undefined 

It uses the following syntax:

this.GetPM().ExecuteMethod("method_name", arguments); 

where:

  • method_name is a string that identifies the name of the method that ExecuteMethod runs. You must use the AddMethod method to add the method that method_name specifies before you run ExecuteMethod. If the method that method_name specifies:

    • Exists. Siebel Open UI calls the method that method_name specifies, sends the arguments, gets the return value, and then sends this return value to the object that called the ExecuteMethod method.

    • Does not exist. The ExecuteMethod method does nothing.

  • arguments includes a list of one or more arguments where a comma separates each argument. ExecuteMethod sends these arguments to the method that method_name specifies. It sends these arguments in the same order that you list them in this argument list.

For examples that use InvokeMethod, see Customizing the Presentation Model to Delete Records and Customizing the Presentation Model to Handle Notifications.

For more information about using this method, see Life Cycle Flows of User Interface Elements.