Package overit.geocall.basic.ui.control
Class ColumnButtonCompare
java.lang.Object
overit.geocall.platform.ui.UINode
overit.geocall.ui.Component
overit.geocall.ui.Control
overit.geocall.basic.ui.control.Column
overit.geocall.basic.ui.control.ColumnButton
overit.geocall.basic.ui.control.ColumnButtonCompare
- 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
This class extends
For example if you want to disable the button placed in the cell
ColumnButton and implements a column that can be hidden or set readonly based on certain
conditions. In particular it is possible to define a comparison rule between the value of the cell and a set of
predefined values; if the rule is met, then the action is applied. For example if you want to disable the button placed in the cell
STATE if the value of the cell is greater
than 0, just write the following: <ColumnButtonCompare comparecol="STATE" operator="+" compareto="0" action="RO" />- 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 intprotected Stringprotected Booleanprotected Stringprotected SimpleDateFormatprotected Stringprotected Stringprotected intprotected intFields inherited from class overit.geocall.basic.ui.control.ColumnButton
_anchor, _colIdx, _dbvRowLabel, _msg, _param, _prompt, promptEmpty, textNameFields inherited from class overit.geocall.basic.ui.control.Column
_align, _bkgColorFirst, _bkgColorName, _blankvisible, _breakChars, _colorIndex, _columnorder, _descorder, _descorderQuery, _draggable, _droppable, _errorvalue, _ffGroup, _ffName, _ffTitle, _footer, _group, _groupname, _groupObject, _heading, _headTitle, _key, _labelspan, _minWidth, _msgErrore, _order, _orderQuery, _rovisible, _rowspan, _stuck, _td, _tdColor, _titleFormat, _tmColorSwitch, _userHidden, _valign, _value, _visible, _width, ALIGN_ATTRIBUTE, configuredAlign, configuredDescOrder, configuredGroup, configuredMinWidth, configuredOrder, configuredRowInLine, configuredStuck, configuredTruncate, configuredValign, configuredWidth, GROUP_ATTRIBUTE, inline, MIN_WIDTH_ATTRIBUTE, ORDER_ASC_VALUE, ORDER_ATTRIBUTE, ORDER_DESC_VALUE, ORDER_EITHER_VALUE, ROW_IN_LINE_ATTRIBUTE, STUCK_ATTRIBUTE, text, truncate, TRUNCATE_ATTRIBUTE, VERTICAL_ALIGN_ATTRIBUTE, WIDTH_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 TypeMethodDescriptionorg.apache.ecs.ElementgetHtmlRow(EntitySet es, int row, int pagerow, ArrayList al) Returns the html element that defines the rowbooleangetRO()Returns the read only state of the ControlvoidSets the action that will be performed in case of successfully comparison.voidsetCOMPARECOL(String comparecol) Sets the name of the field whose value will be compared withvoidsetCOMPARETO(String compareto) Sets the string that contains the values that will be compared against the field's value referenced by the column set with thesetCOMPARECOL(java.lang.String)method.voidsetDATEFORMAT(String formatdate) Sets the format used to parse thecompareTovalue (setCOMPARETO(java.lang.String)) into a Date objectvoidsetOPERATOR(String operator) Sets the comparison operatorMethods inherited from class overit.geocall.basic.ui.control.ColumnButton
getDefaultLayoutLabel, getLabelDiv, getLayoutName, getTD, groupable, setANCHOR, setMsg, setMSG, setPARAM, setPrompt, setPROMPT, setPROMPTEMPTY, setTEXTNAME, setupMetaDataMethods inherited from class overit.geocall.basic.ui.control.Column
freeResources, getAlign, getCellContent, getColumnOrder, getConfigurableProperties, getDescOrder, getDraggable, getDroppable, getGroup, getHeadControls, getHeadControls, getHeadLabel, getHtml, getHtmlFoot, getLABELSPAN, getMinWidth, getOrder, getRowInLine, getStuck, getTD, getTD, getTDColor, getTF, getTruncate, getUserHidden, getVAlign, getVISIBLE, getWidth, grouped, isHiddenByConfiguration, isUserDraggable, isUserHideable, isVisible, newGroup, setALIGN, setBKGCOLORFIRST, setBKGCOLORNAME, setBKGCOLORSWITCH, setBLANKVISIBLE, setBREAKCHARS, setConfiguredProperty, setDEFAULTHIDDEN, setDESCORDER, setDESCORDERQUERY, setDRAGGABLE, setDROPPABLE, setERRORVALUE, setFOOTER, setGROUP, setGROUPNAME, setHEADING, setHEADTITLE, setINLINE, setKEY, setLABELSPAN, setMINWIDTH, setMinWidthAndWidth, setModelProperties, setORDER, setORDERFIELD, setORDERQUERY, setROVISIBLE, setSTUCK, setTEXT, setTITLEFORMAT, setTITLENAME, setTooltipAndStyleOnLabel, setTRUNCATE, setup, setupTDColor, setupTitle, setUserHidden, setVALIGN, setVALUE, setVISIBLE, setWIDTHMethods inherited from class overit.geocall.ui.Control
avoidNull, clean, getBadgeFormat, getBadgeValue, getBLANK, getCleaner, getDAValues, getDBLINK, getKEYLABEL, getLABEL, getState, getTITLE, getValues, getWM, isEnabled, isEnabledBasedOnFunction, isFunctionEnabled, isImportant, isRoBasedOnFunction, nameWithNoFilterPrefix, setALTEVENTICON, setALTICON, setARIADESCRIPTION, setARIALABEL, setBADGEFORMAT, setBADGEVALUE, setBLANK, setCLEANER, setDBLINK, setENABLED, setFUNCTION, 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, getEntityContainer, getEntityName, getFullHeight, getGridAlign, getGridCols, getGridRows, getGridVAlign, getHtmlLabel, getHtmlLabel, getIcon, getId, getIdentity, getint, getLayoutLabel, getNAME, getParentComponent, getParentContainer, getPublishedChildrenList, getRegistryName, getSHORTCUT, getTabIndex, getTeacher, getValuesContainer, getWindow, initChilds, isActivable, isActive, isAliasField, isConfigHidden, isDefaultHidden, isExtendedField, isLabelInLine, onInit, setActivable, setActive, setAliasField, setBASIC, setConfigHidden, setEntityName, setExtendedField, setFULLHEIGHT, setGRIDALIGN, setGRIDCOLS, setGRIDROWS, setGRIDVALIGN, setICON, 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, makeBadgedIcon
-
Field Details
-
_oneLineRo
-
_scomparecol
-
_sformatdate
-
_soperator
-
_compareto
-
_action
protected int _action -
_type_operator
protected int _type_operator -
_type_col
protected int _type_col -
_sdf
-
-
Constructor Details
-
ColumnButtonCompare
public ColumnButtonCompare()
-
-
Method Details
-
setCOMPARETO
Sets the string that contains the values that will be compared against the field's value referenced by the column set with thesetCOMPARECOL(java.lang.String)method. The type of values must match with the one of the referenced field; for example, if the fielf is a Long type, the values must be a set of integers, or if it is a Date type, the value must be a string representing a date whose match the format indicated with thesetDATEFORMAT(java.lang.String)method.- Parameters:
compareto- The string that contains the values. The types must be Long, String, Date or Boolean
-
setCOMPARECOL
Sets the name of the field whose value will be compared with- Parameters:
comparecol- The name of a column
-
setACTION
Sets the action that will be performed in case of successfully comparison.- Parameters:
action- Possible values are:ROto make the button read only;HIDEto make the button not visible
-
setDATEFORMAT
Sets the format used to parse thecompareTovalue (setCOMPARETO(java.lang.String)) into a Date object- Parameters:
formatdate- The string used to define theSimpleDateFormatused to parse the Date values
-
setOPERATOR
Sets the comparison operator- Parameters:
operator- Possible values are:
=: equal operation
-: less than operation
+: greater than operation
-=: less or equals than operation
+=: greater or equals than operation
!: not operation
IN: operation used to test the inclusion within a set of value. In this case it is possible to set a comma separated string, into thecompareToattributesetCOMPARETO(java.lang.String)to specify more than one value.
-
getHtmlRow
Description copied from class:ColumnReturns the html element that defines the row- Overrides:
getHtmlRowin classColumnButton- Parameters:
es- TheEntitySetto which the element belongsrow- The number of the rowpagerow- The number ofd the pageal- The list of values of the row- Returns:
- The html element that defines the row
-
getRO
public boolean getRO()Description copied from class:ControlReturns the read only state of the Control
-