Bookshelf Home | Contents | Index | PDF |
Siebel Advisor API Reference > Pageset Functions for Siebel Advisor > BuildWidgetUsageUse the BuildWidget function to add the following input UI controls to a display page in a browser-based application: The image map, list box, radio button, and check box input UI controls allow a user to make feature selections in a browser-based application. The text box input UI control allows the user to enter data that can be reused in the application. You call the BuildWidget function in the <BODY> section of a display page. Also, all BuildWidget calls must be inside the <FORM> section of the HTML source of display pages. The function is usually called from within a JavaScript document.write method. SyntaxBuildWidget(type,window,name[,arg1,arg2,arg3,arg4,arg5])
Check Box Input UI ControlsThe syntax used to create a check box input UI control is: ISS.BuildWidget("CHECKBOX",window,name)
NotesThe Feature table associated with a check box input UI control defines whether the input UI control is checked or cleared. Therefore:
ExampleThe following sample code creates a check box input UI control: <TD><FONT face=verdana size=2><B>Personalized Plates <TD><SCRIPT> document.write(ISS.BuildWidget ("CHECKBOX",window,"PLATE"));</SCRIPT></TD> Image Map Input UI ControlsAn image map input UI control functions in much the same way as a group of radio button input UI controls function. For example, an image map input UI control can take the form of a three-color item. Users would click on a color, instead of a radio button, to make a selection. In the relevant Feature table, you must specify the UI control name and its map name, input shape, and coordinates. You can swap your own image files to represent a selected palette, but you must provide your own browser-specific code to use DHTML to swap images. The syntax used to create an image map input UI control is: ISS.BuildWidget("MAP",window,name,mapName,fileCol, shapeCol,coordCol) ExampleThe following sample code creates an image map input UI control whose image source file name is defined in the PICT column of the COLOR Feature table: document.write(ISS.BuildWidget("MAP",window,"COLOR", The following sample code creates an image map input UI control that directly calls the image source file called Flag.gif. This file should be located the pg directory. document.write(ISS.BuildWidget("MAP",window,"COLOR", List Box Input UI ControlsThe name argument is the name of the Feature table that contains the data used to populate the list. The data in the DESC column of this table is always used to populate the list. Additionally, you must specify height, width, and prefill arguments for the input UI control. The syntax used to create a list box input UI control is: BuildWidget("LISTBOX",window,name,height,width,prefill) Notes
ExampleThe following sample code creates a list box that draws feature data from the Feature table COLORINT. Note that the actual caption text is created using a separate HTML entry. document.write(ISS.BuildWidget("LISTBOX",window, Radio Button Input UI ControlsYou can create a radio button input UI control that uses a graphic caption for the radio button instead of a text caption.The graphic specified for the imageFile argument will be used for the button caption. The syntax used to create a radio button input UI control with a text caption is: ISS.BuildWidget("RADIO",window,name,indexRow[,imageFile]) Notes
ExamplesThe following sample code creates a radio button input UI control. This input UI control is based on the first row of the Feature table BODY, and the indexRow argument is set to 0. The caption text is created using a separate HTML entry. document.write(ISS.BuildWidget("RADIO",window,"BODY",0)); The following sample code creates the same 2-Door Coupe radio button as in the previous example, but with a graphic caption. document.write(ISS.BuildWidget("RADIO",window, The PICT argument will first attempt to get the graphic from BODY.PICT. If there is no PICT column in BODY, it will get the graphic directly. document.write(ISS.BuildWidget("RADIO",window,"BODY",0, TwoDoorCoupe.gif should reside in the pg directory. Text Entry Input UI ControlsA text entry input UI control allows you to enter text in the application. This text is stored as a value in the selection set under the name specified as the name argument. The syntax used to create a text entry input UI control is: BuildWidget("GETTEXT",window,name,width) Notes
ExampleThe following sample code creates a text entry input UI control. The caption text is created using a separate HTML code. Text entered into this input UI control is saved under the name PLATETEXT. Enter text for your custom license plate: <SCRIPT>document.write(ISS.BuildWidget("GETTEXT",window, |
Siebel Advisor API Reference |