SlideShare una empresa de Scribd logo
1 de 45
Customizing The
Presentation Model
Presented by TechOneStop
Techonestop.in
In a vision to make TECHNOLOGY simple for u
techonestop.in1
Objectives
techonestop.in2
1) Introduction of Siebel Open UI JavaScript Application
Programming Interface (API)
2) Describe the structure the of a presentation model Javascript
file
3) Build a custom Presentation model JS file to implement own
business logic
Review: Client Proxy
techonestop.in3
• Proxy creates the local representation of metadata for
Presentation model.
- Creates a ‘shadow’ copy of controls/columns in the applet
- Creates a ‘shadow’ copy of applets
- Create a ‘shadow’ copy of business components /
business objects
- And so forth
• These shadow copies are treated as objects in a namespace
in the client cache
Review: Presentation Model
techonestop.in4
• It is a Javascript file which determines what logic should be
applied to data on the client side
• Client side scripting without requiring the need of siebel server
• Capture client interaction
- Did the user leave a control?
- Did the user click a link?
• Support different logic for different platform like Desktop vs
Mobile
• Collection of Siebel object properties and methods
• Provides a logical abstraction layer of repository metadata
• Does not do any rendering of physical HTML/CSS
• Interact with Siebel Server side business service if required
Siebel Open UI JavaScript API
techonestop.in5
- Provides a set of Javascript functions to access and manipulate
client side objects
- For example
GetName Method for applet controls returns the name of the
applet control
if (control.GetName() === "FirstName"){ - Return the control
name
FieldChange(control, field value) modifies the field value of a
control
Scenarios of customizing the presentation model
• Add control or list column, not available from client proxy
Example: Add an additional column to delete multiple records at a
time
• Create client properties
Example: Property to store TRUE or FALSE value used in client logic
• Interact with siebel server
Example: Call server side business service
techonestop.in6
Terminology
• NameSpace
- Place to maintain a list of objects instantiated in client cache
• Class
- It instances the object with unique name
- In Javascript, there can be only one instance of class/object at a
time
• Constructor
- It instantiates and defines the methods for the class
• Renderer Key registration
- It helps to determine which Javascript files need to be downloaded
** Things to remember:
It is important to note that actually javascript is a class-less language, though
functions can be used to simulate Class concept. Everything in javascript is
treated as object.
techonestop.in7
Steps to customize Presentation Model
1) Verify the object class does not exist
2) Add the class to the siebel namespace
3) Define the presentation model file location and other
dependencies if any
4) Add constructor function within the class
4.1) Declare the class constructor as function
4.2) Inherit the super class constructor
4.3) Declare the class as an extension of presentation model
4.4) Initialize Init method to add properties and methods to
the class
4.5) Add custom method/s
techonestop.in8
Example
Example: In Contact Form Applet, if Status
field has any value, show WorkPhoneNum#,
else hide the field.
techonestop.in9
Step 1
Step 1: Verify the object class does not exist
• Checks whether the class has already been implemented or not. This
should be the first statement to avoid possible conflicts.
• Syntax:
if( typeof( SiebelAppFacade.customclassname ) === "undefined" ) {
• Script for our example:
// Verify same presentationmodel is not defined yet
if( typeof( SiebelAppFacade.ShowHideFieldsPM ) === "undefined" ){
techonestop.in10
Step 2
Step 2: Add the class to the siebel namespace
•All new classes must be added to the SiebelAppFacade namespace.
• Use ‘NameSpace()’ function to do this
• Syntax
SiebelJS.Namespace( "SiebelAppFacade. customclassname" );
• Script for our example:
// Add the class to the SiebelAppFacade namespace
SiebelJS.Namespace( "SiebelAppFacade.ShowHideFieldsPM");
techonestop.in11
Step 3
Step 3: Define the presentation model file location and
other dependencies if any
• Define method identifies the module that Siebel Open Ui uses to
locate the presentation model file and all other dependent modules
• It must have a return statement like return " SiebelAppFacade.
customclassname";
• Syntax
define (module_name ,list_of_dependencies,function);
- Module name is nothing but the presentation file name without
file extension
- List_of_dependencies is an array of all dependent modules
which are required to run presentation model properly. If there is
no dependencies, keep it blank.
- Function identifies the function name that must return an object
techonestop.in12
Step 3 (cont..)
• Script for our example:
// Define the presentation model file location and other
dependencies if any
define("siebel/custom/ShowHideFieldsPM", [], function () {
--- Write the code here---
return "SiebelAppFacade.ShowHideFieldsPM";
});
techonestop.in13
Step 4
Step 4: Add constructor function within the class
4.1) Declare the class constructor as function
4.2) Inherit the super class constructor
4.3) Declare the class as an extension of presentation model
4.4) Initialize Init method to add properties and methods to the class
4.5) Add custom method/s
techonestop.in14
Step 4.1
Step 4.1. Declare the class constructor as function
• Declare the class constructor as a child of SiebelAppFacade
• It must have a return statement
• Syntax
SiebelAppFacade. customclassname = ( function(){
--- Writ the code here---
return customclassname;
} ());
• Script for our example:
// Declare the ShowHideFieldsPM class as function
SiebelAppFacade.ShowHideFieldsPM = ( function(){
--- Write the code here---
return ShowHideFieldsPM;
} ());
techonestop.in15
Step 4.2
Step 4.2: Inherit the super class constructor
• When Open UI calls the constructor, it passes a proxy object. Our custom
constructor uses this proxy object to instantiate as-delivered objects
• Syntax
function customclassname ( proxy ){
SiebelAppFacade. customclassname.superclass.constructor.call( this,
proxy );
}
• Script for our example:
// Call the superclass constructor
function ShowHideFieldsPM( proxy ){
SiebelAppFacade.ShowHideFieldsPM.superclass.constructor.call( this,
proxy );
}
techonestop.in16
Step 4.3
Step 4.3: Declare the class as an extension of
presentation model
• Use SiebelJS.extend() to declare the class as an extension of
presentation model
• Extended class can access all prebuilt functions
• Syntax
SiebelJS.Extend(customclassname,SiebelAppFacade.PresentationModel );
• Script for our example:
//Extend the class so that it can access all prebuilt functions
SiebelJS.Extend( ShowHideFieldsPM, SiebelAppFacade.PresentationModel );
techonestop.in17
Step 4.4
Step 4.4: Initialize Init method to add properties and methods to
the class
• Declare the Init function of your class
• Syntax
CustomClassname.prototype.Init = function(){
• Call Superclass Init function to initialize as-delivered functionalities
• Syntax
SiebelAppFacade.CustomClassname.superclass.Init.call( this );
• It may include code that creates properties for the class, if needed
• Syntax
this.AddProperty( "Property Name", "" );
• It can also override supercalss methods
• Syntax
this.AddMethod( "Name of the method to override", custom method
name, { sequence : false, scope : this } );
techonestop.in18
Step 4.4 (Cont..)
• Script for our example:
ShowHideFieldsPM.prototype.Init = function(){
SiebelAppFacade.ShowHideFieldsPM.superclass.Init.call( this );
this.AddProperty( "ShowHideStatus", "" );
this.AddMethod( "ShowSelection", SelectionChange, {
sequence : false, scope : this } );
this.AddMethod( "FieldChange", OnFieldChange, { sequence :
false, scope: this } );
};
techonestop.in19
Step 4.5
Step 4.5: Add custom method/s
• Any method, specified in Init function or any custom method we want to
implement, add the script here
• Syntax:
function CustomMethod(){
--- Write the code here ---
}
• Script for our example:
function OnFieldChange( control, value ){
if( control.GetName() === "Status" ){
this.SetProperty( "ShowHideStatus", ( value ? true: false ) );
}
}
techonestop.in20
Complete Script (Page 1 of 3)
/*---------------------Presentation Model to Show/Hide a field--------------------*/
// Verify same presentationmodel is not defined yet
if( typeof( SiebelAppFacade.ShowHideFieldsPM ) === "undefined" ){
// Add the class to the SiebelAppFacade namespace
SiebelJS.Namespace( "SiebelAppFacade.ShowHideFieldsPM" );
// Define the presentation model file location and other dependencies if any
define("siebel/custom/ShowHideFieldsPM", [], function () {
// Declare the ShowHideFieldsPM class as function
SiebelAppFacade.ShowHideFieldsPM = ( function(){
// Call the superclass constructor
function ShowHideFieldsPM( proxy ){
SiebelAppFacade.ShowHideFieldsPM.superclass.constructor.call(this,proxy );
}
//Extend the class so that it can access all prebuilt functions
SiebelJS.Extend( ShowHideFieldsPM, SiebelAppFacade.PresentationModel );
techonestop.in21
Complete Script (Page 2 of 3)
// Initialize the object to add properties, methods
ShowHideFieldsPM.prototype.Init = function(){
SiebelAppFacade.ShowHideFieldsPM.superclass.Init.call( this );
this.AddProperty( "ShowHideStatus", "" );
this.AddMethod( "ShowSelection", SelectionChange, { sequence : false,
scope : this } );
this.AddMethod( "FieldChange", OnFieldChange, { sequence : false, scope:
this } );
};
// Custom method to execute when next record is selected
function SelectionChange(){
var controls = this.Get( "GetControls" );
var control = controls[ "Status" ];
var value = this.ExecuteMethod( "GetFieldValue", control );
this.SetProperty( "ShowHideStatus", ( value ? true: false ) );
}
techonestop.in22
Complete Script (Page 3 of 3)
//Custom method to execute when field value changes
function OnFieldChange( control, value ){
if( control.GetName() === "Status" ){
this.SetProperty( "ShowHideStatus", ( value ? true: false ) );
}
}
return ShowHideFieldsPM;
} ());
return "SiebelAppFacade.ShowHideFieldsPM";
});
}
techonestop.in23
Highlights
Presentation Model is a Javascript file which determines what logic should
be applied to data on the client side.
Steps to implement to Presentation Model Customization :
1) Verify the object class does not exists
2) Add the class to the siebel namespace
3) Define the presentation model file location and other
dependencies if any
4) Add constructor function within the class
4.1) Declare the class constructor as function
4.2) Inherit the super class constructor
4.3) Declare the class as an extension of presentation model
4.4) Initialize Init method to add properties and methods to the
class
4.5) Add custom method/s
techonestop.in24
Customizing The Physical
Renderer
Presented by TechOneStop
Techonestop.in
In a vision to make TECHNOLOGY simple for u
techonestop.in2
Objectives
techonestop.in2
1) Describe the structure of physical renderer javascript file
2) Build a custom Physical Renderer JS file to implement own
business logic
Physical Renderer
techonestop.in2
- Like presentation model, physical renderer is also client side
javascript file
- Responsible to build user interface (UI)
- Can display same set of records (based upon same
presentation model) in different ways on different views
• List Applet
• Form Applet
• Carousel
• Calendar
• Table format
• Tree
Physical Renderer (Cont…)
techonestop.in2
- Allows records to be displayed in different ways on
different platform ( Desktop vs Mobile)
- Uses third-party controls (like JQuery library) if
required
- Takes logical data and builds physical rendering of it
in HTML using CSS files
- Provides a binding layer to presentation model, binds
HTML elements with the presentation model
structures
Scenarios of customizing the Physical Renderer
- Show or hide a field based upon the property value of
physical renderer
- Display records in different ways like carousel, table, grid and
many more
- Platform specific look-and-feel like Desktop vs Mobile
techonestop.in2
Steps to customize Physical Renderer
1) Verify the object class does not exist
2) Add the class to the siebel namespace
3) Define the physical renderer file location and other
dependencies if any
4) Implement a constructor function within the class
4.1) Declare the class constructor as function
4.2) Inherit the super class constructor
4.3) Declare the class as an extension of physical renderer
4.4) Declare bindings to the Presentation Model
4.5) Add custom method/s
techonestop.in3
Example
Example: In Contact Form Applet, if Status field has
any value, show WorkPhoneNum#, else hide the
field
** In our previous module, we have built one
presentation model JS file to capture the Status
field value. Here we will write one physical render
JS file to build the user interface.
techonestop.in3
Step 1
Step 1: Verify the object class does not exist
• Checks whether the class has already been implemented or not. This
should be the first statement to avoid possible conflicts.
• Syntax:
if( typeof( SiebelAppFacade.customclassname ) === "undefined" ) {
• Script for our example:
// Verify same PhysicalRenderer is not defined yet
if( typeof( SiebelAppFacade.ShowHideFieldsPR ) === "undefined" ){
techonestop.in32
Step 2
Step 2: Add the class to the siebel namespace
• All new classes must be added to the SiebelAppFacade namespace.
• Use ‘NameSpace()’ function of SiebelJS class to accomplish this
• Syntax
SiebelJS.Namespace( "SiebelAppFacade. customclassname" );
• Script for our example:
// Add the class to the SiebelAppFacade namespace
SiebelJS.Namespace( "SiebelAppFacade.ShowHideFieldsPR");
techonestop.in33
Step 3
Step 3: Define the physical renderer file location and other
dependencies if any
• Define method identifies the module that Siebel Open UI uses to
locate the physical renderer file and all other dependent modules
• It must have a return statement like return " SiebelAppFacade.
customclassname"
• Syntax
define (module_name ,list_of_dependencies,function);
- Module name is physical renderer file name without file
extension (.js)
- List_of_dependencies is an array of all dependent modules
which are required to run physical renderer properly. If there is no
dependencies, keep it blank.
- Function identifies the function name that must return an object
techonestop.in34
Step 3 (cont..)
• Script for our example:
// Define method to make sure Siebel Open UI can
identify the constructor and other dependent files
define("siebel/custom/ShowHideFieldsPR",
["order!3rdParty/jquery.signaturepad.min",
"order!siebel/phyrenderer"], function () {
techonestop.in35
Step 4
Step 4: Implement a constructor function within the class
4.1) Declare the class constructor as function
4.2) Inherit the super class constructor
4.3) Declare the class as an extension of physical renderer
4.4) Declare bindings to the Presentation Model
4.5) Add custom method/s
techonestop.in36
Step 4.1
Step 4.1. Declare the class constructor as function
• Declare the class constructor as a child of SiebelAppFacade
• It must have a return statement
• Syntax
SiebelAppFacade. customclassname = ( function(){
--- Writ the code here---
return customclassname;
} ());
• Script for our example:
// Declare the ShowHideFieldsPR class as function
SiebelAppFacade.ShowHideFieldsPR = ( function(){
--- Write the code here---
return ShowHideFieldsPR;
} ());
techonestop.in37
Step 4.2
Step 4.2: Inherit the super class constructor
• When Open UI calls the constructor, it passes presentation model object.
Our custom constructor uses this presentation model object to instantiate
all required methods and attributes
• Syntax
function customclassname ( pm ){
SiebelAppFacade. customclassname.superclass.constructor.call( this,
pm ); }
• Script for our example:
// Call the superclass constructor
function ShowHideFieldsPM( pm){
SiebelAppFacade.ShowHideFieldsPM.superclass.constructor.call( this,
pm ); }
techonestop.in38
Step 4.3
Step 4.3: Declare the class as an extension of
physical renderer
• Use SiebelJS.extend() to declare the class as an extension of
physical renderer
• Syntax
SiebelJS.Extend(customclassname,SiebelAppFacade.PhysicalRenderer);
• Script for our example:
//Extend the class so that it can access all prebuilt functions
SiebelJS.Extend( ShowHideFieldsPM, SiebelAppFacade.PhysicalRenderer );
techonestop.in39
Step 4.4
Step 4.4: Declare bindings to the Presentation Model
• Includes binding to the properties, declared in the Presentation
Model
• Syntax
This.GetPM().AttachPMBinding ( “<Presentation Model Property
Name>”, <Physical renderer method>, {scope:this});
• Script for our example:
// Attach PM Binding
SiebelAppFacade.ShowHideFieldsPR.superclass.Init.call(this);
this.AttachPMBinding( "ShowHideFieldsPM", ModifyLayout ); };
techonestop.in40
Step 4.5
Step 4.5: Add custom method/s
• Any method, specified in Init function or any custom method we
want to implement, add the script here
• Syntax:
function CustomMethod(){
--- Write the code here ---
}
techonestop.in41
Complete Script (Page 1 of 3)
/*----------------------Physical Renderer to Show/Hide a field----------------------*/
// Verify same PhysicalRenderer is not defined yet
if( typeof( SiebelAppFacade.ShowHideFieldsPR ) === "undefined" ){
// Add the class to the SiebelAppFacade namespace
SiebelJS.Namespace( "SiebelAppFacade.ShowHideFieldsPR" );
// Define method to make sure Siebel Open UI can identify the constructor and
other dependent files
define("siebel/custom/ShowHideFieldsPR",
["order!3rdParty/jquery.signaturepad.min", "order!siebel/phyrenderer"], function
() {
// Declare the ShowHideFieldsPR class as function
SiebelAppFacade.ShowHideFieldsPR = ( function(){
// Call the superclass constructor
function ShowHideFieldsPR( pm ){
SiebelAppFacade.ShowHideFieldsPR.superclass.constructor.call( this, pm ); }
techonestop.in42
Complete Script (Page 2 of 3)
// Attach PM Binding
SiebelAppFacade.ShowHideFieldsPR.superclass.Init.call(this);
this.AttachPMBinding( "ShowHideFieldsPM", ModifyLayout );
};
// Custom Methods
function ModifyLayout( ){
var controls = this.GetPM().Get( "GetControls" );
var canShow = this.GetPM().Get( "ShowHideStatus" );
var WorkPhoneNum = controls[ "WorkPhoneNum" ];
if( canShow ){
$( "div#WorkPhoneNum_Label" ).show();
$( "[name='" + WorkPhoneNum.GetInputName() + "']" ).show();
}
techonestop.in43
Complete Script (Page 3 of 3)
else{
$( "div#WorkPhoneNum_Label" ).hide();
$( "[name='" + WorkPhoneNum.GetInputName() + "']" ).hide();
}
}
return ShowHideFieldsPR;
} ());
return "SiebelAppFacade.ShowHideFieldsPR";
});
}
techonestop.in44
Highlights
Physical Renderer is a Javascript file which is responsible to build user
interface.
Steps to implement to Physical Renderer Customization :
1) Verify the object class does not exist
2) Add the class to the siebel namespace
3) Define the physical renderer file location and other dependencies
if any
4) Implement a constructor function within the class
4.1) Declare the class constructor as function
4.2) Inherit the super class constructor
4.3) Declare the class as an extension of physical renderer
4.4) Declare bindings to the presentation model
4.5) Add custom method/s
techonestop.in45

