Description
This element is used to display a select box on the page.
Attributes
Name | Description | Value |
---|---|---|
id | Unique Identifier | Any |
name | A name that describes the select box | Any |
visiblemodes | The modes select box should be visible. | A comma-separated list of the modes read / new / edit |
visibilityconditions | The conditions that should be met in order to display the select box. | '[[pagefunction, datatype, datapath ]]' operator(==,!=) 'value' |
readonly | If is true then select box cannot change value. | true,false |
readonlyconditions | The conditions that should be met in order to display the select box in read only mode. | '[[pagefunction, datatype, datapath ]]' operator(==,!=) 'value' |
datapath | The data path field name | Needs to correspond to the CRMDO object field. |
datatype | The type of datapath field | alias,java.lang.Integer, java.lang.String,... |
refresh | The page parts that should be refreshed when the select box change. | page mainmenu main details tab,tabID component,is_on_tab:is_on_menu:tabID:componentID element,is_on_tab:is_on_menu:tabid:componentID:elementID section,sectionID area,areaID |
type | The type 'singleline' can be used to show all options in one line, instead of one per row. | singleline |
lookuptype | The type of lookup | fixed, dataset, ejb |
lookupname | The dataset name if lookuptype is equals to dataset | the file path under the folder 'Crm/WebContent/pages/search' |
alwayseditable | select boxes can be defined as always editable | true, false |
reload | If is set to true then means that radio button will be called on every refresh of page. For lookuptype: dataset, ejb | true, false |
options | Defines the options of select box. For lookuptype: fixed | option1:option_label1;option2:option_label2;option3:option_label3 |
value | Defines the current value of select box | '[[pagefunction, datatype, datapath ]]' |
defaultvalue | the default value to be assign on datapath. | any |
onload | Defines the function call triggered to load select box. For lookuptype: ejb | <function>…</function> |
onchange | Defines the function call(s) triggered when select box value changed. | <functions>…</functions> |
Examples
Select box - Fixed
<selectbox> <reload>true</reload> <lookuptype>fixed</lookuptype> <datapath>effectiveDateType</datapath> <defaultvalue>NEW_CUSTOMER</defaultvalue> <options>BINDINGSTARTDATE:Binding start date;SERVICEEFFECTIVEDATE:Service effective date;AGREEMENTDATE:Agreement date/options> <refresh>page</refresh> <onchange> <functions> <function> <type>staticjs</type> <functionname>voidFunc</functionname> </function> </functions> </onchange> </selectbox>
Select box - Ejb lookup
<selectbox> <id>slbValidTo</id> <lookuptype>ejb</lookuptype> <datapath>validToType</datapath> <datatype>enum</datatype> <classname>com.crm.dataobject.products.ProductValidToType</classname> <reload>true</reload> <refresh>component,true:false:tabProductValidity:cmpValidTo</refresh> <onload> <type>ejb</type> <classname>ejb/CRMUIProduct</classname> <functionname>getValidToTypeOptions</functionname> <parameters> <parameter> <value>null</value> </parameter> </parameters> </onload> <onchange> <functions> <function> <type>ejb</type> <classname>ejb/CRMUIProduct</classname> <functionname>resetValidToDate</functionname> <resultaction>replace</resultaction> <datatype>root</datatype> <parameters> <parameter> <value>[[getDTO]]</value> <datatype>java.lang.Object</datatype> </parameter> <parameter> <value>[[getValue,java.lang.String,validity[CURRENT_ROW]]]</value> <datatype>java.lang.Object</datatype> </parameter> </parameters> </function> </functions> </onchange> </selectbox>
Select box - Dataset lookup
<selectbox> <id>slbType</id> <lookuptype>dataset</lookuptype> <lookupname>products.loadtypes;prodtypeid;prodtypename;</lookupname> <datapath>type</datapath> <datapathid>id</datapathid> <classname>com.crm.dataobject.products.CRMDOProductType</classname> <datatype>load</datatype> <reload>true</reload> <refresh>page</refresh> <onchange> <functions> <function> <type>staticjs</type> <functionname>voidFunc</functionname> </function> </functions> </onchange> </selectbox>