Appendix: Advanced Configurator Form Controls

This appendix provides the specific code for the form controls supported by Advanced Configurator for use in developing custom user interfaces:

Click to jump to top of pageClick to jump to parent topicSingle-Select Group Form Control

The following JSP code generates a single-select group form control in HTML:

<!-- METADATA TYPE="CalicoControl" startspan--> <% if (params != null) { params.clear(); params.put(PARAM_OBJECTNAME, <Object Name>); params.put(PARAM_ATTRIBUTES, <Attributes>); params.put(PARAM_CONTROLID, <Control ID>); params.put(PARAM_CAPTION, <Caption>); params.put(PARAM_GENERATENONEMODE, <Generate None Mode>); params.put(PARAM_GENERATENONETEXT, <Generate None Text>); generateSingleSelectGroup(params, request, out); } %> <!-- METADATA TYPE="CalicoControl" endspan -->

Note. The form control template filenames are in mixed case, i.e. SingleSelectGroup.jsp. For the deployments running on Solaris systems, make sure the characters of the filename match correctly (case-sensitive) with the template filenames.

The following is the HTML output of the previous JSP code:

<FONT COLOR="ctrlStateFontColor">Caption</FONT> <IMG BORDER="0" SRC="ctrlStateImage"><BR> <IMG ALT="ControlItemStateTag" BORDER="0" SRC="ControlItemStateImage"> <INPUT TYPE="radio" NAME="Control ID" VALUE="$NADA"><FONT COLOR="...">GenerateNoneText&nbsp</FONT><BR> <IMG ALT="- " BORDER="0" SRC="itemStateImag"> <INPUT TYPE="radio" NAME="Control ID" VALUE="ControlItemName~State">"><FONT COLOR="...">

Click to jump to top of pageClick to jump to parent topicMulti-Select Group Form Control

The following JSP code creates a multiple-select group form control in HTML.

<!-- METADATA TYPE="CalicoControl" startspan--> <% if (params != null) { params.clear(); params.put(PARAM_OBJECTNAME, <Object Name>); params.put(PARAM_ATTRIBUTES, <Attributes>); params.put(PARAM_CONTROLID, <Control ID>); params.put(PARAM_CAPTION, <Caption>); generateMultiSelectGroup(params, request, out); } %> <!-- METADATA TYPE="CalicoControl" endspan -->

The following is the HTML output of the previous JSP code:

<FONT COLOR="ctrlStateFontColor">Caption</FONT> <IMG BORDER="0" SRC="ctrlStateImage"><BR> <IMG ALT="ControlItemStateTag" BORDER="0" SRC="ControlItemStateImag"> <INPUT TYPE="checkbox" NAME="Control ID" VALUE="ControlItemName~State">"><FONT COLOR="..."> ControlItemName DeltaPrice</FONT><BR>

Click to jump to top of pageClick to jump to parent topicSingle-Select Table Form Control

The following JSP code creates a single-select table form control in HTML:

<!-- METADATA TYPE="CalicoControl" startspan--> <% if (params != null) { params.clear(); params.put(PARAM_OBJECTNAME, <Object Name>); params.put(PARAM_ATTRIBUTES, <Attributes>); params.put(PARAM_CONTROLID, <Control ID>); params.put(PARAM_CAPTIONIMAGE, <Caption Image>); params.put(PARAM_COLUMNHEADINGS, <Column Headings>); params.put(PARAM_GENERATENONEMODE, <Generate None Mode>); params.put(PARAM_GENERATENONETEXT, <Generate None Text>); generateSingleSelectTable(params, request, out); } %> <!-- METADATA TYPE="CalicoControl" endspan -->

The following is the HTML output of the previous JSP code.

