{dialog.object}.getControl Method





The name of the control in the UX Component


Get a pointer to a control to call methods of an object, or set properties of an object.


Get a pointer to a control, such as a slider, date picker, map, etc. so that you can call methods of the object, or set properties of the object.

Only controls that are implemented as Javascript objects are returned.

For example, a slider control is implemented as a Javascript object. A standard HTML text box control, on the other hand is not implemented as a Javascript object -- it is just a standard HTML <input> control. If you call the .getControl() method on a textbox control, the method will return false. However, if you set certain properties on the textbox control (such as watermark, client-side formatting, mask etc) then a special 'helper' object is created for the textbox control and then the getControl() method will return a pointer to this helper object.

The {dialog.object}.getControl() method can used to get a pointer to a button object. Once you have a pointer to the object, you can call the .setDisabled() method.

For example:

var bObj = {dialog.object}.getControl('BUTTON_1');
//set the button disabled
//now enable the button
As a result of this change, if you have a client-side enable expression for a button in a Repeating Section, you will need to edit the enable expression and resave it in order to re-generate the Javascript code.

 Calling setDisabled on a Button in a Repeating Section

If you have a button in a Repeating Section, the .getControl() method will point to ALL of button instances (i.e. the button in row1, row2, etc.). If you then call the .setDisabled() method, you will be set the state on the button in each row.

If you want to call the .setDisabled() method for a specific button instance (say the button in row 3), then you can pass in an optional parameter to the .setDisabled() method. For example:

//get the instance number for row 3:
var row = {dialog.object}._repeatingSectionLogicalToPhysicalRow('SECTION_1',3);

//get a pointer the button element in row 3:
var eles = ${dialog.object}.getPointer('BUTTON_2_A5INSTANCE'+row);

//pass in eles as an optional argument to the .setDisabled() method

See Also