This is our final steps in this customization. Here we are
going to Map our custom physical render & Physical Model. We are validating the EmailAddress field in
contact form applet.
We are mapping our Key. Hope you remember our key, that we
used to register.
So in tools go to contact
form applet.
Expand Applet user property
1.
Create a new user property Name ->
Physical_Render and Render Key as its value (Shown in fig)
Compile Object.
2.
Now Copy our code (Physical Render &
Physical model )to SCRIPTS->Siebel->custom
folder
3.
Open OBJECTS
Folder. There you can see “manifest_extensions.map”.
Open this in a notepad or wordpad. Map our Key with applet.
4.
Open “custom_manifest.xml”
in the same folder.
Find
<PLATFORM_KEY_SPECIFIC>
<PLATFORM
Name="Desktop">
Here we map our physical render
Open a new node and write our file name as
shown in fig
Find <KEY_COMMON>
Here we map our physical Model
Now we finished everything. Make sure that
you compiled applet. Clear your browser cache.
And launch application and change your email. Hope everything works
well.
hello, I tried your code as well as others and I have a problem. when I add the mapping file 'manifest_extensions.map' I only see the applet bar.
ReplyDeleteexample:
[Presentation_Model]
Contact List Applet = ValidatePModel
[Physical_Renderer]
Contact List Applet = ValidatePRenderer
can you help me?
"I only see the applet bar." you mean when the page rendered you only see Applet head? . If so, there is some problem in your code. (PM/PR)
DeletePlease let me know, which code you used..or send me that code.
Hi Prasanth,
ReplyDeleteI tried you code the email validation doesn't work and I get the below error in AccNavigationPhyRenderer.js file when I tried debugging in Google Chrome.
Uncaught TypeError: Object [object Object] has no method 'tabs'
Can you please help?
Thanks in advance.
I tried you code, the email validation doesn't work and I get the below error in AccNavigationPhyRenderer.js file when I tried debugging in Google Chrome.
ReplyDeleteUncaught TypeError: Object [object Object] has no method 'tabs'
Can you please help?
Thanks in advance.
Hi,
DeletePlease send me the code, that you wrote. The code provided in this example is tested and is working.I will help you to debug this. Please let me know about the code in detail.
Hi Prasanth,
ReplyDeleteThank you for quick response.
Below is the code and configuration details
validatePM.js
if( typeof( SiebelAppFacade.ValidatePM ) === "undefined" ){
SiebelJS.Namespace( "SiebelAppFacade.ValidatePM" );
SiebelApp.S_App.RegisterConstructorAgainstKey( "ValidatePModel","SiebelAppFacade.ValidatePM" );
SiebelAppFacade.ValidatePM = ( function(){
function ValidatePM( proxy ){
SiebelAppFacade.ValidatePM.superclass.constructor.call( this, proxy);
}
SiebelJS.Extend( ValidatePM, SiebelAppFacade.PresentationModel );
ValidatePM.prototype.Init = function(){
SiebelAppFacade.ValidatePM.superclass.Init.call( this );
this.AddProperty( "isEmailSet", "" );
this.AddMethod( "FieldChange", OnFieldChange, { sequence : false, scope: this } );
};
function OnFieldChange( control, value ){
if( control.GetName() === "EmailAddress" ){
this.SetProperty( "isEmailSet", ( value ? true: false ) );
}
}
return ValidatePM;
}());
}
------------------------------------------------
validatePR.js
if( typeof( SiebelAppFacade.ValidatePR ) === "undefined" ){
SiebelJS.Namespace( "SiebelAppFacade.ValidatePR" );
SiebelApp.S_App.RegisterConstructorAgainstKey( "ValidatePRenderer", "SiebelAppFacade.ValidatePR" );
SiebelAppFacade.ValidatePR = ( function(){
function ValidatePR( pm ){
SiebelAppFacade.ValidatePR.superclass.constructor.call( this, pm );
this.GetPM().AttachPMBinding( "isEmailSet", validateEmail, { scope: this });
}
SiebelJS.Extend( ValidatePR, SiebelAppFacade.PhysicalRenderer );
function validateEmail() {
alert("going to validate");
var controls = this.GetPM().Get( "GetControls" );
var cntrl = controls[ "EmailAddress" ];
var emailcntrl = cntrl.GetInputName();
var email = $('input[name="'+emailcntrl+'"]').val();
var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;
if( !emailReg.test( email ) ) {
alert("Please enter a valid Email");
return false;
} else {
alert("This is a valid Email");
return true;
}
}
return ValidatePR;
}());
}
------------------------------------------------
custom_manifest.xml
siebel/applet.js
siebel/pmodel.js
siebel/custom/validatePM.js
siebel/applet.js
siebel/pmodel.js
siebel/custom/validatePM.js
-----------------------------------------------
manifest_extensions.map
[Presentation_Model]
Contact Form Applet = ValidatePModel
[Physical_Renderer]
Contact Form Applet = ValidatePRenderer
------------------------------------------------
Contact Form Applet user property
Name Value
Physical_Renderer ValidatePRenderer
Presentation_Model ValidatePModel
Thanks a lot
Hi,
DeletePlease make sure that you have a control "EmailAddress" in your applet.
Make sure that you put the custom_manifest.xml is properly prepared.
Give an alert in PM & PR to make sure that both files are loaded. You can check this using f12 and search file_name.js
"lets debugg this"
Let me know your name. :)
Hi Prasanth,
ReplyDeleteThank you for quick response.
The steps suggested by you have already been tried. However, no luck.
Can you please provide me your email id so that I can send you the actual files/screenshots.
Thank you.
Regards,
V G Nayak
This comment has been removed by the author.
DeleteHi Prasanth,
ReplyDeleteThanks for providing your mail id.
I have sent the files and screenshots to the email id provided.
Thanks for your help in resolving the issue.
Regards,
V G Nayak
Hello Prasanth,
ReplyDeleteBy any chance did you happen to check the files I have sent?
Thanks & Regards,
V G Nayak
Hi VG,
DeletePlease check your mail.
Hello Prasanth,
ReplyDeleteNow it is working. I am still not able to understand what was causing that error.
Thank you very much for your help. Expecting more articles from you on Siebel Open UI.
Regards,
V G Nayak
Hi Nayak,
ReplyDeleteWhat was the fix for the issue?
Hi Prashant,
I have started working on Open UI recently. I would like some examples on List Applets. I'm facing an issue with List Applets. When I host the application I dont get the list for the applet (Scenario Example: In the contacts page, when I say "All Contacts" the contact list does not appear. But the Menu bar comes without the record. There is some issue with my PR, PM or the Custom_manifest file. But not sure wat it is. I'm referencing: ListApplet and Listpmodel JS files for PM and jqgridrenderer, jqgrid-ext, jquery.jqGrid.min.js, grid.locale-en.js for PR in Custom_Manifest file.)
Pls help me.
Yea!! May be some issues with PR.
DeleteHappy to help you.. Need more details.
can u share me ur email id?
Delete-Anita
prasanths1989mvk@gmail.com
DeletePrashanth,
DeleteI figured out an work around for the issue. Thanks for your time.
Can you please share the fix for that issue.
DeleteI am extending JQGridRenderer itself in the PR (as commented below)
Anybody has a fix for this issue
ReplyDeleteHi Prasanth,
ReplyDeletecan u help me on the same issue(if i done any customizations for list applet only header part is getting loaded data is not getting loaded)
Thanks in advance
Venkat..
Your custom code have some error. So the remaining js that helps to load data into list applet will not work. To trouble shoot, PR/PM code is necessary
DeleteAll,
ReplyDeleteIssue of List applet not getting loaded with above PM and PR is these are for form applets and not list applet. If you would want to use with list applets change the following line in your PM and PR:
PM:
SiebelJS.Extend(SISPM, SiebelAppFacade.PresentationModel);
with
SiebelJS.Extend(SISPM, SiebelAppFacade.ListPresentationModel);
PR:
SiebelJS.Extend(SISPR, SiebelAppFacade.PhysicalRenderer);
with
SiebelJS.Extend(SISPR, SiebelAppFacade.JQGridRenderer);
--Pankaj
For above issue i.e only header getting displayed for list applet and no data
ReplyDeleteIn PR:
Replace
SiebelJS.Extend(SISPR, SiebelAppFacade.PhysicalRenderer);
with
SiebelJS.Extend(SISPR, SiebelAppFacade.JQGridRenderer);
IN PM:
Replace
SiebelJS.Extend(SISPM, SiebelAppFacade.PresentationModel);
with
SiebelJS.Extend(SISPM, SiebelAppFacade.ListPresentationModel);
and do add all the necessary List applet files in custom_manifest file.
Thank you Very much Pankaj for sharing this.
DeleteHello Prasanth,
ReplyDeleteI have a PR which contains the logic of validating an email along with many other logic.I have to re-use this(email) logic for email fields in several other applets. Is it possible? if yes it would be a great help if you could explain it with an example.
Thanks in advance,
V G Nayak
Hi Nayak,
ReplyDeleteI think we can publish our libraries with global scope and we can reuse them. For example, Siebel open ui adds jQuery Library in global Scope, and uses its functions in PM,PR etc.. Like wise once you write validation script you can use it throughout application.
Hi Prasanth,
ReplyDeleteWe have a requirement in our project where in we would like to render the list applet as a form. By this what i mean is every record in the list applet must get rendered as a form with each record one below the other. Can you please let me know how should i go about configuring this requirement.
Also since i am new to open ui can you please tell me which is the .js file that is used to render the list applet OOB.
Thanks,
Sukhesh
List applets are generally showing the data in Data table(jQGrid).It uses "table" tags in HTML, and difficult to alter "table" tags. So a CSS expert can do something. Anyway nothing is impossible. Play with CSS and bring changes. The javascript level changes is not recommended.
DeleteI didn't get your second question.
Hi,
DeleteThanks for the update. My second question what what is the physical renderer file used to render the list applet in siebel open ui out of the box without any customization.
Hi,
ReplyDeleteHas anyone found the fix for this issue? I am not able to get any alerts for the email validation.
Hi,
DeletePlease include your name in comment, otherwise very difficult to track your old comments.
Hi Prasanth,
ReplyDeleteWe have installed Open UI .Under particular view, list applet and form applet are there referring to same BC. On navigating to the view, I can see the data in list applet but form applet is empty. No data in any of the control. Also, except 'menu' all the other controls are missing. Kindly guide me where I need to check.
Regards,
Madhu
Hi Prasanth,
ReplyDeleteI followed above procedure. after compiling i am unable to see the contact list applet.
please help to solve the issue.
Thanks
Nagesh.P
HI Nagesh,
DeleteFor List Applet, We need to something else(jqgrindrenderer), you can try this example with Form Applet
Hi Can you help me how to get the Profile Attribute value in PM level?
ReplyDeleteHi,Can anyone please help me how to get the Profile Attribute at PM level with code example.
ReplyDeleteSiebelAppFacade.S_App.GetProfileAttr("name") & Same for Set with two arguments, same as in eScript but instead of TheApplication(), use SiebelAppFacade.S_App
Delete