Class TableView
java.lang.Object
overit.geocall.platform.ui.UINode
overit.geocall.ui.Component
overit.geocall.ui.Control
overit.geocall.basic.ui.Container
overit.geocall.basic.ui.container.TableView
- All Implemented Interfaces:
Serializable,EntityContainer,overit.geocall.clipboard.XClip,overit.geocall.marks.MethodExposer,overit.geocall.marks.NameExposer,AjaxableComponent,Badgeable,DBViewManager,DraggableDroppable,Hideable,Identified,Tool,overit.geocall.ux.configurability.UIConfigurable,overit.geocall.ux.edm.ModelConfigurable
- Direct Known Subclasses:
ResourceView,ServerTableView,TableViewDD,overit.geocallapp.wfm.ui.container.TreeModelTableView,TVGanttTest
@Component
public class TableView
extends Container
implements DBViewManager, Hideable, AjaxableComponent, DraggableDroppable, overit.geocall.clipboard.XClip, Serializable, EntityContainer
The class extends
The TableView keeps all its data in memory, so it can be considered as a "client" component and must be used when the amount of data is not excessive.
The
Container and implements a table, the user interface element that allows to arranges
the data in tabular format and manages the behaviors of the child components, that are mainly columns and some particular kind of buttons. The TableView keeps all its data in memory, so it can be considered as a "client" component and must be used when the amount of data is not excessive.
The
ServerTableView (that is an extension of the TableView) it's the "server" component that, in addition to the functionalities of the TableView,
don't keeps all the data in memory but load the data on demand. Furthermore the ServerTableView, being managed on server side, provides a whole series
of additional interactions and better user interface behaviours that make it the right object to use in all cases, both when the data is loaded in memory,
and when they are saved in database and loaded on demand.- See Also:
- GCApi:
- component
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassImplements the object that manages the selections on the tableNested classes/interfaces inherited from class overit.geocall.ui.Component
Component.Configurable, Component.ConfigurableAttribute, Component.ConfigurableAttributes, Component.FilterCriteria, Component.Registry -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringUsed to store the active ordering on the contentprotected booleanprotected ArrayListprotected ArrayListprotected ArrayListprotected Stringprotected intprotected Stringprotected Stringprotected booleanprotected Column[]protected Column[]protected booleanprotected Stringprotected TableView.Selectionprotected HashGetterprotected DBViewprotected Stringprotected Stringprotected intprotected Stringprotected Stringprotected Stringprotected Stringprotected booleanUesed to define wheter the footer is positioned immediatly after the last row of the active page.protected HashGetterprotected intprotected intprotected booleanprotected intprotected intprotected intprotected Stringprotected Stringprotected Stringprotected intprotected Stringprotected Stringprotected Stringprotected intprotected StringSupport variable used to request a setMODE even when there is a repopulation of the dataprotected intprotected TableView.Selectionprotected HashGetterUsed to manage the cut and paste operations when there isn't a selection enabledprotected Stringprotected booleanprotected booleanprotected booleanprotected MapFormatprotected intprotected SetPredicateprotected StringFilter attribute used in copy and paste and drag and drop actions.protected booleanprotected intprotected intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class overit.geocall.basic.ui.Container
_rofields, _rules, DALINK_NO, DALINK_YES, DATE_MAX, DATE_MIN, TIME_MAX, TIME_MIN, TYPE_ACTION, TYPE_BOOLEAN, TYPE_DATE, TYPE_DOUBLE, TYPE_DTZ, TYPE_EURO, TYPE_FILE, TYPE_FILES, TYPE_INTEGER, TYPE_LONG, TYPE_LONGARRAY, TYPE_MAP, TYPE_MAXDATE, TYPE_MAXTIME, TYPE_MEASURE, TYPE_MINDATE, TYPE_MINTIME, TYPE_NEWACTION, TYPE_STRING, TYPE_STRINGARRAY, TYPE_SUBSET, TYPE_SUBSETRANGE, TYPE_SUPPORT, TYPE_TIMERANGEFields 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
ConstructorsConstructorDescriptionCreates a new instance of TableViewTableView(overit.geocall.ux.configurability.UiPropertiesConfigurabilityService uiPropertiesConfigurabilityService, overit.geocall.ux.configurability.ConfigurabilityService configurabilityService, overit.geocall.ux.edm.ComponentCreator componentCreator, overit.geocall.ux.configurability.ConfigurabilityUtilsService configurabilityUtilsService) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddPageSizeLookup(org.apache.ecs.html.Div d) voidEvery component can add a script to the StringBuilder, script executed when the component is displayed The method add the script that manage the position of the scrollbar of the tableprotected voidprotected voidprotected voidDeprecated.voidEvery component can add a script to the StringBuilder, script executed when the component is created The method add the script that manage the creation of the pages of the tableprotected voidbooleancanPaste()Checks if the desired content can be pasted on the table (seesetXCLASS(x)andXBoard)voidchanged(overit.geocall.ux.servlet.processor.Change change) Defines the morphing of the table element that occurs when there is an Ajax interaction
Implements theAjaxableComponentinterface.booleanprotected voidchooseSelectAction(UIMessage uim, boolean auto) Chooses the selection typeprotected booleanprotected booleanvoidcollectEntities(String[] entities) Collects all the entities related to the containerprotected booleanCopies a row of the table (seeXBoard)protected booleanCuts a row of the table (seeXBoard)protected booleanPastes a row on the table (seeXBoard)protected booleanRemoves a row of the tabledrag(DragDrop.Part source) Implements the operation of drag from the table (implements theDraggableDroppable)voiddragDrop(DragDrop.Part source, DragDrop.Part destination, boolean moving) Implements the operation of drag and drop on the same table (DraggableDroppableinterface)voiddragged(DragDrop.Part source, DragDrop.Part destination, Object dragged, boolean moved) Called when the object is dropped (implements theDraggableDroppableinterface)drop(DragDrop.Part source, DragDrop.Part destination, Object toDrop) Implements the operation of drop on the table (implements theDraggableDroppableinterface)findColumnGroup(Column col) Finds the column group of the one passed as parametervoidfreeClip(boolean delete) Used in drop phase and manage the deletion of the record of the dbv if the drag operation was a cutting one.protected org.apache.ecs.ElementgetCaption(EntitySet es) getColumnByLayoutName(String name) getColumnByName(String name) Column[]Gets the children columns of the table.intReturns the current shown page of a paginated tableReturns the name of the column used by the cut mechanism of the tableReturns the Set of the cutted rows of the tableReturns the specificcuttingTableView.Selectionfor this table, the object that manages the cutting mechanismintReturns the number of the rows currently cutted on the tableReturns theDBViewof the tableoverit.geocall.ux.servlet.processor.ChangeDefines the defaultChangeobject for the table.protected org.apache.ecs.ElementGets the list of the entities related to the grid.Gets theEntityValidatorrelated to the container.protected org.apache.ecs.ElementgetExtensionRow(int end) booleanGets if the footer must be positioned on the bottom of the table, or not.
The default value isfalseso the footer will be placed on the bottom unless differently specified.org.apache.ecs.ElementgetFrameHtml(overit.geocall.ux.servlet.processor.Change change, EntitySet es) Defines the html part of the table that changes when an Ajax interaction occurs.org.apache.ecs.ElementReturns the html code of the tablegetMode()Returns the current active mode of the table (seesetMode(mode))protected org.apache.ecs.Elementprotected org.apache.ecs.ElementgetNavBarHtml(EntitySet es, int pages, int page) Column[]Gets the original children columns of the table.
The Original columns are the children column without any user customization and movement (only with those applied by the profile).protected org.apache.ecs.ElementGets the profile layout customizations like columns movements and hidden columnsprotected State.Confprotected State.ConfbooleangetRo()Returns the boolean value that indicates if the table is in readonly stateprotected List<org.apache.ecs.Element> protected List<org.apache.ecs.Element> Deprecated.Returns the specificselectionTableView.Selectionfor this table, the object that manages the selection mechanismintReturns the number of the rows currently selected on the tableReturns the name of the column used by the row selection mechanism of the tableReturns theselectSetprotected State.Confprotected State.Confprotected State.Confprotected Stringprotected org.apache.ecs.html.TRGets the user layout customizations like columns movements and hidden columnsGets the original children columns of the table.
The Original columns are the children column without any user or profile customization and movement.protected booleanvoidInvalidates the map that contains all the user's component customization and force it to be reloaded.booleanisCutSet()Checks if the cutting mechanism uses aselectsetor not (seesetSELECTSET())booleanisCutted(int row) Checks if a row is currently cuttedbooleanisSelected(int row) Checks if a row is currently selectedbooleanChecks if the selection mechanism uses aselectsetor not (seesetSELECTSET())booleanChecks if the table is rendered for the user currently logged in the application, or not (seegetBoolean(visible,id,true))protected booleanmoveColumn(Column from, Column to, boolean after) Moves a column before or after another columnprotected booleanneedsNavBar(int pages) booleanonAutoSelect(UIMessage uim) Makes an enhanced selection of the rows of the table.protected voidonBodyClick(org.apache.ecs.html.Div d) booleanonChangeRows(UIMessage uim) booleanonColumnMove(UIMessage uim) Changes the position of the columns of the tablebooleanbooleanCreates the column control menu, the menu that appear when the user click on the icon in the upper left corner of the table and it can be used to rearrange the visibility and the position of the columnsbooleanDeprecated.UseonCopy(uim)booleanCopies a row of the table (seeXBoard)booleanDeprecated.UseonCut(uim)booleanCuts a row of the table (seeXBoard)voidMethod called when is executed theWindowManager.push(overit.geocall.basic.ui.Window, java.lang.Object)of theWindowthat contains the Container.booleanonOpenPage(Object o) Manages the event of opening a pagebooleanonOrder(HashGetter hg) Orders the data of the table (seesetMode())booleanDeprecated.UseonPaste(uim)booleanPastes a row on the table (seeXBoard)booleanDeprecated.UseonRemove(uim)booleanRemoves a row of the tablebooleanbooleanDeprecated.UseonSelect(uim)insteadbooleanMakes a multiple selection of the rows of the table.booleanSelects all the rows of the table (usually used in association with aTableButton)booleanDeselects all the rows of the table (usually used in association with aTableButton)booleanbooleanDeprecated.booleanonSingleSelect(UIMessage uim) Makes a single selection of the rows of the table.booleanCreates the menu that is used to sort the data of the table (seeTableOrder); there will be one row for every function enabled TableOrder itembooleanUsed in association with aColumnBoolean, called when the user click on a boolean value of the column to switch from true to false and the other way aroundprotected ArrayListpasteContent(int row, Serializable s, boolean local) protected booleanselectAction(int row, boolean shift, boolean ctrl) Does the selectionvoidAdds the anchor html attribute to the tablevoidSets the column name used to define the background color of the rows of the table.voidDefines the coding of a value taken by the column (whose name corresponds to the one indicated in thebkgColorNameattribute (seesetBKGCOLORNAME())) in the corresponding color.voidEnables or not the horizontal scroll of the table's content when it is wider than the available space.voidsetCUTNAME(String s) Sets the column name used to decide which record cut.voidSets theDBView, i.e. the logical view of a portion of a database table usually obtained as a result of a query and manteined in memory, to the TableView.voidSpecifies if the rows of the table (and therefore all their values) can be dragged to another (droppable) componentvoidSpecifies if the user can drop some values from another (draggable) component into the tablevoidEnables or disables the possibility to edit the table.voidSets the entities related to this gridvoidSets the string that contains the name of the event that will be triggered when the user makes a left click (or single touch) on a table's rowvoidSets the string that contains the name of the event that will be triggered when the user makes a double click (or double touch) on a table's rowvoidvoidSets the string that contains the name of the event that will be triggered when the user makes a right click (or a longpress on touch devices) on a table's rowvoidSets if the footer must be positioned on the bottom of the table or not.voidSets theHashGetterthat contains the footer values (usually the totals) of the tablevoidsetFROM(int i) Sets the index of the first record to show.voidIndicates if the table has to occupy all the available space in widthvoidSets the height of the table.voidNumber indicating the table’s minimum width (in pixel).voidDefines the sorting of the data of the table.voidDefines the initial sorting of the data of the table.voidSets the message that appear when is triggered the event associated to the click (touch) over a record of the table (seesetEVENT())voidSets the message that appear when is triggered the event associated to the click (touch) over a record of the table (seesetEVENT())voidSets the message that appear when is triggered the event associated to the double click (double touch) over a record of the table (seesetEVENT2())voidSets the message that appear when is triggered the event associated to the double click (double touch) over a record of the table (seesetEVENT2())voidSets the message that appear when is triggered the event associated to the right click (longpress on touch devices) over a record of the table (seesetEVENTR())voidSets the message that appear when is triggered the event associated to the right click (longpress on touch devices) over a record of the table (seesetEVENTR())voidSets the parameter that will be passed to the event (setEVENT(s)) triggered when the user click (touch) over a record of the tablevoidSets the parameter that will be passed to the event (setEVENT2(s)) triggered when the user makes a double click (double touch) over a record of the tablevoidSets the parameter that will be passed to the event (setEVENTR(s)) triggered when the user makes a right click (in touch devices that is mapped in a longpress) over a record of the tablevoidsetRo(boolean ro) Sets the readonly state of the tablevoidSets the number of the rows of the table to be displayed.voidSets the column name that will be used in the rows selection mechanism of the table.voidsetSelectSet(Set s) Forcibly sets aselectSetvoidEnables or not the selection of a row using an index column rather than a boolean column that maintains the selection status of the row.voidSets the title to show when the mouse is placed over a row of the table.voidsetTO(int i) Sets the index of the last record to show.protected voidsetup()Setup the ComponentvoidsetupMetaData(DBView dbv) Called to init all the field starting form the DBView.protected voidvoidprotected voidvoidsetVISIBLE(String s) Defines if the table should be rendered or notvoidSets a particularxclassto the table; this string is used to limit the operations of copy / cut / paste / drag / drop that can be executed only between objects that have the samexclassattribute.protected booleanprotected voidupdateCurrentRowsForPage(int newRows) protected voidupdateStateConf(Column from, Column to, boolean after) protected booleanMethods inherited from class overit.geocall.basic.ui.Container
alert, applyRule, getBASIC, getBLANK, getRO, getROField, onClose, onOpenChildContainer, onRestore, onRule, prepareName, rulesNewValues, setROField, setValues, setValuesMethods inherited from class overit.geocall.ui.Control
avoidNull, clean, getBadgeFormat, getBadgeValue, getCleaner, getConfigurableProperties, getDAValues, getDBLINK, getKEYLABEL, getLABEL, 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, calcKeyLabel, calcLabel, calcShortcut, canBeConfigured, changed, clearConfiguredProperties, componentIterator, componentSize, connect, containerIterator, createAjaxFrame, deprecate, fillSetupScript, generateFlexableFullHeightContainer, generateId, 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, 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, makeBadgedIconMethods inherited from interface overit.geocall.ui.Hideable
getVISIBLEMethods inherited from interface overit.geocall.clipboard.XClip
getWM
-
Field Details
-
TABLE_OBJ_TEMP_PREFIX
- See Also:
-
TABLE_WIDGET_STATE_CLASS
- See Also:
-
TABLE_WIDGET_ATTRIBUTES_OBJECT
- See Also:
-
TABLE_FIELDS_OBJECT_NAME
- See Also:
-
PARAM_KEY
- See Also:
-
TABLE_CONFIGURABILITY_PANEL_PATH
- See Also:
-
NOT_IDENTIFIED_COLUMN_PLACEHOLDER
- See Also:
-
_dbv
-
_changedMetaData
protected boolean _changedMetaData -
_columns
-
_columnsOrigin
-
_alTableMessages
-
_alRowMessages
-
_alTableOrders
-
_from
protected int _from -
_to
protected int _to -
_query
protected int _query -
_fullsize
protected boolean _fullsize -
_rows
protected int _rows -
configurableRows
-
_page
protected int _page -
_begin
protected int _begin -
_end
protected int _end -
_forceFirstPage
protected int _forceFirstPage -
_activeMode
Used to store the active ordering on the content -
_requestedMode
Support variable used to request a setMODE even when there is a repopulation of the data -
_visible
-
_selectname
-
_selectset
protected boolean _selectset -
_cutname
-
_selection
-
_cutting
-
_selectionRow
Used to manage the cut and paste operations when there isn't a selection enabled -
_cuttingRow
-
_xclass
Filter attribute used in copy and paste and drag and drop actions. We can paste / drop the content only if the origin object has the same xclass of the destination object -
_lastSelected
protected int _lastSelected -
_event
-
_event2
-
_eventr
-
_msg
-
_msg2
-
_msgr
-
_param
-
_param2
-
_paramr
-
_eventmode
-
_bkgColorName
-
_bkgColorSwitch
-
_height
protected int _height -
_anchor
-
_titleFormat
-
_somethingHidden
protected boolean _somethingHidden -
_someThingDraggable
protected boolean _someThingDraggable -
_advancedLayout
protected boolean _advancedLayout -
_draggable
-
_droppable
-
_contentFrame
protected boolean _contentFrame -
_minWidth
protected int _minWidth -
editable
protected boolean editable -
extensionTabIndex
protected int extensionTabIndex
-
-
Constructor Details
-
TableView
public TableView()Creates a new instance of TableView -
TableView
public TableView(overit.geocall.ux.configurability.UiPropertiesConfigurabilityService uiPropertiesConfigurabilityService, overit.geocall.ux.configurability.ConfigurabilityService configurabilityService, overit.geocall.ux.edm.ComponentCreator componentCreator, overit.geocall.ux.configurability.ConfigurabilityUtilsService configurabilityUtilsService)
-
-
Method Details
-
setANCHOR
Adds the anchor html attribute to the table- Parameters:
s- The string that defines the value of the anchor attribute
-
setPARAM
Sets the parameter that will be passed to the event (setEVENT(s)) triggered when the user click (touch) over a record of the table- Parameters:
s- The parameter passed to the event
-
setPARAM2
Sets the parameter that will be passed to the event (setEVENT2(s)) triggered when the user makes a double click (double touch) over a record of the table- Parameters:
s- The parameter passed to the event
-
setPARAMR
Sets the parameter that will be passed to the event (setEVENTR(s)) triggered when the user makes a right click (in touch devices that is mapped in a longpress) over a record of the table- Parameters:
s- The parameter passed to the event
-
setHEIGHT
Sets the height of the table.
If the total number of the rows cannot be entirely displayed by the given height, it will appear a scrollbar.
Use this method as an alternative tosetROWS()which instead is used to set the number of rows to be displayed- Parameters:
s- The height, expressed in pixels
-
setXCLASS
Sets a particularxclassto the table; this string is used to limit the operations of copy / cut / paste / drag / drop that can be executed only between objects that have the samexclassattribute. If no value is specified, there aren't restriction imposed; otherwise a value can be pasted / dropped on the table only if the source component has the samexclassvalue- Parameters:
xclass- The string that defines thexclassfor the table
-
setENTITY
Sets the entities related to this grid- Parameters:
s- The list of the entities separated by a comma
-
collectEntities
Description copied from interface:EntityContainerCollects all the entities related to the container- Specified by:
collectEntitiesin interfaceEntityContainer- Parameters:
entities- The entities to collect
-
getEntityValidator
Description copied from interface:EntityContainerGets theEntityValidatorrelated to the container.- Specified by:
getEntityValidatorin interfaceEntityContainer- Returns:
- The
EntityValidatorrelated to the container.
-
getEntities
Gets the list of the entities related to the grid.- Specified by:
getEntitiesin interfaceEntityContainer- Returns:
- the list of the entities related to the grid.
-
setup
protected void setup()Description copied from class:ComponentSetup the Component -
setupSelection
protected void setupSelection() -
setDRAGGABLE
Specifies if the rows of the table (and therefore all their values) can be dragged to another (droppable) component- Parameters:
s- A string that defines if the rows of the table are draggable, and the behavior of the dragging. The possible accepted values are:
"+" the drag operation copies the row values;
"-" the drag operation removes the row from the table;
"+-" the drag operation copies or removes the rows depending on whether the CTRL key is pressed or not during the drag operation.
-
setDROPPABLE
Specifies if the user can drop some values from another (draggable) component into the table- Parameters:
s- A string that defines if the table accepts the drop of values from another component. The possible value are:
"table": it is possible to drop on the table's header or on the body of the table (but not on a row, i.e. when the table is empty). The dragged component will be added as last row of the table. "row": it is possible to drop on the table's rows. The dragged component will be added before the row over which the mouse is positioned at the moment of the drop
-
setFULLSIZE
Indicates if the table 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
-
setVISIBLE
Defines if the table should be rendered or not- Specified by:
setVISIBLEin interfaceHideable- Parameters:
s- A string that represents a boolean value ("true" or "1", "false" or "0") or a function.
If the string is not recognized as a boolean value, it is considered as a user function with this meaning: if the user currently logged in the application has the function, the table will be rendered, otherwise it will not
-
isVisible
public boolean isVisible()Checks if the table is rendered for the user currently logged in the application, or not (seegetBoolean(visible,id,true)) -
setSELECTNAME
Sets the column name that will be used in the rows selection mechanism of the table.
The meaning of this attribute depends on the value assigned to theselectsetvariable, withsetSELECTSET.
Ifselectsetis true, the string passed as parameter to this method should contains the name of the column used to decide which record select; for this reason, the field must be a key field (usually the ID field), which identificate uniquely one record among the others, to prevent unwanted multiple selection with a single choice.
Ifselectsetis false, the string contains the name of a column to which can be assigned boolean values only (true if the record is selected, false otherwise). In this case te selection depends on the boolean value of the column, i.e. if the value is true the row is selected.- Parameters:
s- The name of a column of the table
-
getSELECTNAME
Returns the name of the column used by the row selection mechanism of the table- Returns:
- The name of the column of the table used by the selection mechanism
-
setSELECTSET
Enables or not the selection of a row using an index column rather than a boolean column that maintains the selection status of the row. The column to be used for selection is defined withsetSELECTNAME(s)- 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 false
-
setCUTNAME
Sets the column name used to decide which record cut. If not specified, the column is the same to the one used for the selection (seesetSELECTNAME(s))- Parameters:
s- The name of a column of the table
-
getCUTNAME
Returns the name of the column used by the cut mechanism of the table- Returns:
- The name of the column of the table used by the cutting mechanism
-
isSelectSet
public boolean isSelectSet()Checks if the selection mechanism uses aselectsetor not (seesetSELECTSET())- Returns:
- true if the selection mechanism uses a
selectset, false otherwise
-
isCutSet
public boolean isCutSet()Checks if the cutting mechanism uses aselectsetor not (seesetSELECTSET())- Returns:
- true if the cutting mechanism uses a
selectset, false otherwise
-
setEVENTMODE
Defines the behaviour of the events set withsetEVENT(s),setEVENT2(s),setEVENTR(s). In particular with this method it is possible to specify wheter the event affects the entire rows or the single cells.
The possible values are:
"row": the event receives an integere parameter "row", that indicates the number of the clicked row "cell": the event receives an integer parameter "row" that indicates the number of the clicked row and a string parameter "column" that indicates the name of the clicked column- Parameters:
s- One chosen from the strings "row" or "cell"
-
setEVENT
Sets the string that contains the name of the event that will be triggered when the user makes a left click (or single touch) on a table's row- Parameters:
s- The name of the event
-
setEVENT2
Sets the string that contains the name of the event that will be triggered when the user makes a double click (or double touch) on a table's row- Parameters:
s- The name of the event
-
setEVENTR
Sets the string that contains the name of the event that will be triggered when the user makes a right click (or a longpress on touch devices) on a table's row- Parameters:
s- The name of the event
-
setMSG
Sets the message that appear when is triggered the event associated to the click (touch) over a record of the table (seesetEVENT())- Parameters:
s- The message that will appear before the execution of the event
-
setMSG2
Sets the message that appear when is triggered the event associated to the double click (double touch) over a record of the table (seesetEVENT2())- Parameters:
s- The message that will appear before the execution of the event
-
setMSGR
Sets the message that appear when is triggered the event associated to the right click (longpress on touch devices) over a record of the table (seesetEVENTR())- Parameters:
s- The message that will appear before the execution of the event
-
setMODE
Defines the initial sorting of the data of the table.
It is possible to indicate the name of the field used to sort all the records in ascending or descending order and can be obtained even a sorting on multiple fields.- Parameters:
s- The name of a single column to obtain an ascending order based on that field (for example "AUSEID").
The name of a single column preceded by the exclamation mark to obtain a descending order based on that column (for example "!AUSEID").
A comma separated list of column names to obtain a sorting on multiple fields (for example "AUTESURNAME,!AUTENAME").
-
setROWS
Sets the number of the rows of the table to be displayed.
If the total number of rows in the table is greater than the number of rows set by this method, the table will be paginated and will appear the arrows with the possibility to browse through the pages.
If the table is paginated, it is possible to define multiple values for the number of rows to be displayed for every page, using the comma as separator. Defining multiple values will allow the user to select the number of rows to be displayed for each page at runtime. Use this method as an alternative tosetHEIGHT()which instead is used to set the height of the table, expressed in pixel- Parameters:
s- The number of rows to be displayed (on every page)
-
setBKGCOLORNAME
Sets the column name used to define the background color of the rows of the table.
If it is not defined a value for thebkgColorSwitchattribute (seesetBKGCOLORSWITCH()), the background color of the column is defined by the value contained in the column set by this method (the value must be compliant to css color rules). Otherwise the color is defined based on the decoding of the value of thebkgColorSwitchattribute- Parameters:
s- The name of the column used to select the background color
-
setBKGCOLORSWITCH
Defines the coding of a value taken by the column (whose name corresponds to the one indicated in thebkgColorNameattribute (seesetBKGCOLORNAME())) in the corresponding color.- Parameters:
s- The parameter must be compliant to this format: "value,color,value,color,..." where value is a possible value of the field, and color is the corresponding color. Here are some usage examples:
"1,#FF0000,2,#00FF002": if the value of the field defined inbkgColorNameis equals to 1, then the background color will be #FF0000. Otherwise if it's equals to 2, then the color will be #00FF00
"1,red,,blue": if the value of the field defined inbkgColorNameis equals to 1, then the background color will be red, otherwise will be blue
"1,red,0,": if the value of the field defined inbkgColorNameis equals to 1, then the background color will be red, otherwise if it's 0, no color will be applied
-
setTITLEFORMAT
Sets the title to show when the mouse is placed over a row of the table. It is possible to compose static titles or dynamic ones (using theMapFormatmechanism, so adding the name of the desired columns enclosed in braces). It is also possible use html code paying attention to write special characters (like <,>,&, etc.) using the html coding (>,<,&, etc.).- Parameters:
s- The string tho show. Example: "{AUSEID} - Username: {AUSEUSERNAME}"
-
setCONTENTFRAME
Enables or not the horizontal scroll of the table's content when it is wider than the available space.- 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 false
-
setMINWIDTH
Number indicating the table’s minimum width (in pixel).- Parameters:
s- The minimum width of the table
-
setEDITABLE
Enables or disables the possibility to edit the table. When set to false, the edit icons (configurability icon and column visibility icon) will not appear.- 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 true (default)
-
setSelectSet
Forcibly sets aselectSet- Parameters:
s- The set of the selected rows
-
getSelection
Returns the specificselectionTableView.Selectionfor this table, the object that manages the selection mechanism- Returns:
- The object that manages the selection of the rows of the table
-
getCutting
Returns the specificcuttingTableView.Selectionfor this table, the object that manages the cutting mechanism- Returns:
- The object that manages the cutting of the rows of the table
-
getSelectSet
Returns theselectSet- Returns:
- The Set of the selected rows of the table, or null if there isn't a selection
-
getCutSet
Returns the Set of the cutted rows of the table- Returns:
- The Set of the cutted rows of the table, or null if there aren't cutted rows
-
getStateConf
-
getProfileStateConf
-
getStateConfFields
-
getProfileStateConfFields
-
getStateConfAttributes
-
setFOOTERLASTROW
Sets if the footer must be positioned on the bottom of the table or not.- Parameters:
s-trueif the footer must be positioned on the bottom,falseotherwise.
-
getFOOTERLASTROW
public boolean getFOOTERLASTROW()Gets if the footer must be positioned on the bottom of the table, or not.
The default value isfalseso the footer will be placed on the bottom unless differently specified.- Returns:
trueif the footer must be positioned on the bottom,falseotherwise.
-
onOpen
Description copied from class:ContainerMethod called when is executed theWindowManager.push(overit.geocall.basic.ui.Window, java.lang.Object)of theWindowthat contains the Container. It calls the onOpen(o) method of all the Container's childrens.
If a page is opened through the process of a route, it is possible that the route was called with params to pass to the page.
The route params could be passed specifying them like query string's param on the url, using commas or the '=' character, to separate the keys and the values. Valid syntaxs are: "¶ms=KEY1,VAL1,KEY2,VAL2" or "¶ms=KEY1=VAL1,KEY2=VAL2"
In that case it is possible to retrieve those params via theWindowManager.getRouteParams()method that returns anHashGetterwith the params passed as parameters.
For example it's possible to retrieve and use the params in this way:HashGetter hg = getWM().getRouteParams();
String val1 = hg.getString("key1",null);
String val2 = hg.getString("key2",null); -
setupTableColumns
public void setupTableColumns() -
getFieldsProfileVisibilityList
-
getFieldsUserVisibilityList
-
setDBView
Sets theDBView, i.e. the logical view of a portion of a database table usually obtained as a result of a query and manteined in memory, to the TableView.
Implements theDBViewManagerinterface.- Specified by:
setDBViewin interfaceDBViewManager- Parameters:
dbv- The DBView that we want to set to the table
-
getDBView
Returns theDBViewof the table- Specified by:
getDBViewin interfaceDBViewManager- Returns:
- The DBView associated to the table
-
setFROM
public void setFROM(int i) Sets the index of the first record to show. This attribute is effective only in a paginated table.- Specified by:
setFROMin interfaceDBViewManager- Parameters:
i- The index of the first record to show
-
setTO
public void setTO(int i) Sets the index of the last record to show. This attribute is effective only in a paginated table.- Specified by:
setTOin interfaceDBViewManager- Parameters:
i- The index of the last record to show
-
getCurrentPage
public int getCurrentPage()Returns the current shown page of a paginated table- Returns:
- The index of the current page
-
addPageSizeLookup
protected void addPageSizeLookup(org.apache.ecs.html.Div d) -
getPage
-
getRows
@Deprecated protected List<org.apache.ecs.Element> getRows(EntitySet es, int begin, int end, Boolean someThingDraggable) Deprecated.- Parameters:
es- The EntitySetbegin- The begin of the rowend- The end of the rowsomeThingDraggable- Boolean indicating is something is draggable- Returns:
- A list of the element of the rows
-
getRows
-
getExtensionRow
protected org.apache.ecs.Element getExtensionRow(int end) -
getTitle
-
getTR
-
setupMetaData
Called to init all the field starting form the DBView. Setup the Selection, sets the value of the position of the column used to select and the field position.- Parameters:
dbv- The DBView used to populate all the field
-
onBodyClick
protected void onBodyClick(org.apache.ecs.html.Div d) -
getHtml
Returns the html code of the table -
changed
public void changed(overit.geocall.ux.servlet.processor.Change change) Defines the morphing of the table element that occurs when there is an Ajax interaction
Implements theAjaxableComponentinterface.- Specified by:
changedin interfaceAjaxableComponent- Parameters:
change- TheChangeobject that defines the specific morphing type for the table
-
getDefaultChange
public overit.geocall.ux.servlet.processor.Change getDefaultChange()- Specified by:
getDefaultChangein interfaceAjaxableComponent- Returns:
- The default
Changeobject that defines the default morphing type of the table
-
getFrameHtml
public org.apache.ecs.Element getFrameHtml(overit.geocall.ux.servlet.processor.Change change, EntitySet es) Defines the html part of the table that changes when an Ajax interaction occurs.
Implements theAjaxableComponentinterface.- Specified by:
getFrameHtmlin interfaceAjaxableComponent- Parameters:
change- TheChangeobject that defines the specific morphing type for the tablees- TheEntitySetto which the element belongs- Returns:
- The html part of the table that changes when an Ajax interaction occurs
-
getRo
public boolean getRo()Returns the boolean value that indicates if the table is in readonly state- Specified by:
getRoin interfaceDBViewManager- Returns:
- true if the table is in readonly state, false otherwise
-
buildSetupScript
Every component can add a script to the StringBuilder, script executed when the component is created The method add the script that manage the creation of the pages of the table- Overrides:
buildSetupScriptin classComponent- Parameters:
sb- The StringBuilder on which we want to add the script
-
buildLoadPageScript
-
buildDisplayScript
Every component can add a script to the StringBuilder, script executed when the component is displayed The method add the script that manage the position of the scrollbar of the table- Overrides:
buildDisplayScriptin classComponent- Parameters:
sb- The StringBuilder on which we want to add the script
-
buildScrollTopScript
Deprecated.Don't use this method, usebuildScrollScript(StringBuilder)instead.Don't use this method, usebuildScrollScript(StringBuilder)instead.- Parameters:
sb- Don't use this method, usebuildScrollScript(StringBuilder)instead.
-
buildScrollScript
-
buildStuckScript
-
setRo
public void setRo(boolean ro) Sets the readonly state of the table- Specified by:
setRoin interfaceDBViewManager- Parameters:
ro- true if the table must be in readonly state, false otherwise
-
setMsg
Sets the message that appear when is triggered the event associated to the click (touch) over a record of the table (seesetEVENT())- Parameters:
s- The message that will appear before the execution of the event
-
setMsg2
Sets the message that appear when is triggered the event associated to the double click (double touch) over a record of the table (seesetEVENT2())- Parameters:
s- The message that will appear before the execution of the event
-
setMsgR
Sets the message that appear when is triggered the event associated to the right click (longpress on touch devices) over a record of the table (seesetEVENTR())- Parameters:
s- The message that will appear before the execution of the event
-
onSelect
Deprecated.UseonSelect(uim)instead- Parameters:
o- UseonSelect(uim)instead- Returns:
- Use
onSelect(uim)instead
-
onSelect
Makes a multiple selection of the rows of the table. It is the "classical" selection method. Using this method, on every click on a record, the corresponding row it's added to the Set of the selected rows. If the user is pressing the SHIFT button during the selection (during the click), it is performed a range multiple selection.- Parameters:
uim- TheUIMessagethat contains values, parameters and control values- Returns:
- false
-
onAutoSelect
Makes an enhanced selection of the rows of the table. Using this method, every click is considered as a single selection, so on every click the Set of selected rows contains only one element, i.e. the current selected element. If the user is pressing the CTRL button during the selection (during the click), it is performed a multiple selection, so the row clicked in this case is added to the Set of the selected ones. If the user is pressing the SHIFT button during the selection (during the click), it is performed a range multiple selection.- Parameters:
uim- TheUIMessagethat contains values, parameters and control values- Returns:
- false
-
chooseSelectAction
Chooses the selection type- Parameters:
uim- TheUIMessagethat contains values, parameters and control valuesauto- Defines the use of the new method (multiple with control keys) or the old one
-
onSingleSelect
Deprecated.Makes a single selection of the rows of the table. Using this method, every click is considered as a single selection, so on every click the Set of selected rows contains only one element, i.e. the current selected element.- Parameters:
o- The map that contains the number of the selected row- Returns:
- false
-
onSingleSelect
Makes a single selection of the rows of the table. Using this method, every click is considered as a single selection, so on every click the Set of selected rows contains only one element, i.e. the current selected element.- Parameters:
uim- The map that contains the number of the selected row- Returns:
- false
-
selectAction
protected boolean selectAction(int row, boolean shift, boolean ctrl) Does the selection- Parameters:
row- Number of the selected rowshift- true if the shift button was pressed during the selection, false otherwisectrl- true if the ctrl button was pressed during the selection, false otherwise- Returns:
- true if something is changed, false otherwise
-
onSelectAll
Selects all the rows of the table (usually used in association with aTableButton)- Parameters:
o- Not used- Returns:
- false
-
onSelectTable
-
onSelectNone
Deselects all the rows of the table (usually used in association with aTableButton)- Parameters:
o- Not used- Returns:
- false
-
onOrder
Orders the data of the table (seesetMode())- Parameters:
hg- The map used to retrieve the parameter for the setMode() event- Returns:
- true
-
getMode
Returns the current active mode of the table (seesetMode(mode))- Specified by:
getModein interfaceDBViewManager- Returns:
- The string that defines the current active mode of the table
-
setMode
Defines the sorting of the data of the table.
It is possible to indicate the name of the field used to sort all the records in ascending or descending order and can be obtained even a sorting on multiple fields.- Specified by:
setModein interfaceDBViewManager- Parameters:
mode- The name of a single column to obtain an ascending order based on that field (for example "AUSEID").
The name of a single column preceded by the exclamation mark to obtain a descending order based on that column (for example "!AUSEID").
A comma separated list of column names to obtain a sorting on multiple fields (for example "AUTESURNAME,!AUTENAME").
A null value will reset the sorting.
-
changedMetaData
public boolean changedMetaData()- Specified by:
changedMetaDatain interfaceDBViewManager
-
getCaption
-
hasTableOrders
protected boolean hasTableOrders() -
clickOnControlMenu
protected boolean clickOnControlMenu() -
clickOnControlLightMenu
protected boolean clickOnControlLightMenu() -
getDropDownMenu
-
onControlMenu
Creates the column control menu, the menu that appear when the user click on the icon in the upper left corner of the table and it can be used to rearrange the visibility and the position of the columns- Parameters:
hg- Not used- Returns:
- true
-
onControlLightMenu
-
onSaveLightTableCustomization
-
onTableOrdersMenu
Creates the menu that is used to sort the data of the table (seeTableOrder); there will be one row for every function enabled TableOrder item- Parameters:
hg- Not used- Returns:
- true
-
setupUserHiddenColumns
protected void setupUserHiddenColumns() -
onOpenPage
Manages the event of opening a page- Parameters:
o- HashGetter with the param of the row- Returns:
false
-
getColumnByName
-
getColumnByLayoutName
-
dragDrop
Implements the operation of drag and drop on the same table (DraggableDroppableinterface)- Specified by:
dragDropin interfaceDraggableDroppable- Parameters:
source- The source object, from where we are draggingdestination- The destination object, where we are droppingmoving- true if the operation removes the values dragged from the source (like a cut operation), false otherwise (like a copy operation)
-
drag
Implements the operation of drag from the table (implements theDraggableDroppable)- Specified by:
dragin interfaceDraggableDroppable- Parameters:
source- The table element from which we are dragging- Returns:
- null
- Throws:
DragDropException- If an error occurs during the drag operation, a DragDropException is raised
-
drop
public Object drop(DragDrop.Part source, DragDrop.Part destination, Object toDrop) throws DragDropException Implements the operation of drop on the table (implements theDraggableDroppableinterface)- Specified by:
dropin interfaceDraggableDroppable- Parameters:
source- The source object from which we are draggingdestination- The destination object, the table element on which we are droppingtoDrop- The object that we want to drop on the table- Returns:
- The object dropped, or null if the operation of drop is not possible
- Throws:
DragDropException- If an error occurs during the drop operation, a DragDropException is raised
-
dragged
public void dragged(DragDrop.Part source, DragDrop.Part destination, Object dragged, boolean moved) throws DragDropException Called when the object is dropped (implements theDraggableDroppableinterface)- Specified by:
draggedin interfaceDraggableDroppable- Parameters:
source- The source object, from which we are draggingdestination- The destination object, the table element on which we are droppingdragged- The object that we want to drop on the tablemoved- true if the operation removes the values dragged from the source (like a cut operation), false otherwise (like a copy operation)- Throws:
DragDropException- f an error occurs during the operation, a DragDropException is raised
-
getSelectionSize
public int getSelectionSize()Returns the number of the rows currently selected on the table- Returns:
- The number of the rows currently selected
-
getCuttingSize
public int getCuttingSize()Returns the number of the rows currently cutted on the table- Returns:
- The number of the rows currently cutted
-
isSelected
public boolean isSelected(int row) Checks if a row is currently selected- Parameters:
row- The number of the row- Returns:
- true if the row is selected, false otherwise
-
isCutted
public boolean isCutted(int row) Checks if a row is currently cutted- Parameters:
row- The number of the row- Returns:
- true if the row is cutted, false otherwise
-
onCopy
Deprecated.UseonCopy(uim)- Parameters:
o- UseonCopy(uim)- Returns:
- Use
onCopy(uim)
-
onCopy
Copies a row of the table (seeXBoard)- Parameters:
uim-UIMessagecontaining the row to copy- Returns:
- false
-
doCopy
Copies a row of the table (seeXBoard)- Parameters:
row- The number of the row to copyuim- TheUIMessagethat contains values, parameters and control values- Returns:
- false
-
onCut
Deprecated.UseonCut(uim)- Parameters:
o- UseonCut(uim)- Returns:
- Use
onCut(uim)
-
onCut
Cuts a row of the table (seeXBoard)- Parameters:
uim-UIMessagecontaining the row to cut- Returns:
- false
-
doCut
Cuts a row of the table (seeXBoard)- Parameters:
row- The number of the row to cutuim- TheUIMessagethat contains values, parameters and control values- Returns:
- false
-
onPaste
Deprecated.UseonPaste(uim)- Parameters:
o- UseonPaste(uim)- Returns:
- Use
onPaste(uim)
-
onPaste
Pastes a row on the table (seeXBoard)- Parameters:
uim-UIMessagecontaining the row to paste- Returns:
- false
-
doPaste
Pastes a row on the table (seeXBoard)- Parameters:
row- The number of the row to pasteuim- TheUIMessagethat contains values, parameters and control values- Returns:
- false
-
canPaste
public boolean canPaste()Checks if the desired content can be pasted on the table (seesetXCLASS(x)andXBoard)- Returns:
- If it is possible to paste the desired content on this table
-
pasteContent
-
onRemove
Deprecated.UseonRemove(uim)- Parameters:
o- UseonRemove(uim)- Returns:
- Use
onRemove(uim)
-
onRemove
Removes a row of the table- Parameters:
uim-UIMessagecontaining the row to remove- Returns:
- false
-
doRemove
Removes a row of the table- Parameters:
row- The number of the row to removeuim- TheUIMessagethat contains values, parameters and control values- Returns:
- false
-
freeClip
public void freeClip(boolean delete) Used in drop phase and manage the deletion of the record of the dbv if the drag operation was a cutting one.
Implements theXClipinterface- Specified by:
freeClipin interfaceoverit.geocall.clipboard.XClip- Parameters:
delete- Boolean value that indicates if the deletion of the record must be performed
-
onToggle
Used in association with aColumnBoolean, called when the user click on a boolean value of the column to switch from true to false and the other way around- Parameters:
uim- TheUIMessagethat contains values, parameters and control values, used to retrieve the clicked row, column, and boolean value- Returns:
- false
-
onColumnMove
Changes the position of the columns of the table- Parameters:
uim-UIMessagewith the parameters- Returns:
- true
-
moveColumn
Moves a column before or after another column- Parameters:
from- starting columnto- destination columnafter- true to move the origin column after the destination one, false to move the origin column right before the destination one- Returns:
- true if something was moved, false otherwise
-
updateStateConf
-
findColumnGroup
Finds the column group of the one passed as parameter- Parameters:
col- Reference column from which to extract the group of (a group is a set of columns that share the label). It must not have a labelSpan.- Returns:
- List of columns that share the label
-
stuckColumnsEnabled
protected boolean stuckColumnsEnabled() -
userIsAllowedToEditTables
protected boolean userIsAllowedToEditTables() -
getUserComponentAttributesMap
-
invalidateComponentsAttributeMap
public void invalidateComponentsAttributeMap()Invalidates the map that contains all the user's component customization and force it to be reloaded. -
getColumns
Gets the children columns of the table.- Returns:
- The children columns of the table.
-
getOriginalColumns
Gets the original children columns of the table.
The Original columns are the children column without any user customization and movement (only with those applied by the profile).- Returns:
- The original children columns of the table.
-
getXmlColumns
Gets the original children columns of the table.
The Original columns are the children column without any user or profile customization and movement.- Returns:
- The original children columns of the table.
-
getUserLayoutCustomizations
Gets the user layout customizations like columns movements and hidden columns- Returns:
- The user layout customizations like columns movements and hidden columns
-
getProfileLayoutCustomizations
Gets the profile layout customizations like columns movements and hidden columns- Returns:
- The profile layout customizations like columns movements and hidden columns
-
onChangeRows
-
updateCurrentRowsForPage
protected void updateCurrentRowsForPage(int newRows)
buildScrollScript(StringBuilder)instead.