Beruflich Dokumente
Kultur Dokumente
Module 9: Presentation
Model/Physical Renderer –
List Applet
var pH = this.GetPM().Get("GetPlaceholder");
$("#"+pH).before("<span style='color:red'>BEFORE PHOLD</span>");
$("#"+pH).after("<span style='color:red'>AFTER PHOLD</span>");
var PM = this.GetPM();
var rs = PM.Get("GetRecordSet");
var ph = PM.Get("GetPlaceholder"); Zero-Based Loop
for (var r=0; r < rs.length; r++){
var id = r+1;
$("#"+ph+" #"+id)...
}
var PM = this.GetPM();
var rs = PM.Get("GetRecordSet");
for (var r=1; r <= rs.length; r++){ One-Based Loop
$("#"+r)...
}
var PM = this.GetPM();
var rs = PM.Get("GetRecordSet");
var ph = PM.Get("GetPlaceholder");
for (r in rs){
if (rs[r]["FieldName"] == value) {
... do something ...
}
var PM = this.GetPM();
var rs = PM.Get("GetRecordSet");
for (r in rs){
var id = parseInt(r)+1;
$("#"+id)...
}
Example
Highlight the rows in Opportunity List Applet in which the total revenue is grater than $500,000
...
define("siebel/custom/CustOppListAppletPR", ["siebel/jqgridrenderer"], function () {
...
SiebelJS.Extend(CustOppListAppletPR, SiebelAppFacade.JQGridRenderer);
...
var rs = PM.Get("GetRecordSet");
for (rowNum in rs) { // This will range from 0 to 9
var amount = rs[rowNum]["Primary Revenue Amount"];
var amountAsNumber=parseFloat(amount.replace(/[$,]+/g,""));
if (amountAsNumber>500000) {
recNum = Number(rowNum)+1;
$("#"+recNum).css({"background-color":"red"});
}
}
• JQGridRenderer
• PhysicalRenderer
• ListPhysicalRenderer
• BindEvents()
• Init()
• BindData()