Skip Headers
Siebel CRM Configuring Siebel Open UI
Siebel Innovation Pack 2015
E52417-01
  Go to Documentation Home
Home
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
 
Next
Next
    View PDF

Life Cycle of User Interface Elements

This topic describes how Siebel Open UI uses presentation model methods and physical renderer methods, and the methods that the presentation model and physical renderer calls during the life cycle of a user interface element.

The presentation model uses the following sequence of methods:

  1. Init

  2. Setup

The presentation model processes the events that it receives from the physical renderer during the life cycle. It also processes the replies for requests that the Siebel Server sends. Siebel Open UI can make the following calls to the presentation model during a life cycle:

The physical renderer continues to render each modification that occurs in the presentation model, and the AttachPMBinding method binds each of these modifications during the Init call to the physical renderer. One of the following items then signals these modifications:

For more information about the methods that this topic describes, see Appendix A, "Application Programming Interface."

Summary of Presentation Model Methods

This topic summarizes some of the methods that a presentation model uses during the life cycle of a user interface element.

How Siebel Open UI Uses the Init Method of the Presentation Model

The Init method uses the following methods to configure the properties, methods, and bindings of the presentation model. For an example that uses Init, see "Creating the Presentation Model":

  • AddProperty. Adds a property to a presentation model. This property can be simple or derived. If you use AddProperty to define a derived property, then Siebel Open UI uses the Get method on the presentation model to calculate and return the property value. For more information about deriving values, see "Deriving Presentation Models, Physical Renderers and Plug-in Wrappers". For more information, see "Get Method".

  • AddMethod. Adds a method to the presentation model. For more information, see "AddMethod Method".

  • AttachEventHandler. Attaches a method that handles the logical event. Siebel Open UI calls this method when it sends an event to the presentation model through the OnControlEvent method. For more information, see "OnControlEvent Method" and "AttachEventHandler Method".

  • AttachNotificationHandler. Attaches a method that handles the notification that Siebel Open UI calls when the Siebel Server sends a notification to an applet. A notification is a message that Siebel Open UI sends to the client when this client requests Siebel Open UI to modify a business component. For example, to create or delete a business component record. For more information, see "Notifications That Siebel Open UI Supports".

  • AttachPSHandler. Handles other incoming property sets that the Siebel Server sends to the client. It can extract the values that a property set contains to individual properties or do other processing.

  • AttachPreProxyExecuteBinding. Attaches a method to the presentation model. Siebel Open UI calls AttachPreProxyExecuteBinding before it processes the reply that it receives from the Siebel Server, but after it receives a reply from this server to the method that Siebel Open UI supplies as an argument. For more information, see "Customizing Events".

  • AttachPostProxyExecuteBinding. Attaches a method to the presentation model. Siebel Open UI calls AttachPostProxyExecuteBinding after it processes the reply from the Siebel Server.

The physical renderer calls the following presentation model methods:

  • Get. Gets the value of a property that resides in a presentation model.

  • ExecuteMethod. Runs a method that the AddMethod method calls. For more information, see "ExecuteMethod Method".

  • OnControlEvent. Calls an event. The physical renderer uses the OnControlEvent method to call the presentation model and send an event. To call the method, the presentation model uses a binding that exists between the event and the presentation model method and the AttachEventHandler method. For more information, see "OnControlEvent Method" and "AttachEventHandler Method".

  • SetProperty. Sets the value of a presentation model property. The physical renderer can set this value directly in some situations. For more information, see "SetProperty Method".

How Siebel Open UI Uses the Setup Method of the Presentation Model

The Setup method extracts the values that a property set contains. If Siebel Open UI creates an object on the Siebel Server, such as a frame, then this server sends the property set that describes this object to the client. Siebel Open UI uses this property set to set up the presentation model properties in the client. The Setup method uses the AddProperty method to extract this property set into presentation model properties. It does this work the first time Siebel Open UI creates the user interface object in the client. For more information, see "Methods That Manipulate Property Sets". For an example that uses Setup, see "Customizing the Setup Logic of the Presentation Model".

Life Cycle of a Physical Renderer

Figure 3-12 illustrates the life cycle of a physical renderer. For examples of various life cycle flows, see "Life Cycle Flows of User Interface Elements".

Figure 3-12 Life Cycle of a Physical Renderer