Más contenido relacionado

La actualidad más candente

How to integrate java application with temenos t24
How to integrate java application with temenos t24How to integrate java application with temenos t24
How to integrate java application with temenos t24Mahmoud Elkholy PMI-ACP
 
Talend ETL Tutorial | Talend Tutorial For Beginners | Talend Online Training ...
Talend ETL Tutorial | Talend Tutorial For Beginners | Talend Online Training ...Talend ETL Tutorial | Talend Tutorial For Beginners | Talend Online Training ...
Talend ETL Tutorial | Talend Tutorial For Beginners | Talend Online Training ...Edureka!
 
MS Access and Database Fundamentals
MS Access and Database FundamentalsMS Access and Database Fundamentals
MS Access and Database FundamentalsAnanda Gupta
 
Oracle Fusion Applications Security - Designing Roles
Oracle Fusion Applications Security - Designing RolesOracle Fusion Applications Security - Designing Roles
Oracle Fusion Applications Security - Designing Roleskmundy
 
Siebel Web Architecture
Siebel Web ArchitectureSiebel Web Architecture
Siebel Web ArchitectureRoman Agaev
 
Introduction of ISPF
Introduction of ISPFIntroduction of ISPF
Introduction of ISPFAnil Bharti
 
A Solution for Leveraging Kafka to Provide End-to-End ACID Transactions
A Solution for Leveraging Kafka to Provide End-to-End ACID TransactionsA Solution for Leveraging Kafka to Provide End-to-End ACID Transactions
A Solution for Leveraging Kafka to Provide End-to-End ACID Transactionsconfluent
 
