public interface Control extends WebFormEventOwner
Control
interface provides the base class for all controls, with common methods and properties shared by all controls.
It is overridden for specific controls.
Individual controls can be accessed via the Controls
interface.
Modifier and Type | Method and Description |
---|---|
void |
addCssClass(java.lang.String cssClass)
Adds one or more CSS classes to the list of classes applied to the control, retaining any existing classes.
|
Control |
getAll()
Returns a control object of the same type as the control object on which this method is invoked, that gives access
to all occurrences of this control on the page.
|
java.lang.String |
getCssClass()
Returns the list of CSS classes configured for the control.
|
java.lang.String |
getErrorMsgClass()
Returns the list of CSS classes configured for error messages when the messages are displayed locally to the control.
|
java.lang.String |
getErrorMsgStyle()
Returns the inline CSS style configured for error messages when the messages are displayed locally to the control.
|
java.lang.String |
getInfoMsgClass()
Returns the list of CSS classes configured for info messages when the messages are displayed locally to the control.
|
java.lang.String |
getInfoMsgStyle()
Returns the inline CSS style configured for info messages when the messages are displayed locally to the control.
|
LayoutCell |
getLayoutCell()
Returns the
LayoutCell object which can be used to override properties of the parent control's layout as applied to this control. |
Control |
getNextSiblingControl()
Returns the control that appears after this control within the same parent, or null if no such control exists.
|
Page |
getPage()
Returns the
Page where this control is located. |
Control |
getParentControl()
Returns this control's parent control or null if no such parent exists.
|
Control |
getPreviousSiblingControl()
Returns the control that appears before this control within the same parent, or null if no such control exists.
|
java.lang.String |
getStyle()
Returns the inline CSS style configured for the control.
|
java.lang.String |
getWarningMsgClass()
Returns the list of CSS classes configured for warning messages when the messages are displayed locally to the control.
|
java.lang.String |
getWarningMsgStyle()
Returns the inline CSS style configured for warning messages when the messages are displayed locally to the control.
|
boolean |
hasModifier(java.lang.String modifier)
Returns true if the control has the specified modifier, otherwise returns false.
|
void |
hide()
Hides the control, this is equivalent to setting property
hidden to true . |
boolean |
isContainer()
Returns true if this control is a container control i.e.
|
boolean |
isDisplayOnly()
Returns
true if the control is marked as display only, otherwise returns false . |
boolean |
isDisplayOnlyIncludingParents()
Returns
true if the control or any of its parents is marked as display only, otherwise returns false . |
boolean |
isEventField()
Returns
true if the control is an event field i.e. |
boolean |
isHidden()
Returns
true if the control is marked as hidden, otherwise returns false . |
boolean |
isInheritMsg()
Returns
true if Use parent control setting is checked in the Message Options properties for the control, otherwise returns false . |
boolean |
isLocalMsg()
Returns
true if Local Message is checked in the Message Options properties for the control, otherwise returns false . |
boolean |
isNewLine()
Returns the new line property.
|
boolean |
isShowing()
Returns
true if the control will be included in the web page when it's next displayed to the user, otherwise returns false . |
void |
refresh()
Refreshes this control in the user's browser when the page is next displayed.
|
void |
removeCssClass(java.lang.String cssClass)
Removes one or more CSS classes from the control.
|
void |
requestFocus()
Sets the browser focus to the control.
|
void |
setCssClass(java.lang.String cssClass)
Sets one or more CSS classes to be applied to the control.
|
void |
setDisplayOnly(boolean displayOnly)
Marks the control and all its children as display only (when
displayOnly is true ) or
enterable (when displayOnly is false ). |
void |
setErrorMsgClass(java.lang.String errorMsgClass)
Sets one or more CSS classes to be applied to error messages when the messages are displayed locally to the control.
|
void |
setErrorMsgStyle(java.lang.String errorMsgStyle)
Sets inline CSS style to be applied to error messages when the messages are displayed locally to the control.
|
void |
setHidden(boolean hidden)
Hides or shows the control and all its children.
|
void |
setInfoMsgClass(java.lang.String infoMsgClass)
Sets one or more CSS classes to be applied to info messages when the messages are displayed locally to the control.
|
void |
setInfoMsgStyle(java.lang.String infoMsgStyle)
Sets inline CSS style to be applied to info messages when the messages are displayed locally to the control.
|
void |
setNewLine(boolean newLine)
Sets or unsets the control's new line property.
|
void |
setStyle(java.lang.String style)
Sets inline CSS style to be applied to the control.
|
void |
setWarningMsgClass(java.lang.String warningMsgClass)
Sets one or more CSS classes to be applied to warning messages when the messages are displayed locally to the control.
|
void |
setWarningMsgStyle(java.lang.String warningMsgStyle)
Sets inline CSS style to be applied to warning messages when the messages are displayed locally to the control.
|
void |
show()
Shows the control, this is equivalent to setting property
hidden to false . |
getElementName, getElementType
addErrorMessage, addErrorMessage, addErrorMessage, addErrorMessage, addErrorMessage, addErrorMessageText, addErrorMessageText, addErrorMessageText, addInfoMessage, addInfoMessage, addInfoMessageText, addInfoMessageText, addInfoMessageText, addWarningMessage, addWarningMessage, addWarningMessage, addWarningMessage, addWarningMessage, addWarningMessageText, addWarningMessageText, addWarningMessageText, existErrorMessages, existInfoMessages, existMessages, existWarningMessages
void hide()
hidden
to true
.
Hidden controls are not displayed to the user.
Note that a control is considered to be hidden if the control or any of its parents are marked as hidden.
This action can be reversed using method show()
.void show()
hidden
to false
.
Note that a control is considered to be hidden if the control or any of its parents are marked as hidden.
This action can be reversed using method hide()
.void requestFocus()
Page.clearFocus()
.
Page.clearFocus()
void refresh()
When Ajax is used, the system automatically detects which controls need to be refreshed based on changes to the form's state. This method provides a way of overriding this mechanism to ensure that a control is refreshed when the page is next displayed.
Control getAll()
Repeater Control
or a Table Control
. For example,
controls.BUTTONCONTROL1.all.backgroundColor = "Red";changes the background color of all occurrences of a Button Control, whereas:
controls.BUTTONCONTROL1.backgroundColor = "Red";changes only a single Button Control. Both Repeater Controls and Table Controls are linked to a
Table
and the Button Control
changed will be the one on the current row of the linked table.Control getParentControl()
Control getNextSiblingControl()
Control getPreviousSiblingControl()
Page getPage()
Page
where this control is located.boolean isHidden()
true
if the control is marked as hidden, otherwise returns false
. This method only returns true if
this specific control has been marked as hidden, and does not check if the control is hidden because one of its parents has been
marked as hidden. Use method isShowing()
to check whether the control will be included in the web page displayed to the user.isShowing()
,
setHidden(boolean)
void setHidden(boolean hidden)
boolean isShowing()
true
if the control will be included in the web page when it's next displayed to the user, otherwise returns false
.
This method checks the hidden status of this control and all its parents to determine whether the control is visible. This is in contrast to method
isHidden()
which just checks the status of this control and does not include its parentsisHidden()
boolean isDisplayOnly()
true
if the control is marked as display only, otherwise returns false
. This method only returns true if
this specific control has been marked as display only, and does not check if the control is display only because one of its parents has been
marked as display only. Use method isDisplayOnlyIncludingParents()
to check whether the control will be displayed on the page as display only.setDisplayOnly(boolean)
boolean isDisplayOnlyIncludingParents()
true
if the control or any of its parents is marked as display only, otherwise returns false
.
This method returns true if the control will be displayed as display onlyisDisplayOnly()
,
setDisplayOnly(boolean)
void setDisplayOnly(boolean displayOnly)
displayOnly
is true
) or
enterable (when displayOnly
is false
).
Note that a control is considered to be display only if the control or any of its parents
are marked as display only.
This property can be set on all controls but only has meaning where the control or its child controls allow data to be
entered i.e. the control is a Field Control
or a Table Column Control
.
boolean isEventField()
true
if the control is an event field i.e. it's not visible and represents a place holder for the execution of events.boolean isNewLine()
setNewLine(boolean)
void setNewLine(boolean newLine)
This property only applies when the control is inside a container with Field Grid layout
, and indicates that the control
should be placed on a new line.
This property is only supported for controls that support the new line option i.e. the new line property can be set in the designer.
See Field Grid Layout for more information.
java.lang.String getCssClass()
These classes are configured in the designer using the Advanced Properties button within the control's Styling Assistant.
addCssClass(String)
,
removeCssClass(String)
,
setCssClass(String)
void addCssClass(java.lang.String cssClass)
removeCssClass(String)
void removeCssClass(java.lang.String cssClass)
addCssClass(String)
void setCssClass(java.lang.String cssClass)
These classes are configured in the designer using the Advanced Properties button within the control's Styling Assistant.
addCssClass(String)
,
removeCssClass(String)
java.lang.String getStyle()
This inline style is configured in the designer using the Advanced Properties button within the control's Styling Assistant. Further documentation.
setStyle(String)
void setStyle(java.lang.String style)
This inline style is configured in the designer using the Advanced Properties button within the control's Styling Assistant.
boolean isInheritMsg()
true
if Use parent control setting is checked in the Message Options properties for the control, otherwise returns false
.
boolean isLocalMsg()
true
if Local Message is checked in the Message Options properties for the control, otherwise returns false
.
java.lang.String getInfoMsgClass()
These classes are configured in the designer using the the Advanced Properties button of the Message options styling dialog.
setInfoMsgClass(String)
void setInfoMsgClass(java.lang.String infoMsgClass)
These classes are configured in the designer using the the Advanced Properties button of the Message options styling dialog.
java.lang.String getInfoMsgStyle()
This style is configured in the designer using the the Advanced Properties button of the Message options styling dialog.
setInfoMsgStyle(String)
void setInfoMsgStyle(java.lang.String infoMsgStyle)
This style is configured in the designer using the the Advanced Properties button of the Message options styling dialog.
java.lang.String getWarningMsgClass()
These classes are configured in the designer using the the Advanced Properties button of the Message options styling dialog.
setWarningMsgClass(String)
void setWarningMsgClass(java.lang.String warningMsgClass)
These classes are configured in the designer using the the Advanced Properties button of the Message options styling dialog.
java.lang.String getWarningMsgStyle()
This style is configured in the designer using the the Advanced Properties button of the Message options styling dialog.
setWarningMsgStyle(String)
void setWarningMsgStyle(java.lang.String warningMsgStyle)
This style is configured in the designer using the the Advanced Properties button of the Message options styling dialog.
java.lang.String getErrorMsgClass()
These classes are configured in the designer using the the Advanced Properties button of the Message options styling dialog.
setErrorMsgClass(String)
void setErrorMsgClass(java.lang.String errorMsgClass)
These classes are configured in the designer using the the Advanced Properties button of the Message options styling dialog.
java.lang.String getErrorMsgStyle()
This style is configured in the designer using the the Advanced Properties button of the Message options styling dialog.
setErrorMsgStyle(String)
void setErrorMsgStyle(java.lang.String errorMsgStyle)
This style is configured in the designer using the the Advanced Properties button of the Message options styling dialog.
LayoutCell getLayoutCell()
LayoutCell
object which can be used to override properties of the parent control's layout as applied to this control.
Returns null
if no layout is configured on the parent control.
The specific object returned will be an extension of LayoutCell
that corresponds to the parent control's layout
e.g. HorizontalBoxLayoutCell
for Horizontal Box layout etc.
boolean hasModifier(java.lang.String modifier)
modifier
- name of the modifierPage.getControlsByModifier(String)
boolean isContainer()