<FONT COLOR="ctrlStateFontColor"> Caption </FONT> <IMG BORDER="0" SRC="ctrlStateImage"><BR> <TABLE> <TR> <TH></TH> <TH>ColumnHeadingItem</TH> ... </TR> <TR> <TD><IMG ALT="itemStateTag" SRC="itemStateImage"> <INPUT TYPE="radio" NAME="Control ID" VALUE="$NADA"> </TD> <TD>><FONT COLOR="ctrlItemStateFontColor">GenerateNoneText</FONT> </TD> </TR> <TR> <TD><IMG ALT="-" BORDER="0" SRC="itemStateImage"> <INPUT TYPE="radio" NAME="Control ID" VALUE="ControlItemName~ItemState"> </TD> <TD><FONT COLOR="ctrlItemStateFontColor">ControlItemAttribute </FONT> </TD> ... </TR> ... </TABLE>

Click to jump to top of pageClick to jump to parent topicMulti-Select List Form Control

The following JSP code creates a multiple-select list form control in HTML.

<!-- METADATA TYPE="CalicoControl" startspan--> <% if (params != null) { params.clear(); params.put(PARAM_OBJECTNAME, <Object Name>); params.put(PARAM_ATTRIBUTES, <Attributes>); params.put(PARAM_CONTROLID, <Control ID>); params.put(PARAM_CAPTION, <Caption>); generateMultiSelectList(params, request, out); } %> <!-- METADATA TYPE="CalicoControl" endspan -->

The following is the HTML output of the previous JSP code.

<FONT COLOR="ctrlStateFontColor"> Caption </FONT> <IMG BORDER="0" SRC="ctrlStateImage"><BR> <SELECT NAME="Control ID " MULTIPLE > <OPTION VALUE="$NADA">GenerateNoneText <OPTION VALUE="ControlItemName~State" >StateTag ControlItemName DeltaPrice

Click to jump to top of pageClick to jump to parent topicSingle-Select List Form Control

The following JSP code creates a single-select list form control in HTML:

<!-- METADATA TYPE="CalicoControl" startspan--> <% if (params != null) { params.clear(); params.put(PARAM_OBJECTNAME, <Object Name>); params.put(PARAM_ATTRIBUTES, <Attributes>); params.put(PARAM_CONTROLID, <Control ID>); params.put(PARAM_CONTROLSIZE, <Control Size>); params.put(PARAM_CAPTION, <Caption> ); params.put(PARAM_GENERATENONEMODE, <Generate None Mode>); params.put(PARAM_GENERATENONETEXT, <Generate None Text>); generateSingleSelectList(params, request, out); } %> <!-- METADATA TYPE="CalicoControl" endspan -->

The following is the HTML output of the previous JSP code.

<FONT COLOR="ctrlStateFontColor"> Caption </FONT> <IMG BORDER="0" SRC="ctrlStateImage"><BR> <SELECT NAME="Control ID "> <OPTION VALUE="$NADA">GenerateNoneText <OPTION VALUE="ControlItemName~State" >StateTag ControlItemName DeltaPrice

Click to jump to top of pageClick to jump to parent topicMulti-Select Table Form Control

The following JSP code creates a multiple-select table form control in HTML:

<!-- METADATA TYPE="CalicoControl" startspan--> <% if (params != null) { params.clear(); params.put(PARAM_OBJECTNAME, <Object Name>); params.put(PARAM_ATTRIBUTES, <Attributes>); params.put(PARAM_CONTROLID, <Control ID>); params.put(PARAM_COLUMNHEADINGS, <Column Headings>); params.put(PARAM_CAPTION, <Caption>); generateMultiSelectTable(params, request, out); } %> <!-- METADATA TYPE="CalicoControl" endspan -->

The following is the HTML output of the previous JSP code:

<FONT COLOR="ctrlStateFontColor"> Caption </FONT> <IMG BORDER="0" SRC="ctrlStateImage"><BR> <TABLE> <TR> <TH></TH> <TH>ColumnHeadingItem</TH> ... </TR> <TR> <TD><IMG ALT="itemStateTag" BORDER="0" SRC="itemStateImage"> <INPUT TYPE="checkbox" NAME="Control ID" VALUE="ControlItemName~ItemState " > </TD> <TD><FONT COLOR="ctrlItemStateFontColor">ControlItemAttribute </FONT> </TD> ... </TR> ... </TABLE>

Click to jump to top of pageClick to jump to parent topicSingle-Select Image