Presentation db2 best practices for optimal performance
Presentation   db2 best practices for optimal performancePresentation   db2 best practices for optimal performance
Presentation db2 best practices for optimal performancesolarisyougood
 
Adapter Design Pattern
Adapter Design PatternAdapter Design Pattern
Adapter Design PatternAdeel Riaz
 
Oracle Framework Personalization
Oracle Framework PersonalizationOracle Framework Personalization
Oracle Framework PersonalizationEdi Yanto
 
Talend Open Studio Introduction - OSSCamp 2014
Talend Open Studio Introduction - OSSCamp 2014Talend Open Studio Introduction - OSSCamp 2014
Talend Open Studio Introduction - OSSCamp 2014OSSCube
 
08 state diagram and activity diagram
08 state diagram and activity diagram08 state diagram and activity diagram
08 state diagram and activity diagramBaskarkncet
 
oracle ebs free web service integration tools
oracle ebs free web service integration toolsoracle ebs free web service integration tools
oracle ebs free web service integration toolsSmartDog Services
 
Informatica PowerCenter
Informatica PowerCenterInformatica PowerCenter
Informatica PowerCenterRamy Mahrous
 

La actualidad más candente (20)

How to integrate java application with temenos t24
How to integrate java application with temenos t24How to integrate java application with temenos t24
How to integrate java application with temenos t24
 
