Child pages
  • RuntimeBean
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Refresh page Apr 28, 2024 07:12

Supported Clients
MobileClient

Extends
RuntimeComponent

Property Summary
Boolean enabled Gets or sets the enabled state of a specified field, also known as "grayed".
Boolean visible Gets or sets the visibility of an element; true - visible; false - not visible; ! - the visibility state is inverted (the opposite).

Methods Summary
String getName() Returns the name of an element.

Property Details

enabled

Gets or sets the enabled state of a specified field, also known as "grayed".
true - enabled; false - not enabled; ! - the enabled state is inverted (the opposite).

NOTE: A disabled element cannot be selected by clicking the element (or by pressing the TAB key even if this option is supported by the operating system).

NOTE: A label or button element will not disable if the "displayType" design time property for a field is set to HTML_AREA.

NOTE: The disabled "grayed" color is dependent on the LAF set in the Servoy Client Application Preferences. For more information see Preferences: Look And Feel in the Servoy Developer User's Guide.

Returns

Supported Clients

SmartClient,WebClient,MobileClient

Sample

//gets the enabled state of the field
var currState = %%prefix%%%%elementName%%.enabled;

//sets the enabled state of the field
%%prefix%%%%elementName%%.enabled = !currentState;

visible

Gets or sets the visibility of an element; true - visible; false - not visible; ! - the visibility state is inverted (the opposite).

NOTE: The visibility of an element is not persistent; the state of visibility only applies to the current user in his/her current session.

Returns

Supported Clients

SmartClient,WebClient,MobileClient

Sample

//sets the element as visible
forms.company.elements.faxBtn.visible = true;

//gets the visibility of the element
var currentState = forms.company.elements.faxBtn.visible;

//sets the element as not visible when the current state is visible
forms.company.elements.faxBtn.visible = !currentState;

Methods Details

getName()

Returns the name of an element. (may be null as well)

Returns

Supported Clients

SmartClient,WebClient,MobileClient

Sample

var name = %%prefix%%%%elementName%%.getName();

  • No labels