Radio Button

Radio Button

This element is used to display radio button selectors on the page.

Attributes

NameDescriptionValue
id

Unique Identifier.

Any
nameThe radio button name.Any
visiblemodesThe modes the button should be visible.A comma-separated list of the modes (read, new, edit)
visibilityconditionsThe conditions that should be met in order to display the radio button.'[[pagefunction, datatype, datapath ]]' operator(==,!=) 'value'
readonlyIf is true then the radio button cannot change its value.true or false
readonlyconditions

The conditions that should be met in order to display the radio button in read only mode.

'[[pagefunction, datatype, datapath ]]' operator(==,!=) 'value'
datapathThe data path field name.Needs to correspond to the CRMDO object field
datatypeThe type of datapath field.java.lang.Integer, java.lang.String, ...
refreshThe page parts that should be refreshed when the radio button value 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 
lookuptypeThe type of lookup.fixed, dataset, ejb
lookupnameThe dataset name if lookuptype is equals to dataset.

The file path under the folder 'Crm/WebContent/pages/search'

alwayseditableRadio buttons can be defined as always editable.true or false
reload

If is set to true then it means that the radio button will be called on every refresh of page. 

For lookuptype: dataset, ejb

true or false
options

Defines the options of the radio button.

For lookuptype: fixed

option1:option_label1;option2:option_label2;option3:option_label3

valueDefines the current value of the radio button.'[[pagefunction, datatype, datapath ]]'
defaultvalueThe default value to be assigned to a datapath.Any
onload

Defines the function call triggered to load the radio button.

For lookuptype: ejb

<function>…</function>
onchangeDefines the function call(s) triggered when the radio button value is changed.<functions>…</functions>

Examples

 Fixed

 

Fixed
<radiobutton>
	<id>rdbType</id>
	<label>key_type</label>
	<reload>true</reload>
	<lookuptype>fixed</lookuptype>
	<datapath>contactInformation/type</datapath>
	<datatype>enum</datatype>
		<options>PERSON:key_person;COMPANY:key_company</options>
		<type>singleline</type>
	<classname>com.crm.dataobject.contactinfo.ContactInformationType</classname>
	<refresh>page</refresh>
	<onchange>
		<functions>
			<function>
				<type>staticjs</type>
				<functionname>voidFunc</functionname>
			</function>
		</functions>
	</onchange>
</radiobutton> 
 EJB Lookup

 

EJB Lookup
<radiobutton>
	<id>rdbHomePagePreference</id>
	<lookuptype>ejb</lookuptype>
	<datapath>homePagePreference</datapath>
	<reload>true</reload>
	<onload>
		<type>ejb</type>
		<classname>ejb/CRMUIGeneralSetting</classname>
		<functionname>getHomePageOptions</functionname>
	</onload>
</radiobutton>