Talend ETL Tutorial | Talend Tutorial For Beginners | Talend Online Training ...
Talend ETL Tutorial | Talend Tutorial For Beginners | Talend Online Training ...Talend ETL Tutorial | Talend Tutorial For Beginners | Talend Online Training ...
Talend ETL Tutorial | Talend Tutorial For Beginners | Talend Online Training ...
 
MS Access and Database Fundamentals
MS Access and Database FundamentalsMS Access and Database Fundamentals
MS Access and Database Fundamentals
 
Adapter Design Pattern
Adapter Design PatternAdapter Design Pattern
Adapter Design Pattern
 
Oracle Fusion Applications Security - Designing Roles
Oracle Fusion Applications Security - Designing RolesOracle Fusion Applications Security - Designing Roles
Oracle Fusion Applications Security - Designing Roles
 
People soft basics
People soft basicsPeople soft basics
People soft basics
 
Siebel Web Architecture
Siebel Web ArchitectureSiebel Web Architecture
Siebel Web Architecture
 
Oodbms ch 20
Oodbms ch 20Oodbms ch 20
Oodbms ch 20
 
Introduction of ISPF
Introduction of ISPFIntroduction of ISPF
Introduction of ISPF
 
A Solution for Leveraging Kafka to Provide End-to-End ACID Transactions
A Solution for Leveraging Kafka to Provide End-to-End ACID TransactionsA Solution for Leveraging Kafka to Provide End-to-End ACID Transactions
A Solution for Leveraging Kafka to Provide End-to-End ACID Transactions
 
Presentation db2 best practices for optimal performance
Presentation   db2 best practices for optimal performancePresentation   db2 best practices for optimal performance
Presentation db2 best practices for optimal performance
 
Adapter Design Pattern
Adapter Design PatternAdapter Design Pattern
Adapter Design Pattern
 
Oracle Framework Personalization
Oracle Framework PersonalizationOracle Framework Personalization
Oracle Framework Personalization
 
Talend Open Studio Introduction - OSSCamp 2014
Talend Open Studio Introduction - OSSCamp 2014Talend Open Studio Introduction - OSSCamp 2014
Talend Open Studio Introduction - OSSCamp 2014
 
Tibco business works
Tibco business worksTibco business works
Tibco business works
 
RDBMS.ppt
RDBMS.pptRDBMS.ppt
RDBMS.ppt
 
08 state diagram and activity diagram
08 state diagram and activity diagram08 state diagram and activity diagram
08 state diagram and activity diagram
 
oracle ebs free web service integration tools
oracle ebs free web service integration toolsoracle ebs free web service integration tools
oracle ebs free web service integration tools
 
Informatica PowerCenter
Informatica PowerCenterInformatica PowerCenter
Informatica PowerCenter
 
Introduction to EJB
Introduction to EJBIntroduction to EJB
Introduction to EJB
 

Destacado

Siebe Profile Attribute Management Utility
Siebe Profile Attribute Management UtilitySiebe Profile Attribute Management Utility
Siebe Profile Attribute Management UtilityJeroen Burgers
 
Эволюция интерфейса Siebel - Responsive Web Design
Эволюция интерфейса Siebel  - Responsive Web DesignЭволюция интерфейса Siebel  - Responsive Web Design
Эволюция интерфейса Siebel - Responsive Web Designcrm2life
 
Knowledge Management Overview
Knowledge Management OverviewKnowledge Management Overview
Knowledge Management OverviewRahul Sudame
 
Siebel 8.1 Certifications Question Answers
Siebel 8.1 Certifications Question AnswersSiebel 8.1 Certifications Question Answers
Siebel 8.1 Certifications Question AnswersSweta Singh
 
Coaching And Mentring Ppt
Coaching And Mentring PptCoaching And Mentring Ppt
Coaching And Mentring Pptdimplenift
 

Destacado (6)

Siebe Profile Attribute Management Utility
Siebe Profile Attribute Management UtilitySiebe Profile Attribute Management Utility
Siebe Profile Attribute Management Utility
 
Siebel CRM: Open UI
Siebel CRM: Open UISiebel CRM: Open UI
Siebel CRM: Open UI
 