Pass parameters to the template, and create a single-select image on the model’s Web page as follows:

<!-- METADATA TYPE="CalicoControl" startspan--> <% if (params != null) { params.clear(); params.put(PARAM_OBJECTNAME, <Object Name>); params.put(PARAM_DOMAINMEMBERNAME, <Domain Member Name>); params.put(PARAM_IMAGEATTRIBUTE, <Image Attribute>); //or //params.put(PARAM_IMAGENAME, <Image Name>); //optional image parameters params.put(PARAM_IMAGEPATH, <Image Path>); params.put(PARAM_IMAGEWIDTH, <Image Width>); params.put(PARAM_IMAGEHEIGHT, <Image Height>); params.put(PARAM_IMAGESTATES, <Image States>); params.put(PARAM_MOUSEOVERIMAGES, <Mouseover Images>); params.put(PARAM_ALTTEXTATTRIBUTE, <Alt Text Attribute>); params.put(PARAM_ALTTEXT, <Alt Text>); params.put(PARAM_ADDITIONALATTRIBUTES, <Additional Attributes>); params.put(PARAM_AUTOSUBMIT, <Autosubmit>); //optional callback parameters params.put(PARAM_CREATECALLBACK, <Create Callback>); params.put(PARAM_SELECTCALLBACK, <Select Callback>); params.put(PARAM_UNSELECTCALLBACK, <Unselect Callback>); params.put(PARAM_MOUSEOVERCALLBACK, <Mouseover Callback>); params.put(PARAM_MOUSEOUTCALLBACK, <Mouseout Callback>); params.put(PARAM_AUTOSUBMITCALLBACK, <Autosubmit Callback>); generateSingleSelectImage(params, request, out); } %> <!-- METADATA TYPE="CalicoControl" endspan -->

Click to jump to top of pageClick to jump to parent topicSingle-Select Image Table

Pass parameters to the template and create a single-select image table on the model’s Web page as follows:

<!-- METADATA TYPE="CalicoControl" startspan--> <% if (params != null) { params.clear(); params.put(PARAM_OBJECTNAME, <Object Name>); params.put(PARAM_CAPTION, <Caption>); //or //params.put(PARAM_CAPTIONIMAGE, <Caption Image>); params.put(PARAM_IMAGEATTRIBUTE, <Image Attribute>); //optional standard Advisor parameters params.put(PARAM_SORT, <Sort>); params.put(PARAM_FILTERELIMINATEDITEMS, <Caption Image>); params.put(PARAM_FILTERELIMINATIONLEVEL_LOWER, <Lower E Level>); params.put(PARAM_FILTERELIMINATIONLEVEL_UPPER, <Upper E Level>); params.put(PARAM_COMPARATOR, <Comparator>); //optional image parameters params.put(PARAM_IMAGEPATH, <Image Path>); params.put(PARAM_IMAGEWIDTH, <Image Width>); params.put(PARAM_IMAGEHEIGHT, <Image Height>); params.put(PARAM_IMAGESTATES, <Image States>); params.put(PARAM_MOUSEOVERIMAGES, <Mouseover Images>); params.put(PARAM_ALTTEXTATTRIBUTE, <Alt Text Attribute>); params.put(PARAM_ADDITIONALATTRIBUTES, <Additional Attributes>); params.put(PARAM_AUTOSUBMIT, <Autosubmit>); //optional callback parameters params.put(PARAM_CREATECALLBACK, <Create Callback>); params.put(PARAM_SELECTCALLBACK, <Select Callback>); params.put(PARAM_UNSELECTCALLBACK, <Unselect Callback>); params.put(PARAM_MOUSEOVERCALLBACK, <Mouseover Callback>); params.put(PARAM_MOUSEOUTCALLBACK, <Mouseout Callback>); params.put(PARAM_AUTOSUBMITCALLBACK, <Autosubmit Callback>); //optional table parameters params.put(PARAM_COLUMNS, <Columns>); params.put(PARAM_ROWS, <Rows>); params.put(PARAM_BORDER, <Border>); params.put(PARAM_CELLSPACING, <Cell Spacing>); params.put(PARAM_CELLPADDING, <Cell Padding>); generateSingleSelectImageTable(params, request, out); } %> <!-- METADATA TYPE="CalicoControl" endspan -->

Click to jump to top of pageClick to jump to parent topicApplication Why Help

The following JSP code creates the application why help in HTML:

<!-- METADATA TYPE="CalicoControl" startspan--> <% if (params != null) { params.clear(); params.put(PARAM_CAPTION, <Caption>); generateApplicationWhyHelp(params, request, out); } %> <!-- METADATA TYPE="CalicoControl" endspan -->

The Caption parameter value is the string to be displayed as the caption for the violations. The Caption Image is the image to be displayed as the caption for the violations. Specify either Caption or Caption Image but not both.

Note. There are no required parameters for the Application Why Help form control template.

The following is the HTML output of the previous JSP code:

Caption <LI>ViolationItem 1 <LI>ViolationItem 2

Click to jump to top of pageClick to jump to parent topicForm Control Why Help

The following JSP code creates the Form Control Why Help in HTML:

<!-- METADATA TYPE="CalicoControl" startspan--> <% if (params != null) { params.clear(); params.put(PARAM_OBJECTNAME, <Object Name>); params.put(PARAM_CAPTION, <Caption>); generateControlWhyHelp(params, request, out); } %> <!-- METADATA TYPE="CalicoControl" endspan -->

Note. PARAM_OBJECTNAME is the only required parameter for the Control Why Help form control template.

The following is the HTML output of the previous JSP code:

Caption <LI>ViolationItem 1 <LI>ViolationItem 2 ...

Click to jump to top of pageClick to jump to parent topicText Input Form Control

Pass parameters to the template, and create the text input text box on the model’s Web page as follows:

<!-- METADATA TYPE="CalicoControl" startspan--> <% if (params != null) { params.clear(); params.put(PARAM_OBJECTNAME, <Object Name>); params.put(PARAM_CAPTION, <Caption>); //or //params.put(PARAM_CAPTIONIMAGE, <Caption Image>); // optional parameters params.put(PARAM_TEXTINPUTDEFAULT, <Default Entry>); params.put(PARAM_ENTRYSIZE, <Entry Size>); generateTextInput(params, request, out); } %> <!-- METADATA TYPE="CalicoControl" endspan -->

Click to jump to top of pageClick to jump to parent topicNumeric Data Form Control

The following JSP code creates a numeric data control on the model's web page:

<!-- METADATA TYPE="CalicoControl" startspan--> <% if (params != null) { params.clear(); params.put(PARAM_OBJECTNAME, <Object Name>); params.put(PARAM_CAPTION, <Caption>); //or you could use //params.put(PARAM_CAPTIONIMAGE, <Caption Image>); // but not both caption parameters. generateNumericData(params, request, out); } %> <!-- METADATA TYPE="CalicoControl" endspan -->

The following is the HTML output of the previous JSP code:

Caption :&nbsp;&nbsp;Numeric Data

Click to jump to top of pageClick to jump to parent topicExtern Entry

Use the following to pass parameters to the template, and to create the extern entry text box on the model’s Web page:

<!-- METADATA TYPE="CalicoControl" startspan--> <% if (params != null) { params.clear(); params.put(PARAM_OBJECTNAME, <Object Name>); params.put(PARAM_CONTROLID, <Control ID>); params.put(PARAM_CAPTION, <Caption>); //or //params.put(PARAM_CAPTIONIMAGE, <Caption Image>); // optional parameters params.put(PARAM_FLOATENTRY, <Float Entry>); params.put(PARAM_DATE, <Date Entry>); params.put(PARAM_INTEGER, <Integer Entry>); params.put(PARAM_BOOLEAN, <Boolean Entry>); params.put(PARAM_STRINGENTRY, <String Entry>); params.put(PARAM_ENTRYSIZE, <Entry Size>); generateExternEntry(params, request, out); } %> <!-- METADATA TYPE="CalicoControl" endspan -->