Class FIXGRIDBinding<itemClass extends FIXGRIDItem>
java.lang.Object
org.eclnt.jsfserver.elements.impl.FIXGRIDBinding<itemClass>
- All Implemented Interfaces:
Serializable
,IConfiguredByLayout
,IFIXGRIDBinding<itemClass>
,IDynamicContentBindingObject
- Direct Known Subclasses:
FIXGRIDListBinding
,FIXGRIDTreeBinding
public abstract class FIXGRIDBinding<itemClass extends FIXGRIDItem>
extends Object
implements IFIXGRIDBinding<itemClass>, IDynamicContentBindingObject, Serializable
Base class for FIXGRID bindings.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
Central class providing all the export functions of the grid.static class
class
class
class
class
Class that manages the search function within the grid.Nested classes/interfaces inherited from interface org.eclnt.jsfserver.elements.impl.IFIXGRIDBinding
IFIXGRIDBinding.FIXGRIDSortInfo
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic String
static String
static String
static String
static String
static String
static String
static final IFIXGRIDBinding.FIXGRIDSortInfo
static final String
protected String
protected IFIXGRIDItem
protected String
protected IFIXGRIDItem
protected boolean
protected String
protected int
protected int
protected String
protected IFIXGRIDItem
protected int
protected int
protected FIXGRIDBinding<itemClass>.SortInfoHashMap
protected FIXGRIDBinding<itemClass>
Fields inherited from interface org.eclnt.jsfserver.elements.impl.IFIXGRIDBinding
SORT_ASCENDING, SORT_DESCENDING, SORT_UNSORTED
-
Constructor Summary
ConstructorsConstructorDescriptionFIXGRIDBinding
(boolean changeIndexIsSupported) Constructor which allows to switch on performance optimized data management. -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
During initialization the grid may loads persisted data about the actual sequence of columns, the sizing of columns and (if used) the sorting of column data.boolean
Checks, if at least one row contains a highlighted cell.boolean
See explanation inFIXGRIDBinding(boolean)
for more details on change index management.boolean
In some grids the free re-arranging of columns is not possible.boolean
Checks if any explicit sorting activity is applied on the current grid.protected boolean
checkIfToCatchGridActionError
(javax.faces.event.ActionEvent event, Throwable t) Called withinonGridAction(ActionEvent)
: if the processing of the event throws an error / runtime exception then this method is called to check if the error is caught (with some logging) - or if the error is passed into the error processing usingIErrorAware
.protected boolean
void
The sort info contains the sort status of the grid columns - which then is used to render the corresponding sort markers on client side (little arrow- icons within the column header).void
connectWithBinding
(FIXGRIDBinding binding) protected Comparator
This method is called when Strings are compared and no explicit Comparator is defined by the application.protected FIXGRIDBinding<itemClass>.Exporter
Factory method for creating exporter.protected FIXGRIDBinding<itemClass>.ScrollHelper
Factory method for creating scroll helper.protected FIXGRIDBinding<itemClass>.TextSearcher
Factory method to create the TextSearcher instance.void
Removes all selections from the grid.void
deselectItem
(IFIXGRIDItem item) Deselect one specific grid item.void
deselectItem
(IFIXGRIDItem item, boolean withSelectionProcessingInApplication) void
deselectItemWCB
(IFIXGRIDItem item, boolean withSelectionProcessingInApplication, boolean callConnectedBinding) abstract void
Ensures that a a certain item is displayed on client side - which means the grid is scrolled to a corresponding position.
The internal calculation is not trivial because the number of grid items depends on the available screen space on client side - for grids with a flexible (percentage-based) height.void
With this method you pass aRunnable
that must be executed on an inintialized grid.protected void
Default implementation: no shift selection, but just normal selectionReturns back current sort status: there can be multiple columns that sorted, for each column that is sorted aIFIXGRIDBinding.FIXGRIDSortInfo
instance is added.protected int
Sorting can be done for multiple columns, each one holding sort ranking called "sort sequence".protected Comparator
findSortComparatorForColumnValue
(String sortReference) Used by the default sorting: when a comparator is returned then this one is used for comparing values.protected IFIXGRIDBinding.FIXGRIDSortInfo
findSortInfoForSortSequence
(int sortSequence) Finds the sort information for a given sort rank.boolean
int
The amount that is visible on client side.int
With every row selection a column index is passed - indicating in which column the selection happened on client side.List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo>
Column information of the current grid.A semicolon separated string which contains the sequence of columns - in relation to their original definition within the layout.Column texts - in original order of columns.boolean
Returns an object holding the current column sequence and column widths.int
Returns the current horizontal scroll position of the grid.List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo>
By default all the columns that are visible to the user are part of the export data.List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo>
getExportableColumns
(boolean includeConnectedBinding) Exporter instance is responsible for all export aspects (export to csv, xml, pdf, ...).org.eclnt.jsfserver.elements.impl.IFIXGRIDComponentAbstraction
final int
getItemColumnClientStringValue
(itemClass item, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo ci, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.READTYPE readType) getItemColumnFormattedValue
(itemClass item, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo ci, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.READTYPE readType) Returns all items of the current grid which are exported by theFIXGRIDBinding<itemClass extends FIXGRIDItem>.Exporter
.Returns all items of the current grid in the sequence of their visual appearance.The user is allowed to resize columns.String[]
Same asgetModcolumnwidths()
- but now returning the modified widths of columns as String-array.int
int
int
Same asgetOriginalcolumnwidthsAsArray()
- but now return the result as semicolon separated value string.String[]
Returns the widths of the columns as defined in the .jsp/component definition.org.eclnt.jsfserver.elements.impl.FIXGRIDComponentDetailUtil
Internal use only.int
This is the top index which is displayed on client side.int
The "sbvisibleamount" as defined in the layout.Utility class for explicit scroll operations, that can be e.g.Returns one selected item.Returns all selected items which are highlighted to the user.boolean
Returns sort information for columns.getSortInfoForReference
(String sortReference) Access to sort info for a sort reference.TextSearcher instance is responsible for text search within gird processing.Internal use only.protected String
getToBeAccessedNodeExpression
(String sortReference) Internal use only.protected String
getToBeAccessedNodeFormatmaskValue
(org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo ci, String nodeExpression, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.READTYPE readType) By default the formatmask value is derived from the control that is directly arranged within the GRIDCOL component.protected FIXGRIDBinding.FormattedValue
getToBeAccessedNodeFormattedValue
(org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo ci) protected FIXGRIDBinding.FormattedValue
getToBeAccessedNodeFormattedValue
(org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo ci, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.READTYPE readType) protected FIXGRIDBinding.FormattedValue
getToBeAccessedNodeFormattedValueForExport
(org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo ci) protected String
getToBeAccessedNodeFormatValue
(org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo ci, String nodeExpression, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.READTYPE readType) By default the format value is derived from the control that is directly arranged within the GRIDCOL component.protected String
getToBeAccessedNodeStringValue
(org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo ci, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.READTYPE readType, String nullValue, boolean asDisplayString) This method is used e.g. within the export processing.protected String
getToBeAccessedNodeTimezoneValue
(org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo ci, String nodeExpression, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.READTYPE readType) By default the time zone value is derived from the control that is directly arranged within the GRIDCOL component.protected String
getToBeAccessedNodeUnitValue
(org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo ci) protected Object
getToBeAccessedNodeValue
(String reference) This function retrieves the value for a given expression...List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo>
Returns back a list of all the columns that are currently visible to the user.List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo>
getVisibleColumns
(boolean includeConnectedBinding) boolean
static void
Initialization: content type that is used for CSV export.static void
Initialization: content type that is used for HTML export.static void
Initialization: content type that is used for PDF export.static void
Initialization: content type that is used for XLSX export.static void
Initialization: content type that is used for XML export.void
This method is called one time - after the grid is first time contacted by the server side FIXGRID component.static void
initPopupEditColumnDetailsUndecorated
(boolean value) Initialization: decision if column detail popup is opened in undecorated or decorated mode.static void
initPopupGridFunctionsUndecorated
(boolean value) Initialization: decision if grid functions popup is opened in undecorated or decorated mode.static void
initTextSearcherShowSearchInfoPopup
(boolean value) Initialization: decision if to show messages during the text search by opening an OK-popup.boolean
Indicates that the grid is just processing an action (e.g. scrolling, row selection, etc.).boolean
boolean
Returns true if at least one item is selectedprotected void
loadPersistentData
(String page, String persistId) Loads persistent data (sequence of columns, ...) and transfers this data into the grid.protected void
moveUpDown
(int diff, boolean withRowShiftSelect, int scrollDelta) void
notifyDownloadWasTriggered
(FIXGRIDENUMExportType exportType, boolean fullGrid) Called when the user requested a download through the default download popups.void
onClearCellHighlight
(javax.faces.event.ActionEvent event) Removing highlight from all grid items.protected void
This method is called whenever the column sequence is updated - either due to user or to internal operations.protected void
This method is called whenever the column sequence is updated - either due to user operation or due to internal processing.protected void
onDrop
(BaseActionEventDrop dropEvent) This method is called by the onGridAction method when a drop happens on grid level. - Override in order to add your own processing.void
onEditColumnDetails
(javax.faces.event.ActionEvent ae) Method that can be bound as action listener in order to open up a popup in which the user can maintain the sequence of columns.protected void
This method is called when the user presses cursor-up in within the first grid item.void
onGridAction
(javax.faces.event.ActionEvent event) This is the central method for processing all events for a grid that are coming from the user interface client.protected void
onGridActionExecute
(javax.faces.event.ActionEvent event) This method is the one that processes all default logic that is associated with a grid event.protected void
This method is called when the user presses cursor-down within the last grid item. - Override in order to add your own processing.void
onOpenGridExportFunctions
(javax.faces.event.ActionEvent ae) Default method that can be directly bound e.g. to some button.void
onOpenGridFunctions
(javax.faces.event.ActionEvent ae) Default method that can be directly bound e.g. to some button.protected void
onPopupMenuItem
(BaseActionEventPopupMenuItem popupMenuItemEvent) This method is called by the onGridAction mehtod when a popup menu item was executed on grid level. - Override in order to add your own processing.protected void
onPopupMenuLoad
(BaseActionEventPopupMenuLoad popupMenuLoadEvent) This method is called by the onGridAction mehtod when a popup menu item is loaded on grid level.protected void
This method is called every time when the grid selection was updated due to a client activity (e.g. selection of the user).void
This method is called when the grid has a selector title icon and when the user presses the icon. - Override in order to add your own processing.protected ModelessPopup
Method for opening the default popup for editing column details.protected ModelessPopup
Method for opening the default popup for grid export functions.protected ModelessPopup
Method for opening the default popup for showing grid functions.void
passComponentData
(String objectBinding, org.eclnt.jsfserver.elements.impl.IFIXGRIDComponentAbstraction fixgridComponent) Internal use.protected void
protected void
This is the "default" execution of sorting of the grid based on the information that is available ingetSortInfo()
.
The default implementation, that sorts by accessing the properties of the loaded grid items, is calling thesortGrid(String, String, boolean)
method for each property that is part of the sorting, starting with the property which is sorted with lowest level and ending with the one with the highest level.protected void
processMultipleSort
(String sortReference) Registers the sort event from the client side in the internally kept sort information (getSortInfo()
and then calls the sorting inprocessMultipleSort()
.protected void
processSearch
(String searchString, String sortReference) Search for a certain grid item within the grid.protected void
processSort
(String sortReference) Sort the grid.void
void
This method is called with each request processing - at the beginning of the processing.void
Clears the persistent data that is kept for the grid (columns sequence, column widhts) and brings the grid rendering back to its default.void
resort()
Resorts the grid according to the last sorting.void
void
scrollHorizontallyToPosition
(int value) void
selectAndFocusItem
(itemClass item) Selects an item, ensures that it is visible and requests the client side focus to be moved into the item.void
selectItem
(IFIXGRIDItem item) Allows to select an item in the same way as an item is selected from the user interface: i.e. event handlers are called.void
selectItem
(IFIXGRIDItem item, boolean withSelectionProcessingInApplication) Selects an item.void
setChangeIndexIsSupported
(boolean value) See explanation inFIXGRIDBinding(boolean)
for more details on change index management.void
setClientvisibleamount
(int value) Internal use.void
setColumnIndexOfLastSelection
(int value) Internal use only.void
setColumnIndexOfLastSelection
(int value, boolean shiftPressed, boolean ctrlPressed, boolean altPressed, int mouseButton) Internal use only.void
setColumnsequence
(String value) Sets the sequence of columns that you want to see within the client.void
setCurrentHorizontalScrollPosition
(int currentHorizontalScrollPosition) With every roundtrip the grid passes its current horizontal scroll position to the server side.void
setCurrentlyProcessingGridAction
(boolean currentlyProcessingGridAction) void
setDefaultColumnsequence
(String value) Sets a column sequence that is treated as the "default column" sequence.void
setIndextobevisibleOfItems
(int index) void
setModcolumnwidth
(int columnIndex, String width) Modifies the width of one column.void
setModcolumnwidths
(String value) Internal use only.void
setModcolumnwidthsArray
(String[] widths) When a grid is rendered then the columns widths by default are taken from the GRIDCOL-WIDTH definition.void
setModcolumnwidthsList
(List<String> widths) void
setNumberOfFixColumns
(int numberOfFixColumns) void
void
setSbvalue
(int value) Sets the top index of the grid.void
setSbvalue
(int value, boolean callConnectedBinding) void
setSbvalue
(String value) See {@link #setSbvalue(int). }void
setSbvisibleamount
(int value) Internal use only.protected void
void
setWithFixColumnsByUserConfiguration
(boolean withFixColumnsByUserConfiguration) void
void
Sorts the column - by using exactly the same sort procedure that is used when executing a sort that is triggered by the user interface.protected abstract void
Actual sorting of grid by one column.protected abstract void
In case the grid is supporting "triplesort": this is the method to sort the grid by its original indexvoid
Stores the current grid configuration to the persistece.protected void
storePersistentData
(String page, String persistId) Method which is called to store the column sequence / sort sequence.protected void
This method is called internally whenever a structural change to the grid is done (re-arrangement of columns, resiziing of columns, sorting).void
protected void
updateHighlight
(IFIXGRIDItem item, BaseActionEventGridRowSelect event) This method is invoked if the user updates the highlight selection on client side.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclnt.jsfserver.elements.impl.IFIXGRIDBinding
applyOriginalIndexToCurrentContent, getRows, getSbmaximum
-
Field Details
-
EXPORT_COLUMNHEADER_PLACEHOLDER
- See Also:
-
DUMMY_FIXGRIDSORTINFO
-
CONTENTTYPE_EXPORT_TAB
-
CONTENTTYPE_EXPORT_CSV
-
CONTENTTYPE_EXPORT_XML
-
CONTENTTYPE_EXPORT_HTML
-
CONTENTTYPE_EXPORT_PDF
-
CONTENTTYPE_EXPORT_XLSX
-
CONTENTTYPE_EXPORT_ODS
-
m_this
-
m_sbvisibleamount
protected int m_sbvisibleamount -
m_sbvalue
protected int m_sbvalue -
m_numberofheaderrows
protected int m_numberofheaderrows -
m_currentlyFocussedItem
-
m_previouslyFocussedItem
-
m_firstItemForShiftSelection
-
m_selectedItems
-
m_columnsequence
-
m_defaultColumnsequence
-
m_modcolumnwidths
-
m_sortInfo
-
m_objectBinding
-
m_initialized
protected boolean m_initialized
-
-
Constructor Details
-
FIXGRIDBinding
public FIXGRIDBinding() -
FIXGRIDBinding
public FIXGRIDBinding(boolean changeIndexIsSupported) Constructor which allows to switch on performance optimized data management. By default all the grid items are deeply analyzed with each request-roundtrip to check if any update did happen.
When passing "true" in the constructor, then each times is analyzed by checking if a so called change index was updated, accessingFIXGRIDItem.getChangeIndex()
. If the change index is the same, then the items is treated as unchanged item. - The change index must be explicitly updated by the application in case of data changes, calling the methodIChangeIndex.indicateChange()
.
-
-
Method Details
-
createDefaultStringComparator
This method is called when Strings are compared and no explicit Comparator is defined by the application. -
getWithFixColumnsByUserConfiguration
public boolean getWithFixColumnsByUserConfiguration() -
setWithFixColumnsByUserConfiguration
public void setWithFixColumnsByUserConfiguration(boolean withFixColumnsByUserConfiguration) - Specified by:
setWithFixColumnsByUserConfiguration
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
-
getNewClientHorizontalScrollPosition
public int getNewClientHorizontalScrollPosition()- Specified by:
getNewClientHorizontalScrollPosition
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
-
scrollHorizontallyToPosition
public void scrollHorizontallyToPosition(int value) -
scrollHorizontallyToLastClientPosition
public void scrollHorizontallyToLastClientPosition() -
isCurrentlyProcessingGridAction
public boolean isCurrentlyProcessingGridAction()Indicates that the grid is just processing an action (e.g. scrolling, row selection, etc.). This is especially interesting in case of connected grids, in which you can find out, which grid is the one that is currently processed. -
setCurrentlyProcessingGridAction
public void setCurrentlyProcessingGridAction(boolean currentlyProcessingGridAction) -
initPopupEditColumnDetailsUndecorated
public static void initPopupEditColumnDetailsUndecorated(boolean value) Initialization: decision if column detail popup is opened in undecorated or decorated mode. -
initPopupGridFunctionsUndecorated
public static void initPopupGridFunctionsUndecorated(boolean value) Initialization: decision if grid functions popup is opened in undecorated or decorated mode. -
initTextSearcherShowSearchInfoPopup
public static void initTextSearcherShowSearchInfoPopup(boolean value) Initialization: decision if to show messages during the text search by opening an OK-popup. Default is "false". -
init_CONTENTTYPE_EXPORT_CSV
Initialization: content type that is used for CSV export. -
init_CONTENTTYPE_EXPORT_XML
Initialization: content type that is used for XML export. -
init_CONTENTTYPE_EXPORT_PDF
Initialization: content type that is used for PDF export. -
init_CONTENTTYPE_EXPORT_HTML
Initialization: content type that is used for HTML export. -
init_CONTENTTYPE_EXPORT_XLSX
Initialization: content type that is used for XLSX export. -
avoidLoadingOfPersistentGridData
public void avoidLoadingOfPersistentGridData()During initialization the grid may loads persisted data about the actual sequence of columns, the sizing of columns and (if used) the sorting of column data. By calling this function with a newly created instance you avoid the loading of persisted data. You may call this function if you apply own mechanisms to pre-configure e.g. the colulmn sequence and you do not want the default functions to be executed in parallel. -
executeOnInitializedGrid
With this method you pass aRunnable
that must be executed on an inintialized grid. If the grid is already initialized then the instance is executed immediately. If the grid is not yet initialized then the instance if parked within the grid, and executed at the point of time when the grid is initialized. -
isInitialized
public boolean isInitialized() -
setIndextobevisibleOfItems
public void setIndextobevisibleOfItems(int index) - Specified by:
setIndextobevisibleOfItems
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
-
getIndextobevisibleOfItems
public final int getIndextobevisibleOfItems()- Specified by:
getIndextobevisibleOfItems
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
-
setObjecttobevisibleOfItems
- Specified by:
setObjecttobevisibleOfItems
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
-
getObjecttobevisibleOfItems
- Specified by:
getObjecttobevisibleOfItems
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
-
getConnectedBinding
- Specified by:
getConnectedBinding
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
-
connectWithBinding
-
getNumberOfFixColumns
public int getNumberOfFixColumns()- Specified by:
getNumberOfFixColumns
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
-
setNumberOfFixColumns
public void setNumberOfFixColumns(int numberOfFixColumns) -
getAltPressedOfLastSelection
public boolean getAltPressedOfLastSelection() -
getCtrlPressedOfLastSelection
public boolean getCtrlPressedOfLastSelection() -
getShiftPressedOfLastSelection
public boolean getShiftPressedOfLastSelection() -
getMouseButtonOfLastSelection
public int getMouseButtonOfLastSelection() -
setCurrentHorizontalScrollPosition
public void setCurrentHorizontalScrollPosition(int currentHorizontalScrollPosition) With every roundtrip the grid passes its current horizontal scroll position to the server side. This is done through this method. - This method is used by CaptainCasa internally, do not call it from your code.- Specified by:
setCurrentHorizontalScrollPosition
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
-
getCurrentHorizontalScrollPosition
public int getCurrentHorizontalScrollPosition()Returns the current horizontal scroll position of the grid. The value is -1 by default. -
getColumnIndexOfLastSelection
public int getColumnIndexOfLastSelection()With every row selection a column index is passed - indicating in which column the selection happened on client side. This column index can be evaluated with this method. Please note the column index is only valid when processing a row selection. -
setColumnIndexOfLastSelection
public void setColumnIndexOfLastSelection(int value) Internal use only.- Specified by:
setColumnIndexOfLastSelection
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
-
setColumnIndexOfLastSelection
public void setColumnIndexOfLastSelection(int value, boolean shiftPressed, boolean ctrlPressed, boolean altPressed, int mouseButton) Internal use only.- Specified by:
setColumnIndexOfLastSelection
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
-
getRowDataUI
public org.eclnt.jsfserver.elements.impl.FIXGRIDComponentDetailUtil getRowDataUI()Internal use only. -
getToBeAccessedNode
Internal use only. -
setToBeAccessedNode
-
getToBeAccessedNodeExpression
Internal use only. -
getToBeAccessedNodeValue
This function retrieves the value for a given expression... -
getItemColumnFormattedValue
public FIXGRIDBinding.FormattedValue getItemColumnFormattedValue(itemClass item, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo ci, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.READTYPE readType) -
getItemColumnClientStringValue
-
getToBeAccessedNodeFormattedValueForExport
protected FIXGRIDBinding.FormattedValue getToBeAccessedNodeFormattedValueForExport(org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo ci) -
getToBeAccessedNodeFormattedValue
protected FIXGRIDBinding.FormattedValue getToBeAccessedNodeFormattedValue(org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo ci) -
getToBeAccessedNodeFormattedValue
protected FIXGRIDBinding.FormattedValue getToBeAccessedNodeFormattedValue(org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo ci, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.READTYPE readType) -
getToBeAccessedNodeStringValue
protected String getToBeAccessedNodeStringValue(org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo ci, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.READTYPE readType, String nullValue, boolean asDisplayString) This method is used e.g. within the export processing.- Parameters:
ci
- Column info of the column that is just investigated.nullValue
- Value that is returned if the cell value is null.asDisplayString
- true ==> nice formatting of string, false ==> no formatting but native format ==> usable for sorting etc.- Returns:
- String representation of value.
-
getToBeAccessedNodeUnitValue
protected String getToBeAccessedNodeUnitValue(org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo ci) -
getToBeAccessedNodeFormatValue
protected String getToBeAccessedNodeFormatValue(org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo ci, String nodeExpression, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.READTYPE readType) By default the format value is derived from the control that is directly arranged within the GRIDCOL component. In case of complex columns this may not be available - and you can control it by overwriting this method. - This method is used e.g. within the export processing. -
getToBeAccessedNodeFormatmaskValue
protected String getToBeAccessedNodeFormatmaskValue(org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo ci, String nodeExpression, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.READTYPE readType) By default the formatmask value is derived from the control that is directly arranged within the GRIDCOL component. In case of complex columns this may not be available - and you can control it by overwriting this method. - This method is used e.g. within the export processing. -
getToBeAccessedNodeTimezoneValue
protected String getToBeAccessedNodeTimezoneValue(org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo ci, String nodeExpression, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.READTYPE readType) By default the time zone value is derived from the control that is directly arranged within the GRIDCOL component. In case of complex columns this may not be available - and you can control it by overwriting this method. - This method is used e.g. within the export processing. -
getTextSearcher
TextSearcher instance is responsible for text search within gird processing. -
createTextSearcher
Factory method to create the TextSearcher instance. You may override this method in order to add an own implementation of TextSearcher. -
getExporter
Exporter instance is responsible for all export aspects (export to csv, xml, pdf, ...). -
createExporter
Factory method for creating exporter. You may override this method and pass back an own Exporter implementation. -
getScrollHelper
Utility class for explicit scroll operations, that can be e.g. bound to button/icon/menut item components. -
createScrollHelper
Factory method for creating scroll helper. You may overrided this method for own implementations of ScrollHelper instances. -
addConfiguredByLayoutListener
- Specified by:
addConfiguredByLayoutListener
in interfaceIConfiguredByLayout
-
removeConfiguredByLayoutListener
- Specified by:
removeConfiguredByLayoutListener
in interfaceIConfiguredByLayout
-
passComponentData
public void passComponentData(String objectBinding, org.eclnt.jsfserver.elements.impl.IFIXGRIDComponentAbstraction fixgridComponent) Internal use.- Specified by:
passComponentData
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
-
loadPersistentData
Loads persistent data (sequence of columns, ...) and transfers this data into the grid. Counterpart ofstorePersistentData(String, String)
. -
resetPersistentData
public void resetPersistentData()Clears the persistent data that is kept for the grid (columns sequence, column widhts) and brings the grid rendering back to its default. -
applyPersistentData
-
storePersistentDataImplicitly
protected void storePersistentDataImplicitly()This method is called internally whenever a structural change to the grid is done (re-arrangement of columns, resiziing of columns, sorting). By default the update grid data is immediately passed to the grid'sstorePersistentData(String, String)
method. You may override this method, in case you want the grid persistence not to work implicitly, but in case you want to call the methodstorePersistentData(String, String)
explicitly. -
storePersistentData
public void storePersistentData()Stores the current grid configuration to the persistece. This method is called implicitly during user operations (e.g. column resizing, column rearrangement, column sorting) and during calls ofsetModcolumnwidths(String)
,setColumnsequence(String)
andclearSortInfo()
. -
storePersistentData
Method which is called to store the column sequence / sort sequence. Counterpart toloadPersistentData(String, String)
. -
getCurrentColumWdithSequenceInfo
Returns an object holding the current column sequence and column widths. This object is the same as the one that is passed to the grid persistence processing (interfaceIFIXGRIDPersistence
and/orIFIXGRIDPersistence2
). -
initialize
public void initialize()This method is called one time - after the grid is first time contacted by the server side FIXGRID component. This happens in the rendering phase, when the grid is first time touches by the component processing. Grid properties (like the objectbinding) are avaiable at this point of time earliest - before the grid is just an object without reference to a component processin. -
getSelectedItems
Returns all selected items which are highlighted to the user. In case of using the grid without mutliple selection the size of the set is 1 by as maximum. -
getSelectedItem
Returns one selected item. If the grid is used with single selection mode then this item is always the one selected item. If the grid allows multiple selection then the item is one of the selected items. Returns null if no selection is available. -
setSbvisibleamount
public void setSbvisibleamount(int value) Internal use only.- Specified by:
setSbvisibleamount
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
-
getSbvisibleamount
public int getSbvisibleamount()The "sbvisibleamount" as defined in the layout. Pay attention: if explicitly sizing the height of a grid this may be different than the visible amount of items on client side. Use:getClientvisibleamount()
in order to check the number of row items that are visible on clientside.- Specified by:
getSbvisibleamount
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
-
setSbvalue
public void setSbvalue(int value) Sets the top index of the grid. Using this method you can scroll the grid to any top position. Please make sure that the value passed is a correct index into your grid. -
setSbvalue
public void setSbvalue(int value, boolean callConnectedBinding) -
setSbvalue
See {@link #setSbvalue(int). }- Specified by:
setSbvalue
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
-
getSbvalue
public int getSbvalue()This is the top index which is displayed on client side. The top index is initialized with 0, and then follows the user's scrolling in the grid.- Specified by:
getSbvalue
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
-
setClientvisibleamount
public void setClientvisibleamount(int value) Internal use.- Specified by:
setClientvisibleamount
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
-
getClientvisibleamount
public int getClientvisibleamount()The amount that is visible on client side. This method contains the number of items that are rendered on client side - after the first request is received. The client may hold as maximum the value of @linkgetSbvisibleamount()
but due to size restrictions or to not being fully filled with items also may contain less items.
When being called before the first request is received, then the value is the same as @linkgetSbvisibleamount()
.- Specified by:
getClientvisibleamount
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
-
setColumnsequence
Sets the sequence of columns that you want to see within the client. The value is a semicolon separated list of indices, each one representing an original columns of your grid definition.
Example: imagine your grid has 10 columns. By passing the value "5;3;0" only three columns will be visible to the user: column 5, column 3 and column 0.- Specified by:
setColumnsequence
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
-
onColumnSequenceUpdated
protected void onColumnSequenceUpdated()This method is called whenever the column sequence is updated - either due to user or to internal operations. -
setDefaultColumnsequence
Sets a column sequence that is treated as the "default column" sequence. When editing the column sequence via popup then there is a button which says "Back to default". In this case the defaultColumnsequence is used as column sequence to switch back to. By default the defaultColumnsequence is set to null, so that the original column sequence of the layout is used as default. -
getColumnsequence
A semicolon separated string which contains the sequence of columns - in relation to their original definition within the layout. E.g. if the grid has three columns, and all columns are arranged by the user so that the grid's column sequence is reversed, then the value of the string is "2;1;0". The value is only available after the user having changed the columns sequence, otherwise the value is null.- Specified by:
getColumnsequence
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
-
getDefaultColumnsequence
-
setModcolumnwidths
Internal use only. This method is called when the user changes the column sequence on client side. If you want to update the column widths by your program then use#setModcolumnwidths(String[])
.- Specified by:
setModcolumnwidths
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
-
onColumnWidthsUpdated
protected void onColumnWidthsUpdated()This method is called whenever the column sequence is updated - either due to user operation or due to internal processing. -
getModcolumnwidths
The user is allowed to resize columns. When the user does so then the actual sizes of the columns are passed to the server as semicolon separated list. The order of widths corresponds to the definition of columns as defined in the layout definition. - So the order is stable - and is not updated if the user changes the sequence of columns.- Specified by:
getModcolumnwidths
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
-
getModcolumnwidthsAsArray
Same asgetModcolumnwidths()
- but now returning the modified widths of columns as String-array. If the user did not modify the columns widths then null is returned. -
getOriginalcolumnwidthsAsArray
Returns the widths of the columns as defined in the .jsp/component definition. Please note: via methodgetColumnInfos()
you get more details about the grid's columns structure. -
getOriginalcolumnwidths
Same asgetOriginalcolumnwidthsAsArray()
- but now return the result as semicolon separated value string. -
setModcolumnwidthsArray
When a grid is rendered then the columns widths by default are taken from the GRIDCOL-WIDTH definition. But you may override by calling this method. For each columns of the grid (GRIDCOL Component) a width is passed - either as percentage value or as direct (pixel) value. The sequence of columns is the one of the GRIDCOL definition within the grid. -
setModcolumnwidth
Modifies the width of one column. The index of the column refers to the sequence of columns as defined in the .jsp-page/component hierarchy. -
setModcolumnwidthsList
SeesetModcolumnwidthsArray(String[])
. Now the widths are passed as List of String instances. -
onGridAction
public void onGridAction(javax.faces.event.ActionEvent event) This is the central method for processing all events for a grid that are coming from the user interface client. It handles all events that are directly related to grid processing. You may override this method (and call super.onGridAction()!) in your subclass.
This method in its FIXGRIDBinding implementation puts a try/catch around all errors happening inside. In the try/catch the methodonGridActionExecute(ActionEvent)
is called. In cases you do not want to catch all errors, you may override onGridAction and directly callonGridActionExecute(ActionEvent)
. As result, all errors in this scenario are passed to the normal (optional) error management that is calling the onApplicationError(...) method. -
checkIfToCatchGridActionError
Called withinonGridAction(ActionEvent)
: if the processing of the event throws an error / runtime exception then this method is called to check if the error is caught (with some logging) - or if the error is passed into the error processing usingIErrorAware
. -
onGridActionExecute
protected void onGridActionExecute(javax.faces.event.ActionEvent event) This method is the one that processes all default logic that is associated with a grid event. It is callend byonGridAction(ActionEvent)
- any error/exception which is thrown in onGridActionExecute is caught and logged byonGridAction(ActionEvent)
. -
processMenuItemExecutedOnOutdatedItem
-
onSelectorTitleIconInvoked
This method is called when the grid has a selector title icon and when the user presses the icon. - Override in order to add your own processing. -
onLastLineDown
This method is called when the user presses cursor-down within the last grid item. - Override in order to add your own processing. -
onFirstLineUp
This method is called when the user presses cursor-up in within the first grid item. -
onDrop
This method is called by the onGridAction method when a drop happens on grid level. - Override in order to add your own processing. -
onPopupMenuItem
This method is called by the onGridAction mehtod when a popup menu item was executed on grid level. - Override in order to add your own processing. -
onSelectionUpdateByClientActivity
protected void onSelectionUpdateByClientActivity()This method is called every time when the grid selection was updated due to a client activity (e.g. selection of the user). Background: in case of multiple selections you receive a couple of row-selections within the grid item - sometimes you want to know when the row selections are really finished and then want to update certain information: This is the right method to override. -
onPopupMenuLoad
This method is called by the onGridAction mehtod when a popup menu item is loaded on grid level. -
updateHighlight
This method is invoked if the user updates the highlight selection on client side. -
getListOfItems
Returns all items of the current grid in the sequence of their visual appearance. This is the central method that is accessed by generic grid functions, e.g. export functions.
You may override this function when you load your grid data step by step - the caller of this function expects all items to be available. -
getListOfExportItems
Returns all items of the current grid which are exported by theFIXGRIDBinding<itemClass extends FIXGRIDItem>.Exporter
. By default the content items of the grid are returned by internally delegating togetListOfItems()
. But you may override if the exported items should be different to the ones that are contained within the grid.
Example: in the grid you may only show a limited number of items due to server side performance reason. When creating the export then you want to show all items - without any limit. -
deselectCurrentSelection
public void deselectCurrentSelection()Removes all selections from the grid. -
selectItem
Allows to select an item in the same way as an item is selected from the user interface: i.e. event handlers are called. This method does NOT deselect any items. If you only want to have one item selected within a grid then call deselectCurrentSelection() before. -
selectAndFocusItem
Selects an item, ensures that it is visible and requests the client side focus to be moved into the item. The focus is moved into the first edit-able and focus-able component of the row. The individual ordering of columns is taken into considetation when setting the focus. -
selectItem
Selects an item.- Parameters:
withSelectionProcessingInApplication
- If set to true then the normal selection processing is executed - just as if the item was selected by the user within the user interface client. This is the same as calling the selectItem(item) method without the extra boolean parameter.
If set to false then the normal selection processing is not executed - the method "onRowSelect" on item level will not be called consequently.
-
deselectItem
Deselect one specific grid item. Use method deselectCurrentSelection() for deselecing all selected items. -
deselectItem
- Parameters:
withSelectionProcessingInApplication
- If set to false then no method "onRowDeselect" will NOT be called on de-selection.
-
deselectItemWCB
public void deselectItemWCB(IFIXGRIDItem item, boolean withSelectionProcessingInApplication, boolean callConnectedBinding) -
checkIfChangeIndexIsSupported
public boolean checkIfChangeIndexIsSupported()See explanation inFIXGRIDBinding(boolean)
for more details on change index management.- Specified by:
checkIfChangeIndexIsSupported
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
-
setChangeIndexIsSupported
public void setChangeIndexIsSupported(boolean value) See explanation inFIXGRIDBinding(boolean)
for more details on change index management. -
checkIfSorted
public boolean checkIfSorted()Checks if any explicit sorting activity is applied on the current grid. -
getSortInfo
Returns sort information for columns. The key of the map is the sort reference of the column.- Specified by:
getSortInfo
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
-
clearSortInfo
public void clearSortInfo()The sort info contains the sort status of the grid columns - which then is used to render the corresponding sort markers on client side (little arrow- icons within the column header). By clearing the sort info, no marker will be visible at client side. -
getSortInfoForReference
Access to sort info for a sort reference. If the sort reference does not exist yet, then a new one is created. The sort info is the one that tells per sort reference if the corresponding column is sorted.- Specified by:
getSortInfoForReference
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
- Parameters:
sortReference
- Value of the sort reference without any expression prefix / postfix.
-
sort
Sorts the column - by using exactly the same sort procedure that is used when executing a sort that is triggered by the user interface. As consequence the items will get sorted and the column header will show a corresponding icon. -
sort
-
resort
public void resort()Resorts the grid according to the last sorting. This is the actual execution of the sorting based on the info ingetSortInfo()
. -
renderingBegins
public void renderingBegins()This method is called with each request processing - at the beginning of the processing.- Specified by:
renderingBegins
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
-
onEditColumnDetails
public void onEditColumnDetails(javax.faces.event.ActionEvent ae) Method that can be bound as action listener in order to open up a popup in which the user can maintain the sequence of columns. -
openEditColumnDetailsPopup
Method for opening the default popup for editing column details. You may override in order to update popup parameters (e.g. decorated/...). -
onOpenGridFunctions
public void onOpenGridFunctions(javax.faces.event.ActionEvent ae) Default method that can be directly bound e.g. to some button. A dialog is openend with typical grid functions to search for grid content and to export the grid into various output formats. -
onOpenGridExportFunctions
public void onOpenGridExportFunctions(javax.faces.event.ActionEvent ae) Default method that can be directly bound e.g. to some button. A dialog is openend with functions to export the grid into various output formats. -
openGridExportFunctionsPopup
Method for opening the default popup for grid export functions. You may override in order to update popup parameters (e.g. decorated/...). -
openGridFunctionsPopup
Method for opening the default popup for showing grid functions. You may override in order to update popup parameters (e.g. decorated/...). -
getColumnTexts
Column texts - in original order of columns.
This method may only be called after the grid was built up the first time (i.e. after passing the first render phase on server side). It must not be called with a newly created grid! -
getColumnInfos
Column information of the current grid. All columns are returned in the order they are defined within the grid.
This method may only be called after the grid was built up the first time (i.e. after passing the first render phase on server side). It must not be called with a newly created grid, which was not processed by some encode phase yet! -
ensureItemToBeDisplayed
Ensures that a a certain item is displayed on client side - which means the grid is scrolled to a corresponding position.
The internal calculation is not trivial because the number of grid items depends on the available screen space on client side - for grids with a flexible (percentage-based) height. -
isItemSelected
public boolean isItemSelected()Returns true if at least one item is selected -
getVisibleColumns
Returns back a list of all the columns that are currently visible to the user. The sequence of columns is exactly the sequence that is seen by the user (not the one defined in the layout).
Please pay attention: there is a methodgetColumnInfos()
which returns all of the columns in the sequence of the grid definition! In the grid the user may re-arrange the column sequence and/or hide columns (e.g. by using methodsetColumnsequence(String)
. So this method "getVisibleColumns" is representing the current arrangement of the columns for the current user.- Specified by:
getVisibleColumns
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
-
getVisibleColumns
public List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> getVisibleColumns(boolean includeConnectedBinding) - Specified by:
getVisibleColumns
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
-
getExportableColumns
By default all the columns that are visible to the user are part of the export data. But: there is a flag AVOIDEXPORT on GRIDCOL level, by which you may exclude a column from being exported.- Specified by:
getExportableColumns
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
-
getExportableColumns
public List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> getExportableColumns(boolean includeConnectedBinding) - Specified by:
getExportableColumns
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
-
notifyDownloadWasTriggered
Called when the user requested a download through the default download popups. This method can be overridden in order to register the download activity within your appliaction. -
fillShiftSelection
protected void fillShiftSelection()Default implementation: no shift selection, but just normal selection -
moveUpDown
protected void moveUpDown(int diff, boolean withRowShiftSelect, int scrollDelta) -
findHighestSortSequence
protected int findHighestSortSequence()Sorting can be done for multiple columns, each one holding sort ranking called "sort sequence". This method scans the sorted columns for the highest sequence. CheckIFIXGRIDBinding.FIXGRIDSortInfo.getSortSequence()
for more details on the sort sequence. -
findCurrentSortInfo
Returns back current sort status: there can be multiple columns that sorted, for each column that is sorted aIFIXGRIDBinding.FIXGRIDSortInfo
instance is added. The sequence in the list represents the priority of sorting: first item highest, then next one, etc. -
findSortInfoForSortSequence
Finds the sort information for a given sort rank. Example: a user sorts a grid by 3 columns. You can e.g. access the column with the lowest rank by calling this method with parameter 2. -
processSort
Sort the grid. This is the method that is invoked when the user presses on the title column of a sort-able grid column.- Parameters:
sortReference
- The implicitly or explicitly defined value of the SORTREFERENCE attribute of the corresponding GRIDCOL component. The value is to be passed without expression-prefix and -postfix. This means: the SORTREFERENCE value ".{lastName}" is passed as "lastName".
-
processMultipleSort
Registers the sort event from the client side in the internally kept sort information (getSortInfo()
and then calls the sorting inprocessMultipleSort()
. The client sends the sort reference of the clicked column "only" - so there is no sending of multiple sort references, because the client updates the existing sort status od the grid data. -
processMultipleSort
protected void processMultipleSort()This is the "default" execution of sorting of the grid based on the information that is available ingetSortInfo()
.
The default implementation, that sorts by accessing the properties of the loaded grid items, is calling thesortGrid(String, String, boolean)
method for each property that is part of the sorting, starting with the property which is sorted with lowest level and ending with the one with the highest level.
Useful methods that are available:findHighestSortSequence()
,findSortInfoForSortSequence(int)
,getSortInfoForReference(String)
. -
checkIfFreeColumnSequenceUpdateIsSupported
public boolean checkIfFreeColumnSequenceUpdateIsSupported()In some grids the free re-arranging of columns is not possible. This function is used e.g. by the column details popup (GridDetails). -
processSearch
Search for a certain grid item within the grid. This method is called when the user performs a search inside the grid. -
sortGrid
protected abstract void sortGrid(String sortReference, String objectBindingString, boolean ascending) Actual sorting of grid by one column. This method needs to be overridden by grid implementations. -
sortGridByOriginalIndex
protected abstract void sortGridByOriginalIndex()In case the grid is supporting "triplesort": this is the method to sort the grid by its original index -
findSortComparatorForColumnValue
Used by the default sorting: when a comparator is returned then this one is used for comparing values. If null is returned then the default comparator is used. - You need to override in order to apply special comparators for certain columns. -
onClearCellHighlight
public void onClearCellHighlight(javax.faces.event.ActionEvent event) Removing highlight from all grid items. -
checkIfCellsAreHighlighted
public boolean checkIfCellsAreHighlighted()Checks, if at least one row contains a highlighted cell. -
unhighlightAllCells
public void unhighlightAllCells() -
getFixgridComponent
public org.eclnt.jsfserver.elements.impl.IFIXGRIDComponentAbstraction getFixgridComponent()- Specified by:
getFixgridComponent
in interfaceIFIXGRIDBinding<itemClass extends FIXGRIDItem>
- Returns:
- the component that is associated with the binding. Pay attention: the assocation is created in the first render phase in which the corresponding FIXGRID-component accesses the binding. Without having passed this phase the result will be null!
-
checkSpecialTouchMultiSelection
protected boolean checkSpecialTouchMultiSelection()
-