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
- Copy the JavaScript files:
- 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.
- 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.
- Configure the manifest:
- Log in to the Siebel client with administrative privileges.
For more information about the screens that you use in this step, see Configuring Manifests.
- Navigate to the Administration - Application screen, and then the Manifest Files view.
- In the Files list, add the following files.
|
|
Name |
siebel/custom/partialrefreshpr.js |
Name |
siebel/custom/partialrefreshpm.js |
- Navigate to the Administration - Application screen, and then the Manifest Administration view.
- In the UI Objects list, specify the following applet.
|
|
Type |
Applet |
Usage Type |
Physical Renderer |
Name
|
Contact Form Applet |
- In the Object Expression list, add the following expression. The physical renderer uses this expression to render the applet in a mobile platform.
|
|
Expression |
Mobile |
Level
|
1 |
- In the Files list, add the following file:
siebel/custom/partialrefreshpr.js
- In the UI Objects list, specify the following applet.
|
|
Type |
Applet |
Usage Type |
Presentation Model |
Name
|
Contact Form Applet |
- In the Object Expression list, add a record with no value in the Expression field.
- In the Files list, add the following file:
siebel/custom/partialrefreshpm.js
- Test your modifications:
- Open the browser in the client computer, and then clear the browser cache.
For more information, see Clearing the Browser Cache.
- Open the Siebel application, and then navigate to the Contact Form Applet.
- Delete the value in the Job Title field, and then step out of the field.
- Make sure Siebel Open UI removes the values from the Work # and the Main Fax # fields.
- Add a value to the Job Title field, and then step out of the field.
- 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"; }); }
|