Surrounding text describes Figure 3-12 .

Explanation of Callouts

The physical renderer uses methods in the following sequence:

  1. Renderer. Creates the renderer.

  2. Init. Initializes and sets up the AttachPMBinding method. For more information, see "Init Method".

  3. ShowUI. Displays a physical control that corresponds to an applet control. It renders the container for the metadata, data, and event bindings. For example, when Siebel Open UI renders a list applet as a grid, ShowUI renders the third-party grid control that it uses for the applet. Also, ShowUI calls all of the plug-in wrappers of the associated applet controls. For more information, see "ShowUI Method".

  4. BindEvents. Sets up the user interface binding of events to the physical user interface, represented as HTML elements. It captures the user actions, and then translates these actions to logical events in the physical renderer before Siebel Open UI sends them to the presentation model for processing. Also, BindEvents calls all of the plug-in wrappers of the associated applet controls. For more information, see "BindEvents Method".

  5. BindData. Downloads metadata and data from the Siebel Server to the client proxy, and then binds this data to the user interface. The list columns that a list applet uses is an example of metadata, and the record set that this list applet uses is an example of data. Also, BindData calls all of the plug-in wrappers of the associated applet controls. For more information, see "BindData Method".

  6. AttachPMBinding. Attaches handlers to notifications that occur during the life cycle. For more information, see "AttachPMBinding Method". For more information about notifications that can occur during the life cycle, see "Notifications That Siebel Open UI Supports".

    GetPM. Calls a method that the presentation model contains. It is recommended that you use GetPM only to call the following presentation model methods:

    • ExecuteMethod

    • OnControlEvent

    • Get

    • SetProperty

    You can use ExecuteMethod or OnControlEvent to call a method that modifies the state of the presentation model or to call a method that reads this state. You can use the Get method to get the value of a presentation model property. You can use SetProperty to set the value of a presentation model property.

    For more information, see "GetPM Method for Physical Renderers" and "OnControlEvent Method".

  7. EndLife. Ends the life of the physical renderer. For more information, see "EndLife Method".

Life Cycle of a Plug-in Wrapper

The plug-in wrapper uses methods in the following sequence:

  1. ShowUI. Performs show related activities for a control. For more information see "ShowUI Method".

  2. BindEvents. Attaches events to the DOM instance of the control. For more information see "BindEvents Method".

  3. BindData. Initializes data to the DOM instance of the control. For more information see "BindData Method".

  4. EndLife. Ends the life of the Plug-in Wrapper. For more information see "EndLife Method".

Example of the Life Cycle of a User Interface Element

Figure 3-13 describes the life cycle of the calendar user interface element.

Figure 3-13 Example of the Life Cycle of a User Interface Element

Surrounding text describes Figure 3-13 .

Explanation of Callouts

The following sequence occurs during the life cycle of a calendar user interface object:

  1. The user clicks a button that refreshes the calendar.

  2. The Init method adds the following items to the physical renderer:

    AttachPMBinding ("ProcessCalendarData", RefreshUI)
    
  3. The physical renderer sends the following method to the presentation model:

    OnControlEvent("Refresh_Calendar",RequestCalendarData)
    

    For more information, see "OnControlEvent Method".

  4. The Init method adds the following items to the presentation model:

    AddProperty (MeetingDates, list of dates)
    AddMethod (RequestCalendarData, implementation)
    AttachEventHandler ("Refresh_Calendar", RequestCalendarData)
    AttachNotificationHandler ("GetCalendarOUIData", ProcessCalendarData)
    AttachPostProxyExecute ("GetCalendarOUIData",SetDefaultFocus)
    

    For more information, see "AttachEventHandler Method".

  5. The presentation model sends the RequestCalendarData method to the Activity HI Calendar Applet proxy.

  6. The Activity HI Calendar Applet proxy sends a request to the Siebel Server to call the RequestCalendarData method.

  7. The Siebel Server gets metadata from the Activity HI Calendar Applet that resides on this server, and then sends the GetCalendarOUIData notification method to the presentation model. For more information, see "About Objects and Metadata".

  8. The presentation model does the following:

    1. Runs the ProcessCalendarData method and the SetDefaultFocus method.

    2. Sends the RefreshUI method to the physical renderer. This method gets the relevant properties from the presentation model.

  9. The physical renderer refreshes the calendar.