Эволюция интерфейса Siebel - Responsive Web Design
Эволюция интерфейса Siebel  - Responsive Web DesignЭволюция интерфейса Siebel  - Responsive Web Design
Эволюция интерфейса Siebel - Responsive Web Design
 
Knowledge Management Overview
Knowledge Management OverviewKnowledge Management Overview
Knowledge Management Overview
 
Siebel 8.1 Certifications Question Answers
Siebel 8.1 Certifications Question AnswersSiebel 8.1 Certifications Question Answers
Siebel 8.1 Certifications Question Answers
 
Coaching And Mentring Ppt
Coaching And Mentring PptCoaching And Mentring Ppt
Coaching And Mentring Ppt
 

Similar a Customizing the Presentation Model and Physical Renderer in Siebel Open UI

WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...Fabio Franzini
 
Test Driven Development with JavaFX
Test Driven Development with JavaFXTest Driven Development with JavaFX
Test Driven Development with JavaFXHendrik Ebbers
 
Spring Day | Spring and Scala | Eberhard Wolff
Spring Day | Spring and Scala | Eberhard WolffSpring Day | Spring and Scala | Eberhard Wolff
Spring Day | Spring and Scala | Eberhard WolffJAX London
 
ZZ BC#7 asp.net mvc practice and guideline by NineMvp
ZZ BC#7 asp.net mvc practice and guideline by NineMvpZZ BC#7 asp.net mvc practice and guideline by NineMvp
ZZ BC#7 asp.net mvc practice and guideline by NineMvpChalermpon Areepong
 
DDD, CQRS and testing with ASP.Net MVC
DDD, CQRS and testing with ASP.Net MVCDDD, CQRS and testing with ASP.Net MVC
DDD, CQRS and testing with ASP.Net MVCAndy Butland
 
Using the Tooling API to Generate Apex SOAP Web Service Clients
Using the Tooling API to Generate Apex SOAP Web Service ClientsUsing the Tooling API to Generate Apex SOAP Web Service Clients
Using the Tooling API to Generate Apex SOAP Web Service ClientsSalesforce Developers
 
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years laterSymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years laterHaehnchen
 
Quick tour to front end unit testing using jasmine
Quick tour to front end unit testing using jasmineQuick tour to front end unit testing using jasmine
Quick tour to front end unit testing using jasmineGil Fink
 
Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010Lars Vogel
 
Apache Wicket Web Framework
Apache Wicket Web FrameworkApache Wicket Web Framework
Apache Wicket Web FrameworkLuther Baker
 
A new tool for measuring performance in Drupal 8 - DrupalCamp London
A new tool for measuring performance in Drupal 8 - DrupalCamp LondonA new tool for measuring performance in Drupal 8 - DrupalCamp London
A new tool for measuring performance in Drupal 8 - DrupalCamp LondonLuca Lusso
 
TypeScript for Java Developers
TypeScript for Java DevelopersTypeScript for Java Developers
TypeScript for Java DevelopersYakov Fain
 
WPF and Prism 4.1 Workshop at BASTA Austria
WPF and Prism 4.1 Workshop at BASTA AustriaWPF and Prism 4.1 Workshop at BASTA Austria
WPF and Prism 4.1 Workshop at BASTA AustriaRainer Stropek
 
BOF2644 Developing Java EE 7 Scala apps
BOF2644 Developing Java EE 7 Scala appsBOF2644 Developing Java EE 7 Scala apps
BOF2644 Developing Java EE 7 Scala appsPeter Pilgrim
 
Drupal 8 Every Day: An Intro to Developing With Drupal 8
Drupal 8 Every Day: An Intro to Developing With Drupal 8Drupal 8 Every Day: An Intro to Developing With Drupal 8
Drupal 8 Every Day: An Intro to Developing With Drupal 8Acquia
 

Similar a Customizing the Presentation Model and Physical Renderer in Siebel Open UI (20)

WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 
Test Driven Development with JavaFX
Test Driven Development with JavaFXTest Driven Development with JavaFX
Test Driven Development with JavaFX
 
Play Framework
Play FrameworkPlay Framework
Play Framework
 
Spring Day | Spring and Scala | Eberhard Wolff
Spring Day | Spring and Scala | Eberhard WolffSpring Day | Spring and Scala | Eberhard Wolff
Spring Day | Spring and Scala | Eberhard Wolff
 
ZZ BC#7 asp.net mvc practice and guideline by NineMvp
ZZ BC#7 asp.net mvc practice and guideline by NineMvpZZ BC#7 asp.net mvc practice and guideline by NineMvp
ZZ BC#7 asp.net mvc practice and guideline by NineMvp
 
Liferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for DevelopersLiferay (DXP) 7 Tech Meetup for Developers
Liferay (DXP) 7 Tech Meetup for Developers
 
DDD, CQRS and testing with ASP.Net MVC
DDD, CQRS and testing with ASP.Net MVCDDD, CQRS and testing with ASP.Net MVC
DDD, CQRS and testing with ASP.Net MVC
 
Using the Tooling API to Generate Apex SOAP Web Service Clients
Using the Tooling API to Generate Apex SOAP Web Service ClientsUsing the Tooling API to Generate Apex SOAP Web Service Clients
Using the Tooling API to Generate Apex SOAP Web Service Clients
 
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years laterSymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
SymfonyCon Berlin 2016 - Symfony Plugin for PhpStorm - 3 years later
 
[2015/2016] JavaScript
[2015/2016] JavaScript[2015/2016] JavaScript
[2015/2016] JavaScript
 
Quick tour to front end unit testing using jasmine
Quick tour to front end unit testing using jasmineQuick tour to front end unit testing using jasmine
Quick tour to front end unit testing using jasmine
 
Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010
 
Apache Wicket Web Framework
Apache Wicket Web FrameworkApache Wicket Web Framework
Apache Wicket Web Framework
 
A new tool for measuring performance in Drupal 8 - DrupalCamp London
A new tool for measuring performance in Drupal 8 - DrupalCamp LondonA new tool for measuring performance in Drupal 8 - DrupalCamp London
A new tool for measuring performance in Drupal 8 - DrupalCamp London
 
Scala and Spring
Scala and SpringScala and Spring
Scala and Spring
 
TypeScript for Java Developers
TypeScript for Java DevelopersTypeScript for Java Developers
TypeScript for Java Developers
 
Design patterns
Design patternsDesign patterns
Design patterns
 
