Package overit.geocall.basic.ui.control
Class Button
java.lang.Object
overit.geocall.platform.ui.UINode
overit.geocall.ui.Component
overit.geocall.ui.Control
overit.geocall.basic.ui.control.Button
- All Implemented Interfaces:
Serializable,overit.geocall.marks.MethodExposer,overit.geocall.marks.NameExposer,Badgeable,Hideable,Identified,Tool,overit.geocall.ux.configurability.UIConfigurable,overit.geocall.ux.edm.ModelConfigurable
- Direct Known Subclasses:
ExitButton,ResetButton,SubmitButton
The class extends
Control and implements the button, the user interface element that allows to throw events.- See Also:
- GCApi:
- component
-
Nested Class Summary
Nested classes/interfaces inherited from class overit.geocall.ui.Component
Component.Configurable, Component.ConfigurableAttribute, Component.ConfigurableAttributes, Component.FilterCriteria, Component.Registry -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected SetPredicateprotected Stringprotected Stringprotected Stringprotected booleanprotected Stringprotected Stringprotected Stringprotected SetPredicateprotected Stringprotected SetPredicateprotected booleanFields inherited from class overit.geocall.ui.Control
_blank, _cleaner, _dblink, _enabled, _ro, _title, altEventIconsList, altIcon, ariaDescription, ariaLabel, badge, badgeformat, FILTER_PREFIXES, LABEL_ATTRIBUTE, LABEL_IN_LINE_ATTRIBUTE, STATE_BLANK, STATE_NORMAL, STATE_RO, STATE_ROBLANKFields inherited from class overit.geocall.ui.Component
_basic, _childrenContainers, _currentId, _gridalign, _gridcols, _gridrows, _gridvalign, _iconElement, _id, _keylabel, _label, _layoutName, _name, _parentContainer, _registryName, _shortcut, _tabindex, _transformations, _valuesContainer, aliasField, BR, configHidden, configuredLabel, configuredLabelInLine, defaultHidden, ELEMENT_BR, ELEMENT_NULL, entityContainer, entityName, extendedField, fullHeight, important, labelInLine, layoutLabel, PIXEL_IMG, safeInlineService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets if the visible attribute is based on a function instead of a boolean value.org.apache.ecs.ElementReturns the html code of the ButtonbooleanDeprecated.booleanGets if this Button is important or not.booleanChecks the visibility of the Button, based on the set parameters (setVISIBLE(java.lang.String),setROVISIBLE(java.lang.String),setBLANKVISIBLE(java.lang.String)) and the status.protected Stringprotected StringvoidDefines the name of the anchor that is used to reposition the scrolling of the page following the execution of the event associated with the button.voidSets the visibility of the Button when it blank state istruevoidsetDEFAULT(String s) Defines if the Button is the default one, ie is of typeSUBMITand is the one activated when the user press the Enter key of the keyboard.voidSets the reference to a specificFormelement.voidSets forcibly the id that will be associated to the button, instead of the one generated by theComponent.generateId()voidSets the name of the field used to retrieves the label that will appear in the Button;voidSets the visibility of the Button when theWindowthat contains it is the last one of the stackvoidSets programmatically the string that appears as a message for the event associated to the Button.voidSets the string that appears as a message for the event associated to the Button.voidSets a parameter that will be passed to the event associated to the Button.voidSets programmatically the string that appears as a prompt message for the event associated to the Button.voidSets the string that appears as a prompt message for the event associated to the Button.voidSets if the value returned by the prompt can be an empty string ""voidSets the visibility of the Button when it readonly state istruevoidsetVISIBLE(String s) Sets the visibility of the Buttonprotected voidMethods inherited from class overit.geocall.ui.Control
avoidNull, clean, getBadgeFormat, getBadgeValue, getBLANK, getCleaner, getConfigurableProperties, getDAValues, getDBLINK, getKEYLABEL, getLABEL, getRO, getState, getTITLE, getValues, getWM, isEnabled, isEnabledBasedOnFunction, isFunctionEnabled, isRoBasedOnFunction, nameWithNoFilterPrefix, setALTEVENTICON, setALTICON, setARIADESCRIPTION, setARIALABEL, setBADGEFORMAT, setBADGEVALUE, setBLANK, setCLEANER, setConfiguredProperty, setDBLINK, setENABLED, setFUNCTION, setModelProperties, setRO, setTitle, setTITLEMethods inherited from class overit.geocall.ui.Component
adapt, ajaxQuery, appendAttribute, buildDisplayScript, buildSetupScript, calcKeyLabel, calcLabel, calcShortcut, canBeConfigured, changed, clearConfiguredProperties, componentIterator, componentSize, connect, containerIterator, createAjaxFrame, deprecate, fillSetupScript, generateFlexableFullHeightContainer, generateId, getBASIC, getBoolean, getBoolean, getChildrenComponents, getChildrenContainers, getDefaultLabel, getDefaultLayoutLabel, getEntityContainer, getEntityName, getFullHeight, getGridAlign, getGridCols, getGridRows, getGridVAlign, getHtmlLabel, getHtmlLabel, getIcon, getId, getIdentity, getint, getLayoutLabel, getLayoutName, getNAME, getParentComponent, getParentContainer, getPublishedChildrenList, getRegistryName, getSHORTCUT, getTabIndex, getTeacher, getValuesContainer, getWindow, initChilds, isActivable, isActive, isAliasField, isConfigHidden, isDefaultHidden, isExtendedField, isLabelInLine, onInit, setActivable, setActive, setAliasField, setBASIC, setConfigHidden, setDEFAULTHIDDEN, setEntityName, setExtendedField, setFULLHEIGHT, setGRIDALIGN, setGRIDCOLS, setGRIDROWS, setGRIDVALIGN, setICON, setIdentity, setIMPORTANT, setLabel, setLABEL, setLABELINLINE, setLAYOUTLABEL, setLAYOUTNAME, setNAME, setREGISTRYNAME, setTooltip, setup, setValuesContainer, stringForJs, tabIndexerMethods inherited from class overit.geocall.platform.ui.UINode
addChild, addChildText, getChildren, getNodeId, getParent, getRoot, getSchema, setNodeId, setParent, setSchemaMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface overit.geocall.ui.Badgeable
badgeFormat, makeBadgedIcon
-
Field Details
-
_type
-
_visible
-
_rovisible
-
_blankvisible
-
_lastshow
protected boolean _lastshow -
_labelName
-
_msg
-
_prompt
-
promptEmpty
protected boolean promptEmpty -
_param
-
_anchor
-
_htmlid
-
_form
-
-
Constructor Details
-
Button
public Button()
-
-
Method Details
-
setMSG
Sets the string that appears as a message for the event associated to the Button.
If there is a message, when the user clicks the Button a javascript alert will appear, containing the message and two buttons; by pressing one of the two the event will be triggered, while pressing the other will not. Therefore usually this alert is used to request confirmation of proceeding to the user.
Using this method the message will be translated by theTeacher.- Parameters:
s- A string that represents the message contained in the alert that will appears when the user clicks the Button
-
setPROMPT
Sets the string that appears as a prompt message for the event associated to the Button.
If there is a prompt, when the user clicks the Button a javascript alert will appear, containing a message (that is the prompt string set with this method), an input field that the user can edit, and two buttons; by pressing one of the two, the event will be triggered, while pressing the other will not. If the event is triggered, it will receives in theHashGetteran entry with key: "prompt", and value: the string that the user has inserted into the input field of the alert. Therefore usually this alert is used to request confirmation of proceeding to the user, that can also insert a parameter, that will be managed by the event.
Using this method the prompt message will be translated by theTeacher.- Parameters:
s- A string that represents the message contained in the alert that will appears when the user clicks the Button
-
setPROMPTEMPTY
Sets if the value returned by the prompt can be an empty string ""- Parameters:
s-trueif you want to allow to return an empty value by the prompt,falseotherwise.
-
setPARAM
Sets a parameter that will be passed to the event associated to the Button.
If there is a param, when the event is triggered it will receives in theHashGetteran entry with key: "param", and value: the string set with this method. The parameter can therefore be managed by the event.- Parameters:
s- A string that represents the parameter passed to the event triggered by the Button
-
setANCHOR
Defines the name of the anchor that is used to reposition the scrolling of the page following the execution of the event associated with the button. The name must correspond to the value of a reference attribute of aGridor aSection, set using the appropriate set methods (Grid.setREF(java.lang.String),Section.setREF(java.lang.String)).
The relocation mechanism works only with non-Ajax events, the ones that reload the page.- Parameters:
s- The name of the anchor
-
setHTMLID
Sets forcibly the id that will be associated to the button, instead of the one generated by theComponent.generateId()- Parameters:
s- The string that represents the id
-
setFORM
Sets the reference to a specificFormelement.
It is possible to position the Button outside of a form, but still allow the submission of the values of a referenced form by setting it, using this method. If the Button is in a form, then also setting this attribute, the submitted values will be those of the form to which the Button belongs.- Parameters:
s- The registryname (Component.setREGISTRYNAME(java.lang.String)) of the Form
-
setDEFAULT
Defines if the Button is the default one, ie is of typeSUBMITand is the one activated when the user press the Enter key of the keyboard. If there is more than oneSUBMITbuttons, then when the user press the Enter key, it will be activated the first that appears in the DOM.- Parameters:
s-trueif the Button must be the default one,falseotherwise
-
setVISIBLE
Sets the visibility of the Button- Specified by:
setVISIBLEin interfaceHideable- Parameters:
s-trueif the Button will be visible,falseotherwise, or a name of a function used to determine visibility (seeisVisible())
-
getVISIBLE
public boolean getVISIBLE()Deprecated.UseisVisible()- Specified by:
getVISIBLEin interfaceHideable- Returns:
- Use
Hideable.isVisible()
-
setROVISIBLE
Sets the visibility of the Button when it readonly state istrue- Parameters:
s-trueif the Button will be visible when read only,falseotherwise, or a name of a function used to determine visibility (seeisVisible())
-
setBLANKVISIBLE
Sets the visibility of the Button when it blank state istrue- Parameters:
s-trueif the Button will be visible when in blank state,falseotherwise, or a name of a function used to determine visibility (seeisVisible())
-
setLASTSHOW
Sets the visibility of the Button when theWindowthat contains it is the last one of the stack- Parameters:
s-trueif the Button will be visible when the window that contains it is the last one of the stack,falseotherwise
-
isVisible
public boolean isVisible()Checks the visibility of the Button, based on the set parameters (setVISIBLE(java.lang.String),setROVISIBLE(java.lang.String),setBLANKVISIBLE(java.lang.String)) and the status. SeegetBoolean(visible,id,true)) -
setLABELNAME
Sets the name of the field used to retrieves the label that will appear in the Button;- Parameters:
s- The string that defines the label for the Button
-
validate
-
prepareLabel
-
prepareName
-
getHtml
Returns the html code of the Button -
setMsg
Sets programmatically the string that appears as a message for the event associated to the Button.
Using this method the message will not be translated by theTeacher.
SeesetMSG(java.lang.String)for the meaning of the attribute.- Parameters:
s- A string that represents the message contained in the alert that will appears when the user clicks the Button
-
setPrompt
Sets programmatically the string that appears as a prompt message for the event associated to the Button.
Using this method the message will not be translated by theTeacher.
See(java.lang.String)for the meaning of the attribute.- Parameters:
s- A string that represents the prompt message contained in the alert that will appears when the user clicks the Button
-
isImportant
public boolean isImportant()Gets if this Button is important or not. A Button object is considered important if it is not visible.- Overrides:
isImportantin classControl- Returns:
trueif this Inout is important,falseotherwise.
-
areVisibleAttrsBasedOnFunction
public boolean areVisibleAttrsBasedOnFunction()Gets if the visible attribute is based on a function instead of a boolean value.- Returns:
trueif the read only attribute is based on a function instead of a boolean value,falseotherwise.
-
isVisible()