Configuring Siebel Open UI > Customizing Siebel Open UI > Guidelines for Customizing Siebel Open UI >

Guidelines for Customizing Presentation Models


It is recommended that you apply the following guidelines if you configure a presentation model:

  • Make sure you customize Siebel Open UI so that the user-interface state is separate from the rendering of this state. The guidelines in this topic describe how to do this.
  • Add a new presentation model only after you consider all other customization options, such as modifying code in a Siebel Web Template file or using Siebel Tools to modify an object. To examine some examples that do not modify the presentation model, see Customizing Siebel Open UI.

    A presentation model implements the entire abstraction of the user interface content, so the predefined implementation for a presentation model implements the predefined abstraction. There are only a few types of basic user interface abstractions, such as single record, list, tree, and so on. It is recommended that you use a predefined presentation model for each of these basic abstractions that Oracle provides you. The only situation where it is recommended that you use the predefined presentation model is for a new predefined abstraction. For example, to implement a graph abstraction for a social network model.

  • Make sure Siebel Open UI models all the state variables that it requires to achieve a rich client behavior, and that it models these state variables as presentation model properties. These properties can reside in the presentation model on the client, or the Siebel Server can provide them from an applet. You can add methods that modify these properties and that manage the state changes after you configure Siebel Open UI to add them. Siebel Open UI typically calls these methods due to a user action or if the server sends a notification. If a method modifies the logical state of the user interface, then Siebel Open UI uses the AttachPMBinding method to add a binding trigger to the physical renderer. This trigger binds the modified state to the physical user interface. For more information, see AttachPMBinding Method.

Siebel Open UI strictly defines each life cycle method. To help make sure your implementation is clean and readable, it is recommended that you use the following guidelines:

  • Make sure Siebel Open UI uses all presentation model state variables as properties. You must use the AddProperty method to create these properties. You must not use ordinary JavaScript variables to create these properties.
  • Use methods to implement all state changes of the presentation model. Use the AddMethod method to create these methods.
  • Make sure Siebel Open UI uses the AttachEventHandler method to bind each method that the presentation model contains to an event that the physical renderer contains. Each event is the result of some physical user action. This configuration makes sure Siebel Open UI binds each user action to the required logic and modifies the user interface state. For more information, see AttachEventHandler Method.
  • A presentation model method can start a call to the Siebel Server, and then the server sends a reply to this method. Siebel Open UI handles these calls asynchronously, except for high interactivity Siebel browser scripts. For more information, see About Synchronous and Asynchronous Requests.
  • Siebel Open UI includes all modifications that occur in the business component layer in the reply in a Notification property set. You must use the AttachNotificationHandler method to add this notification. For more information, see Notifications That Siebel Open UI Supports.
    • Siebel Open UI packages a reply from the server for any predefined type of request. It includes this package in a reply property set that is predefined. You must use the AttachPSHandler method to add the handler for any property set type that the server sends.
    • You must use the AttachPostProcessingHandle method to add any post-processing handler that does follow up logic on a server request, such as a NewRecord request. You can add this logic after Siebel Open UI finishes processing the reply for this request. Setting the focus for a control is an example of this kind of configuration.
  • Siebel Open UI does the initial setup of the presentation model when it initializes the Siebel view or application, depending on whether the user interface object resides in or outside of the view. The server sends a property set that includes all the initialization attributes. The proxy uses most of these attributes, but you must use the AddProperty method to get the values that the presentation model requires to set and store the state.
  • You must use the following methods in the physical renderer the first time Siebel Open UI renders the user interface:
    • BindEvents. Binds the presentation model methods to the appropriate physical events on the physical control. For more information, see BindEvents Method.
    • BindData. Accesses all the properties in the presentation model and sends them to the physical control through the appropriate methods that this physical control exposes. For more information, see BindData Method.
  • You must configure Siebel Open UI to bind any state changes to the presentation model that occur after the physical renderer finishes the initial rendering. To do this, you configure Siebel Open UI to call the AttachPMBinding method on the physical renderer. This configuration specifies the method that the physical renderer must call or the properties that it must access so that it can send data back to the physical control. This configuration allows Siebel Open UI to render the user interface after it modifies the presentation model state.
Configuring Siebel Open UI Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.