Package overit.geocall.basic.ui.control
Class InputLookup
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.InputLookup
- 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
- Direct Known Subclasses:
InputMultiSelectLookup
@Component
@Configurable
@ConfigurableAttribute(name="ORDER",label="Order",type="STRING",values={@Value(value="",label="Default"),@Value(value="ASC",label="Ascending"),@Value(value="DESC",label="Descending")},properties={@Property(key="type",value="string"),@Property(key="fullsize",value="true")})
@FilterCriteria({IS_EQUAL_TO,IS_NOT_EQUAL_TO,IS_GREATER_THAN,IS_GREATER_THAN_OR_EQUAL_TO,IS_LESS_THAN,IS_LESS_THAN_OR_EQUAL_TO,IS_NULL,IS_NOT_NULL,IS_LIKE})
public class InputLookup
extends Input
implements Arrangeable
This class extends
Values can be specified statically by adding a list of
If the options list size is over the searchThreshold attribute, the drop down that will be shown. will be a seacrchable drop down list, with an input field that allow the user to search among the available options and so filter all the options.
Input and implements the graphic user interface element that presents a set of values
selectable through a drop-down menu that appears when the user clicks on the field. Values can be specified statically by adding a list of
InputOption as children of the component, or
dynamically, loading them from the database using a StaticView. If you want to allow
the selection of a null value, you can simply add an empty InputOption as the first child of
the component.If the options list size is over the searchThreshold attribute, the drop down that will be shown. will be a seacrchable drop down list, with an input field that allow the user to search among the available options and so filter all the options.
- 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 Stringprotected Stringprotected Stringprotected booleanprotected intprotected static final Stringprotected Stringprotected booleanprotected Stringstatic final Stringprotected intprotected static 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 TypeMethodDescriptionprotected voidappendStyle4Mac(org.apache.ecs.html.Select select) voidEvery component can add a script to the StringBuilder, script executed when the component is displayed.voidEvery component can add a script to the StringBuilder, script executed when the component is created.protected org.apache.ecs.ElementContainerorg.apache.ecs.ElementgetContentHtml(Object generationhandle, EntitySet es) Implements the interfaceArrangeable.protected org.apache.ecs.ElementgetContentHtmlDropDown(Object generationhandle, EntitySet es, List v) protected org.apache.ecs.ElementgetContentHtmlLookUp(Object generationhandle, EntitySet es, List v) Gets the default value set for this component.org.apache.ecs.ElementgetDescriptionHtml(Object generationhandle, EntitySet es) Implements the interfaceArrangeable.protected Set<SqlOperator> getFilterCriteriaToRemove(Set<overit.geocall.ux.configurability.UIProperty> properties) Implements the interfaceArrangeableorg.apache.ecs.ElementgetHiddenHtml(Object generationhandle, EntitySet es) Implements the interfaceArrangeable.protected org.apache.ecs.ElementgetHiddenHtml(String htmlname, List v) org.apache.ecs.ElementReturns the html of the Input elementbooleanRetrieves the value of thenotnullattributegetOrder()Gets the real order value to apply.intGets the threshold beyond which the component will allow you to search among the options defined, using an input filter field.protected booleanisSelected(Object inMemoryValue, String sCurrentValue, boolean defaultSelection) protected Stringprotected voidpublishValue(Object value) voidSets the name of an event associated to the field and triggered when the user changes its value.voidDefines the name of the anchor that is used to reposition the scrolling of the page following the execution of the autoevent associated with the Input.voidSets the string that appear as messages for the event associated to the field (seesetAUTOEVENT()).voidSets one the parameter for the event associated to the field (seesetAUTOEVENT()).voidIndicates if the field is the one that has the focus.voidDefines if the field must be hidden when it has only one childvoidDeprecated, for removal: This API element is subject to removal in a future version.Don't use it anymore.voidDeprecated, for removal: This API element is subject to removal in a future version.Don't use it anymore.voidsetConfiguredProperty(Map<String, Serializable> properties) Apply the user's properties customization into the component.voidIndicates if the field has to occupy all the available space in widthvoidsetModelProperties(@NotNull DataAttribute dataAttribute) Sets the model properties based on the providedDataAttribute.voidSets the order mode with which the dropdown elements will be sorted.
Possible values are: ASC: dropdown elements labels will be sorted in a Ascending way DESC: dropdown elements labels will be sorted in a Descending wayvoidDeprecated, for removal: This API element is subject to removal in a future version.Don't use it anymore.voidDeprecated, for removal: This API element is subject to removal in a future version.Don't use it anymore.voidDefines if the list of the options should be shown when the field is in the read only state, or notvoidsetSEARCHTHRESHOLD(String searchThreshold) Sets the threshold beyond which the component will allow you to search among the options defined, using an input filter field.voidDefines the type of the field values.protected voidsetup()Setup the ComponentvoidForcibly sets a valuebooleanbooleanprotected voidvoidvalidateConcreteValue(String name, Object value, boolean strong, Map arriving) Methods inherited from class overit.geocall.basic.ui.control.Input
addEventButtons, addHint, addHint, addHintsButton, ajaxQuery, connect, control, getClassStyle, getConfigurableProperties, getFullSize, getHIDDEN, getHintsEventButton, getHintsFieldName, getInsideEventButton, getInsideEventButton, getLetterCase, getSize, getVisibleDescriptionHtml, isImportant, isNotNull, isValueIgnoredByCriterion, prepareValue, queryHints, registerValidators, setAUTOCOMPLETE, setDA, setDAO, setDAO0, setDEFAULTFOCUS, setEVENT, setEVENTMSG, setEVENTPARAM, setEVENTPROMPT, setEVENTTITLE, setFILTERCRITERIA, setHIDDEN, setHints, setHINTS, setHINTSCACHE, setICON, setIMPORTANT, setKEY, setLABEL2, setLETTERCASE, setMAXLENGTH, setMSG, setNAME, setNOTNULL, setNUMERIC, setPARAM, setPLACEHOLDER, setPROMPT, setPROMPTEMPTY, setQUERY, setROEVENT, setSIZE, setupAutocomplete, validate, validateChangingValue, 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.Badgeable
badgeFormat, makeBadgedIcon
-
Field Details
-
STRING_PARENT_TYPE
- See Also:
-
CLASS_HTML_ATTRIBUTE
- See Also:
-
ORDER_ATTRIBUTE
- See Also:
-
_type
protected int _type -
_defaultValue
-
_defaultOption
-
_parentLookup
-
_parentType
-
_childLookup
-
_childType
-
_autoevent
-
_autoeventparam
-
_autoeventmsg
-
_autoeventanchor
-
_roexpanse
protected boolean _roexpanse -
searchThreshold
protected int searchThreshold -
order
-
configuredOrder
-
containsEmptyOption
protected boolean containsEmptyOption -
_msgCampoValoreNonValido
-
-
Constructor Details
-
InputLookup
public InputLookup()Creates an InputLookup
-
-
Method Details
-
setSEARCHTHRESHOLD
Sets the threshold beyond which the component will allow you to search among the options defined, using an input filter field.- Parameters:
searchThreshold- The bound to set.
-
getSearchThreshold
public int getSearchThreshold()Gets the threshold beyond which the component will allow you to search among the options defined, using an input filter field.- Returns:
- The defined threshold.
-
setPARENTLOOKUP
Deprecated, for removal: This API element is subject to removal in a future version.Don't use it anymore. Sets the parent lookup, withsetCHILDLOOKUP(java.lang.String)define a dependency between two InputLookup.- Parameters:
s- The name of the parent lookup
-
setPARENTTYPE
Deprecated, for removal: This API element is subject to removal in a future version.Don't use it anymore. Defines the type of the field values for the parent lookup.- Parameters:
s- Accepted values are: "long" (that is also the default one), to state that the values are Long values; "string" to state that the values are String values.
-
setCHILDLOOKUP
Deprecated, for removal: This API element is subject to removal in a future version.Don't use it anymore. Sets the child lookup, withsetPARENTLOOKUP(java.lang.String)define a dependency between two InputLookup.- Parameters:
s- The name of the child lookup
-
setCHILDTYPE
Deprecated, for removal: This API element is subject to removal in a future version.Don't use it anymore. Defines the type of the field values for the child lookup.- Parameters:
s- Accepted values are: "long" (that is also the default one), to state that the values are Long values; "string" to state that the values are String values.
-
setAUTOHIDDEN
Defines if the field must be hidden when it has only one child- 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 is false
-
setAUTOFOCUS
Description copied from class:InputIndicates if the field is the one that has the focus.
If you want to force the focus on a specific field you must set the attribute to true, and every other field that appears before that one in the form must have this attribute set to false- Overrides:
setAUTOFOCUSin classInput- 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 is false
-
setROEXPANSE
Defines if the list of the options should be shown when the field is in the read only state, or not- 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 is false
-
setORDER
Sets the order mode with which the dropdown elements will be sorted.
Possible values are:- ASC: dropdown elements labels will be sorted in a Ascending way
- DESC: dropdown elements labels will be sorted in a Descending way
- Parameters:
s- The order mode.
-
getOrder
Gets the real order value to apply.
This method returns the value of the attribute based on if there is a user customization on the order attribute. If there is no customization returns the default value.- Returns:
- the real order value to apply
-
setup
protected void setup()Description copied from class:ComponentSetup the Component -
setTYPE
Defines the type of the field values.- Parameters:
s- Accepted values are: "long" (that is also the default one), to state that the values are Long values; "string" to state that the values are String values.
-
setAUTOEVENTANCHOR
Defines the name of the anchor that is used to reposition the scrolling of the page following the execution of the autoevent associated with the Input. The name must correspond to the value of a reference attribute of aGridor aSection, set using the appropriate set methods (Grid.setREF(String),Section.setREF(String)).
The relocation mechanism works only with non-Ajax events, the ones that reload the page.- Parameters:
s- The name of the anchor
-
setAUTOEVENT
Sets the name of an event associated to the field and triggered when the user changes its value. By setting an autoevent, a form submit will be automatically performed when the field loses the focus.- Parameters:
s- The name of the event triggered when the user changes the field value
-
setAUTOEVENTPARAM
Sets one the parameter for the event associated to the field (seesetAUTOEVENT()).- Parameters:
s- A string that represents the param attribute of the event associated to the field
-
setAUTOEVENTMSG
Sets the string that appear as messages for the event associated to the field (seesetAUTOEVENT()).- Parameters:
s- A string that represents the msg attribute of the event associated to the field
-
setVALUE
Description copied from class:InputForcibly sets a value -
setFULLSIZE
Description copied from class:InputIndicates if the field has to occupy all the available space in width- Overrides:
setFULLSIZEin classInput- 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 is false
-
getNOTNULL
public boolean getNOTNULL()Description copied from class:InputRetrieves the value of thenotnullattribute- Overrides:
getNOTNULLin classInput- Returns:
- true if the field cannot be empty when submitted, false otherwise
-
validate
-
typeString
public boolean typeString() -
typeBoolean
public boolean typeBoolean() -
getHiddenHtml
-
getDescriptionHtml
Description copied from class:InputImplements the interfaceArrangeable. It returns the html code that represents the component description i.e. the formatted label of the field- Specified by:
getDescriptionHtmlin interfaceArrangeable- Overrides:
getDescriptionHtmlin classInput- Parameters:
generationhandle- The handle of the generationes- TheEntitySetto which the element belongs- Returns:
- The html code of the label, or null if the field don't have it or is hidden
-
getGenerationHandle
Description copied from class:InputImplements the interfaceArrangeable- Specified by:
getGenerationHandlein interfaceArrangeable- Overrides:
getGenerationHandlein classInput- Returns:
- null
-
prepareName
- Overrides:
prepareNamein classInput
-
getHiddenHtml
Description copied from class:InputImplements the interfaceArrangeable. It returns the hidden but active html part of an hidden input field.- Specified by:
getHiddenHtmlin interfaceArrangeable- Overrides:
getHiddenHtmlin classInput- Parameters:
generationhandle- The handle of the generationes- TheEntitySetto which the element belongs- Returns:
- The html code of the hidden part of the field or null if the field is visible.
-
getContentHtml
Description copied from class:InputImplements the interfaceArrangeable. It returns the html code that represents the active part of the input field, i.e. the field and the validation scripts- Specified by:
getContentHtmlin interfaceArrangeable- Overrides:
getContentHtmlin classInput- Parameters:
generationhandle- The handle of the generationes- TheEntitySetto which the element belongs- Returns:
- The html code of the input field or null if the field don't have a graphical representation
-
getContentHtmlLookUp
-
getContentHtmlDropDown
-
appendStyle4Mac
protected void appendStyle4Mac(org.apache.ecs.html.Select select) -
getHtml
Description copied from class:InputReturns the html of the Input element -
createTag
-
publishValue
-
isSelected
-
buildDisplayScript
Every component can add a script to the StringBuilder, script executed when the component is displayed. The method add the script that controls the focus on the input field.- Overrides:
buildDisplayScriptin classInput- Parameters:
sb- The StringBuilder on which we want to add the script
-
buildSetupScript
Every component can add a script to the StringBuilder, script executed when the component is created. The method add the script that controls the selected value of the field.- Overrides:
buildSetupScriptin classComponent- Parameters:
sb- The StringBuilder on which we want to add the script
-
validateConcreteValue
public void validateConcreteValue(String name, Object value, boolean strong, Map arriving) throws ValidationException - Overrides:
validateConcreteValuein classInput- Throws:
ValidationException
-
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
-
setModelProperties
Description copied from interface:overit.geocall.ux.edm.ModelConfigurableSets the model properties based on the providedDataAttribute.- Specified by:
setModelPropertiesin interfaceoverit.geocall.ux.edm.ModelConfigurable- Overrides:
setModelPropertiesin classInput- Parameters:
dataAttribute- a non-nullDataAttributeused to set model properties
-
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
-
getFilterCriteriaToRemove
protected Set<SqlOperator> getFilterCriteriaToRemove(Set<overit.geocall.ux.configurability.UIProperty> properties) - Overrides:
getFilterCriteriaToRemovein classInput
-