Bookshelf Home | Contents | Index | Search | PDF |
Siebel Interactive Designer API Reference > API Examples >
Example 1: Create a Custom Input UI Control
The code in the following example defines a graphical radio button input UI control that uses images instead of standard radio buttons to indicate whether the input UI control is selected. As with a radio button, the state of this input UI control changes when users click the radio button image.
Some definitions in this example refer to the following:
function BuildImageWidget(winObj,featureTableName,index, pictON, pictOFF)
{
ISS.RegisterUIElement(featureTableName, winObj, true);
var bPict = false;
var srcON, srcOFF;
var label = new ISS.Label_Obj(featureTableName);
if (index >= label.GetNumLabels()) { return ""; }
var srcON = label.GetLabelName(index,pictON);
var srcOFF = label.GetLabelName(index,pictOFF);
var presel = ISS.GetInputValue(featureTableName);
if (presel == null && typeof presel == "undefined") { return ""; }
var src;
if (presel==index) {
src = srcON;
} else {
src = srcOFF;
}
var s = '<A HREF="#" ' ;
s += ' onClick="ISS.SetInputValue(';
s += '\''+featureTableName+'\','+index;
s += ');return false;">';
s += '<IMG align="absmiddle" border = 0 src="'+src+
'"</IMG></a>';return s;
}
Bookshelf Home | Contents | Index | Search | PDF |
Siebel Interactive Designer API Reference Published: 18 April 2003 |