Package overit.geocall.basic.ui.control
Class InputOption
java.lang.Object
overit.geocall.platform.ui.UINode
overit.geocall.ui.Component
overit.geocall.ui.Control
overit.geocall.basic.ui.control.InputOption
- All Implemented Interfaces:
Serializable,overit.geocall.marks.MethodExposer,overit.geocall.marks.NameExposer,Badgeable,Identified,Tool,overit.geocall.ux.configurability.UIConfigurable,overit.geocall.ux.edm.ModelConfigurable
This class implements a control that must be used within others and allows to indicate an option item.
The components that can contain options are:
It is possible to evaluate the InputOption directly through the value attribute, or using the StaticView attribute; in this case, many options will appear as many as the values loaded in the
InputRadio, InputLookup, OutputLookup,
ColumnLookup2. It is possible to evaluate the InputOption directly through the value attribute, or using the StaticView attribute; in this case, many options will appear as many as the values loaded in the
StaticView- See Also:
- GCApi:
- component
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassObject that represents the option that match with the searched value; it is composed by a label, a title and a boolean that defines if the value is visible or not (it is not active).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 String[]protected Stringprotected DBViewprotected Stringprotected ForeignField[]protected ForeignFieldprotected intprotected MapFormatprotected intprotected intprotected intprotected ForeignFieldprotected Stringprotected StaticViewprotected TextFormatprotected MapFormatprotected Stringprotected intprotected intprotected DBViewprotected 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 TypeMethodDescriptionstatic ArrayListReturns theArrayListthat contains the value and some informations about the option.Returns theDBViewassociated to the optionprotected InputOption.MatchingOptiongetDBVMatchingOption(Object search) org.apache.ecs.ElementAbstract method that must be extended and returns the html code of the ComponentgetMatchingOption(Object value) Retrieves theInputOption.MatchingOptionthat matches with the value passed as parameterprotected InputOption.MatchingOptiongetStaticMatchingOption(Object search) getVALUE()Returns the value associated to the optionprotected InputOption.MatchingOptionmatchingOption(List list) voidSets the name of the column used as foreign key field (used in theInputLookupobject only with the multi lookup mechanism)voidSets the name of the field of theDBViewfrom which the option values will be extractedvoidSets the string containing the name of the field from which the label will be taken.voidSets the string containing the name of the field whose value will be displayed as a tooltip when the user stands over the option for a whilevoidSets theDBViewused to populate the optionsvoidSets theTextFormatwith which the option will be createdvoidSets theMapFormatwith which the label will be createdvoidSets the maximum displayed length of the label that describes the option.voidSets the minimum length of the label.voidSet the name of the field of theDBViewfrom which the option's readonly state will be extractedvoidDefines whether the current option should be selected or not.voidSets the name of a global sessionDBViewthat will be used to populate the optionsvoidsetSTATICVIEW(String path) Sets the reference to theStaticViewthat will be used to extract the records from the data layer and populate the options.voidSets theMapFormatwith which the title will be createdvoidCalled to init all the fieldvoidSets forcibly a value for the optionvoidsetVISIBLE(String s) Sets the visibility of the option.
This option works only with options whichDBViewis not set, loaded from aStaticViewor manually.booleanChecks if there is a specific option in the InputOptionstatic booleanvalidOptions(Component c, Object o) Checks if there is a specific option in the InputOption fatherMethods 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, 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
-
_value
-
_columntitle
-
_titleFormat
-
_labelFormat
-
_columnLabel
-
_columnkey
-
_columnfk
-
_nLabel
protected int _nLabel -
_tf
-
_svw
-
_dbviewName
-
_workingDbv
-
_dbv
-
_selected
-
_maxlength
protected int _maxlength -
_minlength
protected int _minlength -
_visiblePos
protected int _visiblePos -
_valuePos
protected int _valuePos -
_ffTitle
-
_ffLabels
-
_fkPos
protected int _fkPos -
_roName
-
visible
protected boolean visible
-
-
Constructor Details
-
InputOption
public InputOption()
-
-
Method Details
-
setVALUE
Sets forcibly a value for the option- Parameters:
s- The value of the option
-
setMAXLENGTH
Sets the maximum displayed length of the label that describes the option. If the label is longer, it is truncated to the maximum length; the entire value will be displayed as a tooltip when the user stands over the option for a while.- Parameters:
s- The maximum displayed length for the option, expressed in number of characters
-
setMINLENGTH
Sets the minimum length of the label. If the label is shorter, it will be filled with spaces, up to the minimum length- Parameters:
s- The minimum length for the option
-
setSELECTED
Defines whether the current option should be selected or not. In case there are more options selected, the last one in order of definition prevails and will be the one selected.- Parameters:
s- A string that represents a boolean value if the option is a child of anInputRadio), or the value of the key field if the option is a child ofInputLookup
-
setLABELFORMAT
Sets theMapFormatwith which the label will be created- Parameters:
s- The format for the label
-
setTITLEFORMAT
Sets theMapFormatwith which the title will be created- Parameters:
s- The format for the title
-
setFORMAT
Sets theTextFormatwith which the option will be created- Parameters:
s- The format for the option
-
setSTATICVIEW
Sets the reference to theStaticViewthat will be used to extract the records from the data layer and populate the options. This attribute must be prefixed by the underscore (like:_staticView) character to allows theUIFactorymechanism to resolve the correct path of the xml file.- Parameters:
path- The path of the StaticView
-
setSESSIONDBVIEW
Sets the name of a global sessionDBViewthat will be used to populate the options- Parameters:
s- The name of a global session DBView
-
setCOLUMNKEY
Sets the name of the field of theDBViewfrom which the option values will be extracted- Parameters:
s- The name of a field of the DBView
-
setCOLUMNFK
Sets the name of the column used as foreign key field (used in theInputLookupobject only with the multi lookup mechanism)- Parameters:
s- The name of the column used as foreign key field
-
setCOLUMNTITLE
Sets the string containing the name of the field whose value will be displayed as a tooltip when the user stands over the option for a while- Parameters:
s- The name of a field
-
setCOLUMNLABEL
Sets the string containing the name of the field from which the label will be taken.- Parameters:
s- The name of a field. In the case of composed labels, it is possible to indicate the name of several fields separating them with a comma
-
setDBView
Sets theDBViewused to populate the options- Parameters:
dbv- The DBView associated to the options
-
getDBView
Returns theDBViewassociated to the option- Returns:
- The DBView
-
getVALUE
Returns the value associated to the option- Returns:
- The value of the option
-
setRONAME
Set the name of the field of theDBViewfrom which the option's readonly state will be extracted- Parameters:
s- The name of a field of the DBView
-
setVISIBLE
Sets the visibility of the option.
This option works only with options whichDBViewis not set, loaded from aStaticViewor manually.- Parameters:
s-trueif the option will be visible,falseotherwise
-
setupMetadata
public void setupMetadata()Called to init all the field -
getMatchingOption
Retrieves theInputOption.MatchingOptionthat matches with the value passed as parameter- Parameters:
value- The object that represents the value used for searching a matching option- Returns:
- The
InputOption.MatchingOptionthat matches with the value ornullif there isn't one
-
getDBVMatchingOption
-
getStaticMatchingOption
-
matchingOption
-
getArrayOption
Returns theArrayListthat contains the value and some informations about the option.
The arrays is composed by these elements:
Position 0: value; 1: "true" or "false", defines if the value is selected or not (statically); 2: the padded label; 3: TRUE if visible, FALSE otherwise 4: title 5: foreignkey 6: label used for the title is longer than maxlength 7-*: the fields for the label- Returns:
- The arraylist that contains the value and some informations about the option
-
validOption
Checks if there is a specific option in the InputOption- Parameters:
o- The value of the option to search- Returns:
trueif there is the value in the InputOption (or is read only),falseotherwise
-
getHtml
Description copied from class:ComponentAbstract method that must be extended and returns the html code of the Component -
collectChildOptions
- Parameters:
c- The component- Returns:
- The list of the chils of the component
-
validOptions
Checks if there is a specific option in the InputOption father- Parameters:
c-Componentwith all the InputOptiono- The value of the option to search- Returns:
trueif there is the value in the Component,falseotherwise
-