Package overit.geocall.basic.ui.control
Class PlainButton
java.lang.Object
overit.geocall.platform.ui.UINode
overit.geocall.ui.Component
overit.geocall.ui.Control
overit.geocall.basic.ui.control.PlainButton
- 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
The class extends
This kind of button differs from the
Usually PlainButtons are used to be used as handlers that allows to open the
Control and implements a button, the user interface element that allows to throw events. This kind of button differs from the
Button for the graphic rendering, which can be customized through
the application of different styles and CSS classes. Even plainbuttons can validate form data. Usually PlainButtons are used to be used as handlers that allows to open the
Panel that appears from the edges of the screen- 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 Stringprotected Stringprotected Stringprotected booleanprotected Stringprotected Stringprotected Stringprotected Stringprotected intprotected intprotected intprotected Stringprotected Stringprotected booleanprotected SetPredicateprotected Stringprotected Stringprotected 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 TypeMethodDescriptionorg.apache.ecs.ElementAbstract method that must be extended and returns the html code of the ComponentbooleanChecks if the PlainButton will be visible when theWindowthat cotains it is the last one of the stackintReturns the refresh numberintReturns the refresh timebooleanChecks the visibility of the PlainButton.protected 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 autocomplete attribute on the button.voidSets the reference to theContainerthat will manage the event associated to the TaskMessagevoidSets the reference to a specificFormelement.voidSets theIconHDassociated to the PlainButtonvoidsetICONCSS(String s) Sets the CSS class of theIconHDof the PlainButtonvoidSets the visibility of the PlainButton 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 PlainButton.voidSets the string that appears as a message for the event associated to the PlainButton.voidSets a parameter that will be passed to the event associated to the PlainButton.voidDefines the position of the PlainButton.voidSets programmatically the string that appears as a prompt message for the event associated to the PlainButton.voidSets the string that appears as a prompt message for the event associated to the PlainButton.voidSets if the value returned by the prompt can be an empty string ""voidSets a refresh number.voidSets a refresh time.voidDefines the state of the PlainButton.voidSets the CSS style of the PlainButtonvoidDefines if the PlainButton is a SUBMIT one, ie it performs the data validation before the submitvoidsetup()Setup the ComponentvoidsetVISIBLE(String s) Sets the visibility of the PlainButtonMethods 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, isImportant, 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, setIdentity, setIMPORTANT, setLabel, setLABEL, setLABELINLINE, setLAYOUTLABEL, setLAYOUTNAME, setNAME, setREGISTRYNAME, setTooltip, 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, makeBadgedIconMethods inherited from interface overit.geocall.ui.Hideable
getVISIBLE
-
Field Details
-
_icon
-
_iconCss
-
_param
-
_msg
-
_prompt
-
promptEmpty
protected boolean promptEmpty -
_anchor
-
_visible
-
_lastshow
protected boolean _lastshow -
_submit
protected boolean _submit -
_style
-
_state
-
_position
-
_form
-
destination
-
_refreshTime
protected int _refreshTime -
_refreshNumber
protected int _refreshNumber -
_refreshed
protected int _refreshed -
autocomplete
-
-
Constructor Details
-
PlainButton
public PlainButton()
-
-
Method Details
-
setDESTINATION
Sets the reference to theContainerthat will manage the event associated to the TaskMessage- Parameters:
s- The registryname of the container that will manage the event
-
setLASTSHOW
Sets the visibility of the PlainButton when theWindowthat contains it is the last one of the stack- Parameters:
s-trueif the PlainButton will be visible when the window that contains it is the last one of the stack,falseotherwise
-
getLASTSHOW
public boolean getLASTSHOW()Checks if the PlainButton will be visible when theWindowthat cotains it is the last one of the stack- Returns:
trueif the PlainButton is visible when the window that contains it is the last one of the stack,falseotherwise
-
setSTYLE
Sets the CSS style of the PlainButton- Parameters:
s- The string that contains the css attributes and values for the button's style
-
setSTATE
Defines the state of the PlainButton. The button will take a different style, based on the state, that is dependend on the theme currently used- Parameters:
s- Possible values are:
"on", usually used to indicate that the button, used as handler, is currently switched on
"off", usually used to indicate that the button, used as handler, is currently switched off
"active", usually used to indicate that the button can make a submit
-
setPOSITION
Defines the position of the PlainButton. The button will take a different rounding border style, based on the position.- Parameters:
s- Possible values are:
"c", the button will have all the borders rounded
"t", the button will have the bottom borders rounded
"b", the button will have the top borders rounded
"l", the button will have the right borders rounded
"r", the button will have the left borders rounded
-
setICONCSS
Sets the CSS class of theIconHDof the PlainButton- Parameters:
s- A string that defines a CSS class
-
setPARAM
Sets a parameter that will be passed to the event associated to the PlainButton.
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 PlainButton
-
setMSG
Sets the string that appears as a message for the event associated to the PlainButton.
If there is a message, when the user clicks the PlainButton 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 PlainButton
-
setPROMPT
Sets the string that appears as a prompt message for the event associated to the PlainButton.
If there is a prompt, when the user clicks the PlainButton 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 PlainButton
-
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.
-
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
-
setFORM
Sets the reference to a specificFormelement.
It is possible to position the PlainButton outside of a form, but still allow the submission of the values of a referenced form by setting it, using this method. If the PlainButton 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
-
setICON
Sets theIconHDassociated to the PlainButton -
setVISIBLE
Sets the visibility of the PlainButton- Specified by:
setVISIBLEin interfaceHideable- Parameters:
s-trueif the button will be visible,falseotherwise, or a name of a function used to determine visibility (seeisVisible())
-
isVisible
public boolean isVisible()Checks the visibility of the PlainButton. SeegetBoolean(visible,id,true)) -
setSUBMIT
Defines if the PlainButton is a SUBMIT one, ie it performs the data validation before the submit- Parameters:
s- A string that represents a boolean value ("true" or "1", "false" or "0").
If the string is not recognized as a boolean value, it will be used the default value, that isfalse
-
setREFRESHTIME
Sets a refresh time. By setting this attribute it will appear a little progress bar under the label of the PlainButton, that graphically highlights the passage of time. Once the time has elapsed, the event associated to the PlainButton will be triggered- Parameters:
s- The refresh time, expressed in seconds. The default value is 0 (that means no refresh)
-
setREFRESHNUMBER
Sets a refresh number. Defines the number of automatic executions of the event associated to the PlainButton.- Parameters:
s- The refresh number, the default value is 10
-
setAUTOCOMPLETE
Sets the autocomplete attribute on the button.- Parameters:
s- A string that represents the autocomplete attribute for the button. Some examples are : off,nameemail,tel,sex ecc.
The complete list of autocomplete's value can be found on this link: https://www.w3.org/Translations/WCAG21-it/#input-purposes
-
getRefreshTime
public int getRefreshTime()Returns the refresh time- Returns:
- The integer that represents the refresh time, expressed in seconds. The default value is 0, that means no refresh.
-
getRefreshNumber
public int getRefreshNumber()Returns the refresh number- Returns:
- The integer that represents the refresh number. The default value is 10
-
setup
public void setup()Description copied from class:ComponentSetup the Component -
getHtml
Description copied from class:ComponentAbstract method that must be extended and returns the html code of the Component -
setMsg
Sets programmatically the string that appears as a message for the event associated to the PlainButton.
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 PlainButton.
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
-
nn
-