Package overit.geocall.basic.ui.control
Class InputCheckBox
java.lang.Object
overit.geocall.platform.ui.UINode
overit.geocall.ui.Component
overit.geocall.ui.Control
overit.geocall.basic.ui.control.Input
overit.geocall.basic.ui.control.InputCheckBox
- All Implemented Interfaces:
Serializable,overit.geocall.marks.MethodExposer,overit.geocall.marks.NameExposer,Arrangeable,Badgeable,ValueValidator,Identified,Tool,overit.geocall.ux.configurability.UIConfigurable,overit.geocall.ux.edm.ModelConfigurable
@Component
@Configurable
@ConfigurableAttribute(name="STATES",label="States",type="LONG",onlyExtended=true,values={@Value(value="",label="Default"),@Value(value="2",label="2"),@Value(value="3",label="3")},properties={@Property(key="type",value="long"),@Property(key="fullsize",value="true")})
@FilterCriteria({IS_EQUAL_TO,IS_NOT_EQUAL_TO,IS_NULL,IS_NOT_NULL})
public class InputCheckBox
extends Input
implements Arrangeable
This components implements an input checkbox, a field that the user can mark as checked (
The aspect of the input, i.e. the icon that is used, depends on the theme currently in use in the application.
true value),
unchecked (false value) or neither (null value). It is possible to state that the input
must have only two states (true / false). The aspect of the input, i.e. the icon that is used, depends on the theme currently in use in the application.
- 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 booleanprotected intprotected Booleanprotected Integerstatic final StringFields inherited from class overit.geocall.basic.ui.control.Input
_autofocus, _da, _dao, _dao0, _defaultFocus, _event, _eventicon, _eventmsg, _eventparam, _eventprompt, _eventsnumber, _eventtitle, _ff, _fullSize, _hidden, _hinter, _hints, _hintsCache, _key, _label2, _letterCase, _maxlength, _msg, _msgCampoObbligatorio, _msgErroreCampo, _notnull, _numeric, _placeholder, _query, _roevent, _size, _value, autocomplete, configuredFullSize, configuredNotNull, configuredSize, FILTER_CRITERION_ATTRIBUTE, filterCriteria, FULL_SIZE_ATTRIBUTE, NOT_NULL_ATTRIBUTE, promptEmpty, SIZE_ATTRIBUTEFields 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 TypeMethodDescriptionvoidEvery component can add a script to the StringBuilder, script executed when the component is created.org.apache.ecs.ElementgetContentHtml(Object generationhandle, EntitySet es) It returns the html code that represents the active part of the input checkbox field.Gets the default value set for this component.org.apache.ecs.ElementgetHiddenHtml(Object generationhandle, EntitySet es) It returns the hidden but active html part of an hidden input field.org.apache.ecs.ElementCreates the InputCheckBox elementintGets the real states value to apply.voidSets the event associated to the field, triggered when the user clicks on the input and change its valuevoidSets the parameter for the event associated to the field (seesetAUTOEVENT(String))voidsetConfiguredProperty(Map<String, Serializable> properties) Apply the user's properties customization into the component.voidsetINVERSE(String s) Defines the position of the label.voidSets the number of possible values for the InputCheckBoxvoidSets the value of the InputCheckBoxMethods inherited from class overit.geocall.basic.ui.control.Input
addEventButtons, addHint, addHint, addHintsButton, ajaxQuery, buildDisplayScript, connect, control, getClassStyle, getConfigurableProperties, getDescriptionHtml, getFilterCriteriaToRemove, getFullSize, getGenerationHandle, getHIDDEN, getHintsEventButton, getHintsFieldName, getInsideEventButton, getInsideEventButton, getLetterCase, getNOTNULL, getSize, getVisibleDescriptionHtml, isImportant, isNotNull, isValueIgnoredByCriterion, prepareName, queryHints, registerValidators, setAUTOCOMPLETE, setAUTOFOCUS, setDA, setDAO, setDAO0, setDEFAULTFOCUS, setEVENT, setEVENTMSG, setEVENTPARAM, setEVENTPROMPT, setEVENTTITLE, setFILTERCRITERIA, setFULLSIZE, setHIDDEN, setHints, setHINTS, setHINTSCACHE, setICON, setIMPORTANT, setKEY, setLABEL2, setLETTERCASE, setMAXLENGTH, setModelProperties, setMSG, setNAME, setNOTNULL, setNUMERIC, setPARAM, setPLACEHOLDER, setPROMPT, setPROMPTEMPTY, setQUERY, setROEVENT, setSIZE, setup, setupAutocomplete, validate, validateChangingValue, validateConcreteValue, validateNotNull, validateUnchangingValue, validateValueMethods inherited from class overit.geocall.ui.Control
avoidNull, clean, getBadgeFormat, getBadgeValue, getBLANK, getCleaner, getDAValues, getDBLINK, getKEYLABEL, getLABEL, getRO, getState, getTITLE, getValues, getWM, isEnabled, isEnabledBasedOnFunction, isFunctionEnabled, isRoBasedOnFunction, nameWithNoFilterPrefix, setALTEVENTICON, setALTICON, setARIADESCRIPTION, setARIALABEL, setBADGEFORMAT, setBADGEVALUE, setBLANK, setCLEANER, setDBLINK, setENABLED, setFUNCTION, setRO, setTitle, setTITLEMethods inherited from class overit.geocall.ui.Component
adapt, appendAttribute, calcKeyLabel, calcLabel, calcShortcut, canBeConfigured, changed, clearConfiguredProperties, componentIterator, componentSize, 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, setLabel, setLABEL, setLABELINLINE, setLAYOUTLABEL, setLAYOUTNAME, 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.Arrangeable
getDescriptionHtml, getGenerationHandleMethods inherited from interface overit.geocall.ui.Badgeable
badgeFormat, makeBadgedIcon
-
Field Details
-
STATES_ATTRIBUTE
- See Also:
-
checked
-
_inverse
protected boolean _inverse -
_autoevent
-
_autoeventparam
-
_states
protected int _states -
configuredStates
-
-
Constructor Details
-
InputCheckBox
public InputCheckBox()Creates an InputCheckBox
-
-
Method Details
-
setVALUE
Sets the value of the InputCheckBox- Overrides:
setVALUEin classInput- Parameters:
s- A string that represents a boolean value ("true" or "1", "false" or "0").
If the parameter is null, or an empty string, the value of the input is set tonull.
It the string is not recognized as a boolean value, it will be used the default value, that isfalse
-
getDefaultValue
Description copied from class:InputGets the default value set for this component.
The default value of the component is the value set for the attribute value into the xml. SeeInput.setVALUE(String)- Overrides:
getDefaultValuein classInput- Returns:
- The default value set for this component
-
setINVERSE
Defines the position of the label. Iffalsethe label is positioned to the right of the field, otherwise the order is inverted (and the label will appear at the left of the field).
If the field is inserted into anArrangingGridthis attribute has no effect.- Parameters:
s- A string that represents a boolean value ("true" or "1", "false" or "0").
It the string is not recognized as a boolean value, it will be used the default value, that isfalse
-
setSTATES
Sets the number of possible values for the InputCheckBox- Parameters:
s- The number that indicates the possible values that the field can take.
Possible values are:
3 (default): the field's value can betrue,falseornull
2: the field's value can betrueorfalse
-
getStates
public int getStates()Gets the real states value to apply.
This method returns the value of the attribute based on if there is a user customization on the states attribute. If there is no customization returns the default value.- Returns:
- The number that indicates the possible values that the field can take.
Possible values are:
3 (default): the field's value can betrue,falseornull
2: the field's value can betrueorfalse
-
setAUTOEVENT
Sets the event associated to the field, triggered when the user clicks on the input and change its value- Parameters:
s- A string that represents the name of the event associated to the field
-
setAUTOEVENTPARAM
Sets the parameter for the event associated to the field (seesetAUTOEVENT(String))- Parameters:
s- The string that represents the param attribute of the event associated to the field
-
prepareValue
- Overrides:
prepareValuein classInput
-
getContentHtml
It returns the html code that represents the active part of the input checkbox field. Implements the interfaceArrangeable.- Specified by:
getContentHtmlin interfaceArrangeable- Overrides:
getContentHtmlin classInput- Parameters:
generationhandle- the unique generating handlees- TheEntitySetto which the element belongs- Returns:
- The html code of the input field or null if the field is hidden
-
getHtml
Creates the InputCheckBox element -
getHiddenHtml
It returns the hidden but active html part of an hidden input field. Implements the interfaceArrangeable.- Specified by:
getHiddenHtmlin interfaceArrangeable- Overrides:
getHiddenHtmlin classInput- Parameters:
generationhandle- the unique generating handlees- TheEntitySetto which the element belongs- Returns:
- The html code of the hidden part of the field or null if the field is visible.
-
buildSetupScript
Every component can add a script to the StringBuilder, script executed when the component is created. The method add the script that setups the field- Overrides:
buildSetupScriptin classComponent- Parameters:
sb- The StringBuilder on which we want to add the script
-
setConfiguredProperty
Description copied from interface:overit.geocall.ux.configurability.UIConfigurableApply the user's properties customization into the component.- Specified by:
setConfiguredPropertyin interfaceoverit.geocall.ux.configurability.UIConfigurable- Overrides:
setConfiguredPropertyin classInput- Parameters:
properties- The map containing the configured properties to set
-