Read only Siebel Product Configurator.

Requirement:
Requirement is to make the Configurator session read only conditionally, so that user should not be able to edit the product configuration but he should be able to view the configuration inside the configurator.

Solution
This requirement can be implemented by editing vanilla/custom JavaScript libraries of the Product Configurator. The most of the work in showing the UI is done by cfgui.jsfile.

Cfgui.js is a javascript library that converts the swe tags to the HTML tags that shows up as UI in siebel application.

For Example:

Here is one code in the swe template :
< id="swe:IncPAId+853" cfgfieldname="AttValue" cfghtmltype="CfgTextBox" forcerefresh="Y" cfgjsshow="showTextBox" cfgjsupdateselection="updateSelectionInfoForAttribute" >


now in cfgui this swe code is converted in to HTML like this:

innerHTML = " < input type=\"teext\" " + "value=\"" + displayValue + "\" " + "id=\"GRPITEM" + _pipe + grpItemId + _underscore + "ATTTYPE" + _pipe + "TEXT" +"\"" + " onchange='processInput(\"GRPITEM" + _pipe + grpItemId + _underscore + "ATTTYPE" + _pipe + "TEXT" +"\", \"\", \"text\")' />";

now when you closely go through the code, you will create the following string at the output:

< type="”text”" value="”Somevalue" id="”generated" onchange="”processInput(“Some arguments") >


and that looks like very basic html snipet, which can be edited to make control read only by adding disabled=true in the js code tag.

To make it work conditionally, we can check for the some profile attribute inside the js file like this:

var readonly = top.theApplication().GetProfileAttr("ReadOnly");
top.theApplication().SetProfileAttr("ReadOnly","N");

if (readOnly == "Y")
innerHTML = "";

else
innerHTML = "";

Other Siebel Blogs

siebel-admin-l @ IT - toolbox

siebel-dev-l @ IT - toolbox