Configuring Siebel Open UI > Customizing Styles, Applets, and Fields > Customizing Applets >

Refreshing Applets That Contain Modified Data


You can configure Siebel Open UI to refresh only the applet that includes data that Siebel Open UI modified. This configuration makes rendering in the client more efficient than refreshing all applets, including applets that do not contain any new data. The example in this topic configures Siebel Open UI to allow the user to dynamically toggle the following applets in a view:

  • One applet displays internal Siebel CRM data that Siebel Open UI gets from the Siebel Server.
  • One applet displays external data that Siebel Open UI gets from some other, non-Siebel Web site.

To refresh applets that contain modified data

  1. Copy the JavaScript files:
    1. Download a copy of the partialrefreshpm.js file to the following folder:

    CLIENT_HOME\SWEApp\PUBLIC\language_code\files\custom

    To get a copy of this file, see Article ID 1494998.1 on My Oracle Support. For more information about this file, see Example of a Presentation Model.

    1. Download a copy of the partialrefreshpr.js file to in the following folder:

    CLIENT_HOME\SWEApp\PUBLIC\language_code\files\custom

    To get a copy of this file, see Article ID 1494998.1 on My Oracle Support. For more information about this file, see Example of a Physical Renderer.

  2. Configure the manifest:
    1. Log in to the Siebel client with administrative privileges.

      For more information about the screens that you use in this step, see Configuring Manifests.

    2. Navigate to the Administration - Application screen, and then the Manifest Files view.
    3. In the Files list, add the following files.
      Field
      Value

      Name

      siebel/custom/partialrefreshpr.js

      Name

      siebel/custom/partialrefreshpm.js

    4. Navigate to the Administration - Application screen, and then the Manifest Administration view.
    5. In the UI Objects list, specify the following applet.
      Field
      Value

      Type

      Applet

      Usage Type

      Physical Renderer

      Name

      Contact Form Applet

    6. In the Object Expression list, add the following expression. The physical renderer uses this expression to render the applet in a mobile platform.
      Field
      Value

      Expression

      Mobile

      Level

      1

    7. In the Files list, add the following file:

    siebel/custom/partialrefreshpr.js

    1. In the UI Objects list, specify the following applet.
      Field
      Value

      Type

      Applet

      Usage Type

      Presentation Model

      Name

      Contact Form Applet

    2. In the Object Expression list, add a record with no value in the Expression field.
    3. In the Files list, add the following file:

    siebel/custom/partialrefreshpm.js

  3. Test your modifications:
    1. Open the browser in the client computer, and then clear the browser cache.

      For more information, see Clearing the Browser Cache.

    2. Open the Siebel application, and then navigate to the Contact Form Applet.
    3. Delete the value in the Job Title field, and then step out of the field.
    4. Make sure Siebel Open UI removes the values from the Work # and the Main Fax # fields.
    5. Add a value to the Job Title field, and then step out of the field.
    6. Make sure Siebel Open UI adds values to the Work # and the Main Fax # fields.

Text Copy of Code That Does a Partial Refresh for the Presentation Model

To get a copy of the partialrefreshpm.js file, see Article ID 1494998.1 on My Oracle Support. If you do not have access to this file on My Oracle Support, then you can open a JavaScript editor, create a new file named partialrefreshpm.js, copy the following code into this file, and then save your modifications:

if(typeof(SiebelAppFacade.PartialRefreshPM) === "undefined"){
  
  SiebelJS.Namespace("SiebelAppFacade.PartialRefreshPM");
  define("siebel/custom/partialrefreshpm", [], function () {(
  SiebelAppFacade.PartialRefreshPM = (function(){
    function PartialRefreshPM(proxy){
      SiebelAppFacade.PartialRefreshPM.superclass.constructor.call(this, proxy);
    }
    SiebelJS.Extend(PartialRefreshPM, SiebelAppFacade.PresentationModel);
    PartialRefreshPM.prototype.Init = function(){
      SiebelAppFacade.PartialRefreshPM.superclass.Init.call(this);
      this.AddProperty("ShowJobTitleRelatedField", "");  
      this.AddMethod("ShowSelection", SelectionChange, {sequence : false, scope : this});
      this.AddMethod("FieldChange", OnFieldChange, {sequence : false, scope: this});
    };
    function SelectionChange(){
      var controls = this.Get("GetControls");
      var control = controls[ "JobTitle" ];
      var value = this.ExecuteMethod("GetFieldValue", control);
      this.SetProperty("ShowJobTitleRelatedField", (value ? true: false));
    }
    function OnFieldChange(control, value){
      if(control.GetName() === "JobTitle"){
        this.SetProperty("ShowJobTitleRelatedField", (value ? true: false));
      }
    }
    return PartialRefreshPM;
  }());
}

Text Copy of Code That Does a Partial Refresh for the Physical Renderer

To get a copy of the partialrefreshpr.js file, see Article ID 1494998.1 on My Oracle Support. If you do not have access to this file on My Oracle Support, then you can open a JavaScript editor, create a new file named partialrefreshpr.js, copy the following code into this file, and then save your modifications:

if(typeof(SiebelAppFacade.PartialRefreshPR) === "undefined"){
  SiebelJS.Namespace("SiebelAppFacade.PartialRefreshPR");
  define("siebel/custom/partialrefreshpr", ["order!3rdParty/jquery.signaturepad.min",   "order!siebel/phyrenderer"], function () {
  SiebelAppFacade.PartialRefreshPR = (function(){
    function PartialRefreshPR(pm){
      SiebelAppFacade.PartialRefreshPR.superclass.constructor.call(this, pm);
    }
    SiebelJS.Extend(PartialRefreshPR, SiebelAppFacade.PhysicalRenderer);
    PartialRefreshPR.prototype.Init = function () {
      SiebelAppFacade.PartialRefreshPR.superclass.Init.call(this);
      this.AttachPMBinding("ShowJobTitleRelatedField", ModifyLayout);
    };
    function ModifyLayout(){
      var controls = this.GetPM().Get("GetControls");
      var canShow = this.GetPM().Get("ShowJobTitleRelatedField");
      var WorkPhoneNum = controls[ "WorkPhoneNum" ];
      var FaxPhoneNum = controls[ "FaxPhoneNum" ];
      if(canShow){
        $("div#WorkPhoneNum_Label").show();
        $("[name='" + WorkPhoneNum.GetInputName() + "']").show();
        $("div#FaxPhoneNum_Label").show();
        $("[name='" + FaxPhoneNum.GetInputName() + "']").show();
        }
      else{
        $("div#WorkPhoneNum_Label").hide();
        $("[name='" + WorkPhoneNum.GetInputName() + "']").hide();
        $("div#FaxPhoneNum_Label").hide();
        $("[name='" + FaxPhoneNum.GetInputName() + "']").hide();
      }
      }
      return PartialRefreshPR;
    } ());
    return "SiebelAppFacade.PartialRefreshPR";
  });
}

Configuring Siebel Open UI Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.