Configuring Siebel Open UI > Example of Customizing Siebel Open UI > Process of Customizing the Presentation Model >

Customizing the Presentation Model to Call the Siebel Server and Delete a Record


This task is a step in Process of Customizing the Presentation Model.

In this topic, you configure the presentation model to remove the record from the recycling bin. You use a dependency injection to call a method on the Siebel Server after the stack that Siebel Open UI uses to call the server has finished processing. For more information, see About Dependency Injection and Customizing Events.

To customize the presentation model to call the Siebel Server and delete a record

  1. In the recyclebinpmodel.js file, add the following code to the Init method:

    this.AttachPostProxyExecuteBinding("WriteRecord", PostWriteRecord);

    You use the Init method to send a WriteRecord call to the Siebel Server. For more information, see WriteRecord Method and AttachPostProxyExecuteBinding Method.

  2. Add the following code anywhere in the recyclebinpmodel.js file:

    function PostWriteRecord(methodName, inputPS, outputPS){
      if(this.Get("inRestoration")){
        this.Get("DeletionCompleteSet")[this.Get("restorationIndex")] = null;
        this.ExecuteMethod("RefreshList");
        this.SetProperty("inRestoration", false);
    }

    where:

    PostWriteRecord does the following work:

    • Removes the record that Siebel Open UI restored in Step 7. It removes this record from the DeletionCompleteSet property.
    • Calls the RefreshList method to start another round of binding to the physical renderer. In the next topic in this example, you configure Siebel Open UI to call the HandleDeleteNotification method to refresh the list and to remove the record from the recycle bin in the client.
    • Sets the inRestoration property of the presentation model to false. You set this property to true in step Step 7 to indicate that Siebel Open UI is restoring a record. The restoration is now finished, so you can configure Siebel Open UI to set inRestoration to false.
  3. Save the recyclebinpmodel.js file.
Configuring Siebel Open UI Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Legal Notices.