WPF and Prism 4.1 Workshop at BASTA Austria
WPF and Prism 4.1 Workshop at BASTA AustriaWPF and Prism 4.1 Workshop at BASTA Austria
WPF and Prism 4.1 Workshop at BASTA Austria
 
BOF2644 Developing Java EE 7 Scala apps
BOF2644 Developing Java EE 7 Scala appsBOF2644 Developing Java EE 7 Scala apps
BOF2644 Developing Java EE 7 Scala apps
 
Drupal 8 Every Day: An Intro to Developing With Drupal 8
Drupal 8 Every Day: An Intro to Developing With Drupal 8Drupal 8 Every Day: An Intro to Developing With Drupal 8
Drupal 8 Every Day: An Intro to Developing With Drupal 8
 

Último

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 

Último (20)

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 

Customizing the Presentation Model and Physical Renderer in Siebel Open UI

  • 1. Customizing The Presentation Model Presented by TechOneStop Techonestop.in In a vision to make TECHNOLOGY simple for u techonestop.in1
  • 2. Objectives techonestop.in2 1) Introduction of Siebel Open UI JavaScript Application Programming Interface (API) 2) Describe the structure the of a presentation model Javascript file 3) Build a custom Presentation model JS file to implement own business logic
  • 3. Review: Client Proxy techonestop.in3 • Proxy creates the local representation of metadata for Presentation model. - Creates a ‘shadow’ copy of controls/columns in the applet - Creates a ‘shadow’ copy of applets - Create a ‘shadow’ copy of business components / business objects - And so forth • These shadow copies are treated as objects in a namespace in the client cache
  • 4. Review: Presentation Model techonestop.in4 • It is a Javascript file which determines what logic should be applied to data on the client side • Client side scripting without requiring the need of siebel server • Capture client interaction - Did the user leave a control? - Did the user click a link? • Support different logic for different platform like Desktop vs Mobile • Collection of Siebel object properties and methods • Provides a logical abstraction layer of repository metadata • Does not do any rendering of physical HTML/CSS • Interact with Siebel Server side business service if required
  • 5. Siebel Open UI JavaScript API techonestop.in5 - Provides a set of Javascript functions to access and manipulate client side objects - For example GetName Method for applet controls returns the name of the applet control if (control.GetName() === "FirstName"){ - Return the control name FieldChange(control, field value) modifies the field value of a control
  • 6. Scenarios of customizing the presentation model • Add control or list column, not available from client proxy Example: Add an additional column to delete multiple records at a time • Create client properties Example: Property to store TRUE or FALSE value used in client logic • Interact with siebel server Example: Call server side business service techonestop.in6
  • 7. Terminology • NameSpace - Place to maintain a list of objects instantiated in client cache • Class - It instances the object with unique name - In Javascript, there can be only one instance of class/object at a time • Constructor - It instantiates and defines the methods for the class • Renderer Key registration - It helps to determine which Javascript files need to be downloaded ** Things to remember: It is important to note that actually javascript is a class-less language, though functions can be used to simulate Class concept. Everything in javascript is treated as object. techonestop.in7
  • 8. Steps to customize Presentation Model 1) Verify the object class does not exist 2) Add the class to the siebel namespace 3) Define the presentation model file location and other dependencies if any 4) Add constructor function within the class 4.1) Declare the class constructor as function 4.2) Inherit the super class constructor 4.3) Declare the class as an extension of presentation model 4.4) Initialize Init method to add properties and methods to the class 4.5) Add custom method/s techonestop.in8
  • 9. Example Example: In Contact Form Applet, if Status field has any value, show WorkPhoneNum#, else hide the field. techonestop.in9
  • 10. Step 1 Step 1: Verify the object class does not exist • Checks whether the class has already been implemented or not. This should be the first statement to avoid possible conflicts. • Syntax: if( typeof( SiebelAppFacade.customclassname ) === "undefined" ) { • Script for our example: // Verify same presentationmodel is not defined yet if( typeof( SiebelAppFacade.ShowHideFieldsPM ) === "undefined" ){ techonestop.in10
  • 11. Step 2 Step 2: Add the class to the siebel namespace •All new classes must be added to the SiebelAppFacade namespace. • Use ‘NameSpace()’ function to do this • Syntax SiebelJS.Namespace( "SiebelAppFacade. customclassname" ); • Script for our example: // Add the class to the SiebelAppFacade namespace SiebelJS.Namespace( "SiebelAppFacade.ShowHideFieldsPM"); techonestop.in11
  • 12. Step 3 Step 3: Define the presentation model file location and other dependencies if any • Define method identifies the module that Siebel Open Ui uses to locate the presentation model file and all other dependent modules • It must have a return statement like return " SiebelAppFacade. customclassname"; • Syntax define (module_name ,list_of_dependencies,function); - Module name is nothing but the presentation file name without file extension - List_of_dependencies is an array of all dependent modules which are required to run presentation model properly. If there is no dependencies, keep it blank. - Function identifies the function name that must return an object techonestop.in12
  • 13. Step 3 (cont..) • Script for our example: // Define the presentation model file location and other dependencies if any define("siebel/custom/ShowHideFieldsPM", [], function () { --- Write the code here--- return "SiebelAppFacade.ShowHideFieldsPM"; }); techonestop.in13
  • 14. Step 4 Step 4: Add constructor function within the class 4.1) Declare the class constructor as function 4.2) Inherit the super class constructor 4.3) Declare the class as an extension of presentation model 4.4) Initialize Init method to add properties and methods to the class 4.5) Add custom method/s techonestop.in14
  • 15. Step 4.1 Step 4.1. Declare the class constructor as function • Declare the class constructor as a child of SiebelAppFacade • It must have a return statement • Syntax SiebelAppFacade. customclassname = ( function(){ --- Writ the code here--- return customclassname; } ()); • Script for our example: // Declare the ShowHideFieldsPM class as function SiebelAppFacade.ShowHideFieldsPM = ( function(){ --- Write the code here--- return ShowHideFieldsPM; } ()); techonestop.in15
  • 16. Step 4.2 Step 4.2: Inherit the super class constructor • When Open UI calls the constructor, it passes a proxy object. Our custom constructor uses this proxy object to instantiate as-delivered objects • Syntax function customclassname ( proxy ){ SiebelAppFacade. customclassname.superclass.constructor.call( this, proxy ); } • Script for our example: // Call the superclass constructor function ShowHideFieldsPM( proxy ){ SiebelAppFacade.ShowHideFieldsPM.superclass.constructor.call( this, proxy ); } techonestop.in16
  • 17. Step 4.3 Step 4.3: Declare the class as an extension of presentation model • Use SiebelJS.extend() to declare the class as an extension of presentation model • Extended class can access all prebuilt functions • Syntax SiebelJS.Extend(customclassname,SiebelAppFacade.PresentationModel ); • Script for our example: //Extend the class so that it can access all prebuilt functions SiebelJS.Extend( ShowHideFieldsPM, SiebelAppFacade.PresentationModel ); techonestop.in17
  • 18. Step 4.4 Step 4.4: Initialize Init method to add properties and methods to the class • Declare the Init function of your class • Syntax CustomClassname.prototype.Init = function(){ • Call Superclass Init function to initialize as-delivered functionalities • Syntax SiebelAppFacade.CustomClassname.superclass.Init.call( this ); • It may include code that creates properties for the class, if needed • Syntax this.AddProperty( "Property Name", "" ); • It can also override supercalss methods • Syntax this.AddMethod( "Name of the method to override", custom method name, { sequence : false, scope : this } ); techonestop.in18
  • 19. Step 4.4 (Cont..) • Script for our example: ShowHideFieldsPM.prototype.Init = function(){ SiebelAppFacade.ShowHideFieldsPM.superclass.Init.call( this ); this.AddProperty( "ShowHideStatus", "" ); this.AddMethod( "ShowSelection", SelectionChange, { sequence : false, scope : this } ); this.AddMethod( "FieldChange", OnFieldChange, { sequence : false, scope: this } ); }; techonestop.in19
  • 20. Step 4.5 Step 4.5: Add custom method/s • Any method, specified in Init function or any custom method we want to implement, add the script here • Syntax: function CustomMethod(){ --- Write the code here --- } • Script for our example: function OnFieldChange( control, value ){ if( control.GetName() === "Status" ){ this.SetProperty( "ShowHideStatus", ( value ? true: false ) ); } } techonestop.in20
  • 21. Complete Script (Page 1 of 3) /*---------------------Presentation Model to Show/Hide a field--------------------*/ // Verify same presentationmodel is not defined yet if( typeof( SiebelAppFacade.ShowHideFieldsPM ) === "undefined" ){ // Add the class to the SiebelAppFacade namespace SiebelJS.Namespace( "SiebelAppFacade.ShowHideFieldsPM" ); // Define the presentation model file location and other dependencies if any define("siebel/custom/ShowHideFieldsPM", [], function () { // Declare the ShowHideFieldsPM class as function SiebelAppFacade.ShowHideFieldsPM = ( function(){ // Call the superclass constructor function ShowHideFieldsPM( proxy ){ SiebelAppFacade.ShowHideFieldsPM.superclass.constructor.call(this,proxy ); } //Extend the class so that it can access all prebuilt functions SiebelJS.Extend( ShowHideFieldsPM, SiebelAppFacade.PresentationModel ); techonestop.in21
  • 22. Complete Script (Page 2 of 3) // Initialize the object to add properties, methods ShowHideFieldsPM.prototype.Init = function(){ SiebelAppFacade.ShowHideFieldsPM.superclass.Init.call( this ); this.AddProperty( "ShowHideStatus", "" ); this.AddMethod( "ShowSelection", SelectionChange, { sequence : false, scope : this } ); this.AddMethod( "FieldChange", OnFieldChange, { sequence : false, scope: this } ); }; // Custom method to execute when next record is selected function SelectionChange(){ var controls = this.Get( "GetControls" ); var control = controls[ "Status" ]; var value = this.ExecuteMethod( "GetFieldValue", control ); this.SetProperty( "ShowHideStatus", ( value ? true: false ) ); } techonestop.in22
  • 23. Complete Script (Page 3 of 3) //Custom method to execute when field value changes function OnFieldChange( control, value ){ if( control.GetName() === "Status" ){ this.SetProperty( "ShowHideStatus", ( value ? true: false ) ); } } return ShowHideFieldsPM; } ()); return "SiebelAppFacade.ShowHideFieldsPM"; }); } techonestop.in23
  • 24. Highlights Presentation Model is a Javascript file which determines what logic should be applied to data on the client side. Steps to implement to Presentation Model Customization : 1) Verify the object class does not exists 2) Add the class to the siebel namespace 3) Define the presentation model file location and other dependencies if any 4) Add constructor function within the class 4.1) Declare the class constructor as function 4.2) Inherit the super class constructor 4.3) Declare the class as an extension of presentation model 4.4) Initialize Init method to add properties and methods to the class 4.5) Add custom method/s techonestop.in24
  • 25. Customizing The Physical Renderer Presented by TechOneStop Techonestop.in In a vision to make TECHNOLOGY simple for u techonestop.in2
  • 26. Objectives techonestop.in2 1) Describe the structure of physical renderer javascript file 2) Build a custom Physical Renderer JS file to implement own business logic
  • 27. Physical Renderer techonestop.in2 - Like presentation model, physical renderer is also client side javascript file - Responsible to build user interface (UI) - Can display same set of records (based upon same presentation model) in different ways on different views • List Applet • Form Applet • Carousel • Calendar • Table format • Tree
  • 28. Physical Renderer (Cont…) techonestop.in2 - Allows records to be displayed in different ways on different platform ( Desktop vs Mobile) - Uses third-party controls (like JQuery library) if required - Takes logical data and builds physical rendering of it in HTML using CSS files - Provides a binding layer to presentation model, binds HTML elements with the presentation model structures
  • 29. Scenarios of customizing the Physical Renderer - Show or hide a field based upon the property value of physical renderer - Display records in different ways like carousel, table, grid and many more - Platform specific look-and-feel like Desktop vs Mobile techonestop.in2
  • 30. Steps to customize Physical Renderer 1) Verify the object class does not exist 2) Add the class to the siebel namespace 3) Define the physical renderer file location and other dependencies if any 4) Implement a constructor function within the class 4.1) Declare the class constructor as function 4.2) Inherit the super class constructor 4.3) Declare the class as an extension of physical renderer 4.4) Declare bindings to the Presentation Model 4.5) Add custom method/s techonestop.in3
  • 31. Example Example: In Contact Form Applet, if Status field has any value, show WorkPhoneNum#, else hide the field ** In our previous module, we have built one presentation model JS file to capture the Status field value. Here we will write one physical render JS file to build the user interface. techonestop.in3
  • 32. Step 1 Step 1: Verify the object class does not exist • Checks whether the class has already been implemented or not. This should be the first statement to avoid possible conflicts. • Syntax: if( typeof( SiebelAppFacade.customclassname ) === "undefined" ) { • Script for our example: // Verify same PhysicalRenderer is not defined yet if( typeof( SiebelAppFacade.ShowHideFieldsPR ) === "undefined" ){ techonestop.in32
  • 33. Step 2 Step 2: Add the class to the siebel namespace • All new classes must be added to the SiebelAppFacade namespace. • Use ‘NameSpace()’ function of SiebelJS class to accomplish this • Syntax SiebelJS.Namespace( "SiebelAppFacade. customclassname" ); • Script for our example: // Add the class to the SiebelAppFacade namespace SiebelJS.Namespace( "SiebelAppFacade.ShowHideFieldsPR"); techonestop.in33
  • 34. Step 3 Step 3: Define the physical renderer file location and other dependencies if any • Define method identifies the module that Siebel Open UI uses to locate the physical renderer file and all other dependent modules • It must have a return statement like return " SiebelAppFacade. customclassname" • Syntax define (module_name ,list_of_dependencies,function); - Module name is physical renderer file name without file extension (.js) - List_of_dependencies is an array of all dependent modules which are required to run physical renderer properly. If there is no dependencies, keep it blank. - Function identifies the function name that must return an object techonestop.in34
  • 35. Step 3 (cont..) • Script for our example: // Define method to make sure Siebel Open UI can identify the constructor and other dependent files define("siebel/custom/ShowHideFieldsPR", ["order!3rdParty/jquery.signaturepad.min", "order!siebel/phyrenderer"], function () { techonestop.in35
  • 36. Step 4 Step 4: Implement a constructor function within the class 4.1) Declare the class constructor as function 4.2) Inherit the super class constructor 4.3) Declare the class as an extension of physical renderer 4.4) Declare bindings to the Presentation Model 4.5) Add custom method/s techonestop.in36
  • 37. Step 4.1 Step 4.1. Declare the class constructor as function • Declare the class constructor as a child of SiebelAppFacade • It must have a return statement • Syntax SiebelAppFacade. customclassname = ( function(){ --- Writ the code here--- return customclassname; } ()); • Script for our example: // Declare the ShowHideFieldsPR class as function SiebelAppFacade.ShowHideFieldsPR = ( function(){ --- Write the code here--- return ShowHideFieldsPR; } ()); techonestop.in37
  • 38. Step 4.2 Step 4.2: Inherit the super class constructor • When Open UI calls the constructor, it passes presentation model object. Our custom constructor uses this presentation model object to instantiate all required methods and attributes • Syntax function customclassname ( pm ){ SiebelAppFacade. customclassname.superclass.constructor.call( this, pm ); } • Script for our example: // Call the superclass constructor function ShowHideFieldsPM( pm){ SiebelAppFacade.ShowHideFieldsPM.superclass.constructor.call( this, pm ); } techonestop.in38
  • 39. Step 4.3 Step 4.3: Declare the class as an extension of physical renderer • Use SiebelJS.extend() to declare the class as an extension of physical renderer • Syntax SiebelJS.Extend(customclassname,SiebelAppFacade.PhysicalRenderer); • Script for our example: //Extend the class so that it can access all prebuilt functions SiebelJS.Extend( ShowHideFieldsPM, SiebelAppFacade.PhysicalRenderer ); techonestop.in39
  • 40. Step 4.4 Step 4.4: Declare bindings to the Presentation Model • Includes binding to the properties, declared in the Presentation Model • Syntax This.GetPM().AttachPMBinding ( “<Presentation Model Property Name>”, <Physical renderer method>, {scope:this}); • Script for our example: // Attach PM Binding SiebelAppFacade.ShowHideFieldsPR.superclass.Init.call(this); this.AttachPMBinding( "ShowHideFieldsPM", ModifyLayout ); }; techonestop.in40
  • 41. Step 4.5 Step 4.5: Add custom method/s • Any method, specified in Init function or any custom method we want to implement, add the script here • Syntax: function CustomMethod(){ --- Write the code here --- } techonestop.in41
  • 42. Complete Script (Page 1 of 3) /*----------------------Physical Renderer to Show/Hide a field----------------------*/ // Verify same PhysicalRenderer is not defined yet if( typeof( SiebelAppFacade.ShowHideFieldsPR ) === "undefined" ){ // Add the class to the SiebelAppFacade namespace SiebelJS.Namespace( "SiebelAppFacade.ShowHideFieldsPR" ); // Define method to make sure Siebel Open UI can identify the constructor and other dependent files define("siebel/custom/ShowHideFieldsPR", ["order!3rdParty/jquery.signaturepad.min", "order!siebel/phyrenderer"], function () { // Declare the ShowHideFieldsPR class as function SiebelAppFacade.ShowHideFieldsPR = ( function(){ // Call the superclass constructor function ShowHideFieldsPR( pm ){ SiebelAppFacade.ShowHideFieldsPR.superclass.constructor.call( this, pm ); } techonestop.in42
  • 43. Complete Script (Page 2 of 3) // Attach PM Binding SiebelAppFacade.ShowHideFieldsPR.superclass.Init.call(this); this.AttachPMBinding( "ShowHideFieldsPM", ModifyLayout ); }; // Custom Methods function ModifyLayout( ){ var controls = this.GetPM().Get( "GetControls" ); var canShow = this.GetPM().Get( "ShowHideStatus" ); var WorkPhoneNum = controls[ "WorkPhoneNum" ]; if( canShow ){ $( "div#WorkPhoneNum_Label" ).show(); $( "[name='" + WorkPhoneNum.GetInputName() + "']" ).show(); } techonestop.in43
  • 44. Complete Script (Page 3 of 3) else{ $( "div#WorkPhoneNum_Label" ).hide(); $( "[name='" + WorkPhoneNum.GetInputName() + "']" ).hide(); } } return ShowHideFieldsPR; } ()); return "SiebelAppFacade.ShowHideFieldsPR"; }); } techonestop.in44
  • 45. Highlights Physical Renderer is a Javascript file which is responsible to build user interface. Steps to implement to Physical Renderer Customization : 1) Verify the object class does not exist 2) Add the class to the siebel namespace 3) Define the physical renderer file location and other dependencies if any 4) Implement a constructor function within the class 4.1) Declare the class constructor as function 4.2) Inherit the super class constructor 4.3) Declare the class as an extension of physical renderer 4.4) Declare bindings to the presentation model 4.5) Add custom method/s techonestop.in45