Package overit.geocall.basic.ui.control
Class SortableGridComponents
java.lang.Object
overit.geocall.platform.ui.UINode
overit.geocall.ui.Component
overit.geocall.ui.Control
overit.geocall.basic.ui.control.SortableGridComponents
- All Implemented Interfaces:
Serializable,overit.geocall.marks.MethodExposer,overit.geocall.marks.NameExposer,AjaxableComponent,Badgeable,ValueValidator,Identified,Tool,overit.geocall.ux.configurability.UIConfigurable,overit.geocall.ux.edm.ModelConfigurable
- Direct Known Subclasses:
SortableGenericGridComponents,SortableListComponents
@Component
public class SortableGridComponents
extends Control
implements ValueValidator, AjaxableComponent
- See Also:
-
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 Map<String, Map<String, Serializable>> protected static final Stringprotected booleanprotected booleanprotected ForeignFieldprotected Collection<String> protected booleanprotected intprotected booleanprotected booleanprotected Layoutprotected Integerprotected intprotected Integerprotected intprotected booleanprotected Stringprotected intprotected static final Stringprotected Collection<String> protected static final Stringprotected booleanprotected intFields 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, safeInlineServiceFields inherited from interface overit.geocall.ui.AjaxableComponent
FRAME_ID_PREFIX, NOTRANSITION, TRANSITION_BODY_MORPH, TRANSITION_BODY_RESIZE, TRANSITION_BORDER_RESIZE, TRANSITION_DOWN, TRANSITION_UP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets if it's possible to edit the items properties or not.booleanGets if it's possible to change the items visibility or not.voidEvery component can add a script to the StringBuilder, script executed when the component is displayed.voidchanged(overit.geocall.ux.servlet.processor.Change change) Defines the morphing of the element that occurs when there is an Ajax interactionvoidClear the temporary component visibility map that will be used to display the component with their visibility without change the real visibility of the component on the Form.protected voidconnect()protected org.apache.ecs.ElementcreateOptionButton(Icon icon, String tooltip, String onclick, String id) protected org.apache.ecs.ElementgetColumnOuterContainer(org.apache.ecs.Element sortableGridOuterContainer) protected StringgetCorrectImportantTooltip(Component c, boolean isImportantComponent) overit.geocall.ux.servlet.processor.ChangeDefines the defaultChangeobject for the elementprotected org.apache.ecs.html.DivgetExtendedIcon(String content) org.apache.ecs.ElementgetFrameHtml(overit.geocall.ux.servlet.processor.Change c, EntitySet es) Defines the html part of the element that changes when an Ajax interaction occursintGets the height of the component.org.apache.ecs.ElementAbstract method that must be extended and returns the html code of the Componentprotected IconHDGets theLayoutfrom which create the grid.protected org.apache.ecs.Elementprotected Stringprotected Stringprotected Stringprotected org.apache.ecs.ElementintgetWidth()Gets the width of the component.protected voidinsertItemsInGrid(org.apache.ecs.html.Div gridContainer) booleanGets if the drag and drop feature is enabled or not.booleanGets if the resizable feature is enabled or not.booleanGets if the sortable grid must verify if a component is important or not, in order to allow the user to hide/display the component.protected Stringprotected Stringprotected voidprotected voidvoidsetCOLUMNS(String columns) Sets the number of column for the grid.voidSets theMapof the components attributes user customization.
This map will be used to define if a specific component must show the edit icon highlighted or not.voidSets if the drag and drop feature is enabled or not.voidSets if the feature to edit items properties is enabled or not.voidsetFixedComponents(Collection<String> fixedComponents) Sets the fixed components set that will be used to display the items into the sortable grid with a specific graphic in order to let the user knows that component is fixed in the current layout saved on db (for the user customization)voidIndicates if the component has to occupy all the available space in widthvoidsetGridHasLayoutsChanges(boolean gridHasLayoutsChanges) voidSets the height of the component.voidSets if the feature to change items visibility is enabled or not.voidsetIsForResponsiveGridFrame(boolean b) Sets if the sortable grid component it's working for responsiveGridFrame.voidSets theLayoutfrom which create the grid.voidsetMAXROWS(String maxRows) Sets the maximun number of rows for the grid.voidSets the min height of the component.voidsetMINROWS(String minRows) Sets the minimum number of rows for the grid.voidSets the min width of the component.voidSets the name of the component.voidsetOnTheFlyExtendedComponent(Set<String> components) voidSets if the items resizable feature is enabled or not.voidSets the name of the event to call when user use the restore feature.voidSets the number of rows for the grid.voidsetSelectedComponent(String componentId) Sets the id of the component that is selected to edit its attributes.
When a component is selected the attributes section of the configurability panel is visible, and it's possible to edit the attributes of the component.voidsetTempComponentVisibility(Collection<String> tempComponentVisibility) Sets the temporary component visibility set that will be used to display the component with their visibility without change the real visibility of the component on the Form.voidsetUnknownExtendedComponents(List<Component> components) protected voidsetup()Setup the ComponentvoidSets if the sortable grid must verify if a component is important or not, in order to allow the user to hide/display the component.voidSets the width of the component.protected voidvalidateUnchangingValue(String name, Object value, Object published) voidvalidateValue(String name, Object value, boolean strong, Map arriving) Makes the validation to avoid tampering values of a component and it's value.
When a submit event to the server is triggered, is checked that the component is in the validator set, the value is not changed (if the component is RO), the value is changed with an allow value ecc ecc.Methods 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, buildSetupScript, 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, setICON, setIdentity, setIMPORTANT, 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
-
TOOLTIP_ATTRIBUTE
- See Also:
-
TABINDEX_ATTRIBUTE
- See Also:
-
CURSOR_POINTER_CSS_ATTRIBUTE
- See Also:
-
ff
-
l
-
columns
protected int columns -
rows
protected int rows -
maxRows
-
minRows
-
fullSize
protected boolean fullSize -
isForResponsiveGridFrame
protected boolean isForResponsiveGridFrame -
width
protected int width -
height
protected int height -
minWidth
protected int minWidth -
minHeight
protected int minHeight -
componentsAttributes
-
dragAndDrop
protected boolean dragAndDrop -
resizableItems
protected boolean resizableItems -
editableItems
protected boolean editableItems -
hideableItems
protected boolean hideableItems -
verifyImportantFields
protected boolean verifyImportantFields -
restoreEvent
-
tempComponentVisibility
-
fixedComponents
-
-
Constructor Details
-
SortableGridComponents
public SortableGridComponents()
-
-
Method Details
-
setTempComponentVisibility
Sets the temporary component visibility set that will be used to display the component with their visibility without change the real visibility of the component on the Form.- Parameters:
tempComponentVisibility- the temporary component visibility Set
-
clearTempComponentVisibility
public void clearTempComponentVisibility()Clear the temporary component visibility map that will be used to display the component with their visibility without change the real visibility of the component on the Form. -
setFixedComponents
Sets the fixed components set that will be used to display the items into the sortable grid with a specific graphic in order to let the user knows that component is fixed in the current layout saved on db (for the user customization)- Parameters:
fixedComponents- the fixed components set to set
-
setNAME
Description copied from class:ComponentSets the name of the component.
During the submit actions, theInputobjects depends on the value of this attribute to add the parameter at the form values; for this reason, this attribute is mandatory for everyInputcomponent -
setFULLSIZE
Indicates if the component has to occupy all the available space in width- 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
-
setCOLUMNS
Sets the number of column for the grid.- Parameters:
columns- the number of rows for the grid.
-
setROWS
Sets the number of rows for the grid.- Parameters:
rows- the number of rows for the grid.
-
setMAXROWS
Sets the maximun number of rows for the grid.- Parameters:
maxRows- the maximun number of rows for the grid.
-
setMINROWS
Sets the minimum number of rows for the grid.- Parameters:
minRows- the minimum number of rows for the grid.
-
getWidth
public int getWidth()Gets the width of the component.- Returns:
- the width of the component.
-
setWIDTH
Sets the width of the component.- Parameters:
s- the width of the component.
-
getHeight
public int getHeight()Gets the height of the component.- Returns:
- the height of the component.
-
setHEIGHT
Sets the height of the component.- Parameters:
s- the height of the component.
-
setMINHEIGHT
Sets the min height of the component.- Parameters:
s- the min height of the component.
-
setMINWIDTH
Sets the min width of the component.- Parameters:
s- the min width of the component.
-
setDRAGANDDROP
Sets if the drag and drop feature is enabled or not.- Parameters:
s-trueif the drag and drop feature is enabled,falseotherwise
-
setRESIZABLEITEMS
Sets if the items resizable feature is enabled or not.- Parameters:
s-trueif the items resizable feature is enabled,falseotherwise
-
setVERIFYIMPORTANTFIELDS
Sets if the sortable grid must verify if a component is important or not, in order to allow the user to hide/display the component.- Parameters:
s-trueif the sortable grid must verify if a component is important or not, in order to allow the user to hide/display the component,falseotherwise
-
isDragAndDropAllowed
public boolean isDragAndDropAllowed()Gets if the drag and drop feature is enabled or not.- Returns:
trueif the drag and drop feature is enabled,falseotherwise
-
isResizableItemsAllowed
public boolean isResizableItemsAllowed()Gets if the resizable feature is enabled or not.- Returns:
trueif the resizable feature is enabled,falseotherwise
-
mustVerifyImportantFields
public boolean mustVerifyImportantFields()Gets if the sortable grid must verify if a component is important or not, in order to allow the user to hide/display the component.- Returns:
trueif the sortable grid must verify if a component is important or not, in order to allow the user to hide/display the component.,falseotherwise
-
setEDITABLEITEMS
Sets if the feature to edit items properties is enabled or not.- Parameters:
b-trueif the feature to edit items properties is enabled,falseotherwise
-
setHIDEABLEITEMS
Sets if the feature to change items visibility is enabled or not.- Parameters:
b-trueif the feature to change items visibility is enabled,falseotherwise
-
areItemsEditable
public boolean areItemsEditable()Gets if it's possible to edit the items properties or not.- Returns:
trueif it's possible to edit the items properties,falseotherwise
-
areItemsHideable
public boolean areItemsHideable()Gets if it's possible to change the items visibility or not.- Returns:
trueif it's possible to change the items visibility,falseotherwise
-
setRESTOREEVENT
Sets the name of the event to call when user use the restore feature.- Parameters:
s- the name of the event to call when user use the restore feature.
-
setLayout
Sets theLayoutfrom which create the grid.- Parameters:
l- theLayoutfrom which create the grid.
-
setComponentsAttributes
Sets theMapof the components attributes user customization.
This map will be used to define if a specific component must show the edit icon highlighted or not.- Parameters:
map- Sets theMapof the components attributes user customization.
-
setUnknownExtendedComponents
-
setOnTheFlyExtendedComponent
-
getLayout
Gets theLayoutfrom which create the grid.- Returns:
- the
Layoutfrom which create the grid.
-
setIsForResponsiveGridFrame
public void setIsForResponsiveGridFrame(boolean b) Sets if the sortable grid component it's working for responsiveGridFrame.
For the ResponsiveGridFrame will not possible to add or remove columns due to avoid layouts columns inconsistency between ResponsiveGrids.- Parameters:
b-true, orfalse.
-
setSelectedComponent
Sets the id of the component that is selected to edit its attributes.
When a component is selected the attributes section of the configurability panel is visible, and it's possible to edit the attributes of the component. The item that represent the component into the SortableGridComponent is highlighted to make clear to the user which component he's editing.- Parameters:
componentId- the id of the component that is selected to edit its attributes.
-
setGridHasLayoutsChanges
public void setGridHasLayoutsChanges(boolean gridHasLayoutsChanges) -
setup
protected void setup()Description copied from class:ComponentSetup the Component -
connect
protected void connect() -
registerValidators
protected void registerValidators() -
prepareName
-
prepareValue
-
publish
-
getHtml
Description copied from class:ComponentAbstract method that must be extended and returns the html code of the Component -
getFrameHtml
public org.apache.ecs.Element getFrameHtml(overit.geocall.ux.servlet.processor.Change c, EntitySet es) Description copied from interface:AjaxableComponentDefines the html part of the element that changes when an Ajax interaction occurs- Specified by:
getFrameHtmlin interfaceAjaxableComponent- Parameters:
c- TheChangeobject that defines the specific morphing type for the elementes- TheEntitySetto which the element belongs- Returns:
- The html part of the element that changes when an Ajax interaction occurs
-
getColumnOuterContainer
protected org.apache.ecs.Element getColumnOuterContainer(org.apache.ecs.Element sortableGridOuterContainer) -
insertItemsInGrid
protected void insertItemsInGrid(org.apache.ecs.html.Div gridContainer) -
getExtendedIcon
-
getManageVisibilityJSCallback
-
getLabelForSortableItem
-
getIcon
-
getLeftOptionButtonsSection
protected org.apache.ecs.Element getLeftOptionButtonsSection() -
getRightOptionButtonsSection
protected org.apache.ecs.Element getRightOptionButtonsSection() -
getManageShowsAllVisibilityJSCallback
-
getManageHideAllVisibilityJSCallback
-
createOptionButton
-
changed
public void changed(overit.geocall.ux.servlet.processor.Change change) Description copied from interface:AjaxableComponentDefines the morphing of the element that occurs when there is an Ajax interaction- Specified by:
changedin interfaceAjaxableComponent- Parameters:
change- TheChangeobject that defines the specific morphing type for the element
-
getDefaultChange
public overit.geocall.ux.servlet.processor.Change getDefaultChange()Description copied from interface:AjaxableComponentDefines the defaultChangeobject for the element- Specified by:
getDefaultChangein interfaceAjaxableComponent- Returns:
- The default
Changeobject that defines the default morphing type of the element
-
validateValue
public void validateValue(String name, Object value, boolean strong, Map arriving) throws ValidationException Description copied from interface:ValueValidatorMakes the validation to avoid tampering values of a component and it's value.
When a submit event to the server is triggered, is checked that the component is in the validator set, the value is not changed (if the component is RO), the value is changed with an allow value ecc ecc.- Specified by:
validateValuein interfaceValueValidator- Parameters:
name- The name associated to the component to validate.value- The value to validatestrong- Defines if the validation must be strong or not (for not null component).arriving- AMapwith all the components (and their values) arriving from submit.- Throws:
ValidationException- Raised if the validation failed.
-
validateUnchangingValue
protected void validateUnchangingValue(String name, Object value, Object published) throws ValidationException - Throws:
ValidationException
-
getCorrectImportantTooltip
-
buildDisplayScript
Description copied from class:ComponentEvery component can add a script to the StringBuilder, script executed when the component is displayed.- Overrides:
buildDisplayScriptin classComponent- Parameters:
sb- The StringBuilder on which we want to add the script
-