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:
  • Field Details

    • EXPORT_COLUMNHEADER_PLACEHOLDER

      public static final String EXPORT_COLUMNHEADER_PLACEHOLDER
      See Also:
    • DUMMY_FIXGRIDSORTINFO

      public static final IFIXGRIDBinding.FIXGRIDSortInfo DUMMY_FIXGRIDSORTINFO
    • CONTENTTYPE_EXPORT_TAB

      public static String CONTENTTYPE_EXPORT_TAB
    • CONTENTTYPE_EXPORT_CSV

      public static String CONTENTTYPE_EXPORT_CSV
    • CONTENTTYPE_EXPORT_XML

      public static String CONTENTTYPE_EXPORT_XML
    • CONTENTTYPE_EXPORT_HTML

      public static String CONTENTTYPE_EXPORT_HTML
    • CONTENTTYPE_EXPORT_PDF

      public static String CONTENTTYPE_EXPORT_PDF
    • CONTENTTYPE_EXPORT_XLSX

      public static String CONTENTTYPE_EXPORT_XLSX
    • CONTENTTYPE_EXPORT_ODS

      public static String CONTENTTYPE_EXPORT_ODS
    • m_this

      protected FIXGRIDBinding<itemClass extends FIXGRIDItem> m_this
    • m_sbvisibleamount

      protected int m_sbvisibleamount
    • m_sbvalue

      protected int m_sbvalue
    • m_numberofheaderrows

      protected int m_numberofheaderrows
    • m_numberoffooterrows

      protected int m_numberoffooterrows
    • m_currentlyFocussedItem

      protected IFIXGRIDItem m_currentlyFocussedItem
    • m_previouslyFocussedItem

      protected IFIXGRIDItem m_previouslyFocussedItem
    • m_firstItemForShiftSelection

      protected IFIXGRIDItem m_firstItemForShiftSelection
    • m_selectedItems

      protected Set<itemClass extends FIXGRIDItem> m_selectedItems
    • m_columnsequence

      protected String m_columnsequence
    • m_defaultColumnsequence

      protected String m_defaultColumnsequence
    • m_modcolumnwidths

      protected String m_modcolumnwidths
    • m_sortInfo

      protected FIXGRIDBinding<itemClass extends FIXGRIDItem>.SortInfoHashMap m_sortInfo
    • m_objectBinding

      protected String 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, accessing FIXGRIDItem.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 method IChangeIndex.indicateChange().
  • Method Details

    • createDefaultStringComparator

      protected Comparator 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 interface IFIXGRIDBinding<itemClass extends FIXGRIDItem>
    • getNewClientHorizontalScrollPosition

      public int getNewClientHorizontalScrollPosition()
      Specified by:
      getNewClientHorizontalScrollPosition in interface IFIXGRIDBinding<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

      public static void init_CONTENTTYPE_EXPORT_CSV(String value)
      Initialization: content type that is used for CSV export.
    • init_CONTENTTYPE_EXPORT_XML

      public static void init_CONTENTTYPE_EXPORT_XML(String value)
      Initialization: content type that is used for XML export.
    • init_CONTENTTYPE_EXPORT_PDF

      public static void init_CONTENTTYPE_EXPORT_PDF(String value)
      Initialization: content type that is used for PDF export.
    • init_CONTENTTYPE_EXPORT_HTML

      public static void init_CONTENTTYPE_EXPORT_HTML(String value)
      Initialization: content type that is used for HTML export.
    • init_CONTENTTYPE_EXPORT_XLSX

      public static void init_CONTENTTYPE_EXPORT_XLSX(String value)
      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

      public void executeOnInitializedGrid(Runnable r)
      With this method you pass a Runnable 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 interface IFIXGRIDBinding<itemClass extends FIXGRIDItem>
    • getIndextobevisibleOfItems

      public final int getIndextobevisibleOfItems()
      Specified by:
      getIndextobevisibleOfItems in interface IFIXGRIDBinding<itemClass extends FIXGRIDItem>
    • setObjecttobevisibleOfItems

      public void setObjecttobevisibleOfItems(itemClass item)
      Specified by:
      setObjecttobevisibleOfItems in interface IFIXGRIDBinding<itemClass extends FIXGRIDItem>
    • getObjecttobevisibleOfItems

      public itemClass getObjecttobevisibleOfItems()
      Specified by:
      getObjecttobevisibleOfItems in interface IFIXGRIDBinding<itemClass extends FIXGRIDItem>
    • getConnectedBinding

      public FIXGRIDBinding getConnectedBinding()
      Specified by:
      getConnectedBinding in interface IFIXGRIDBinding<itemClass extends FIXGRIDItem>
    • connectWithBinding

      public void connectWithBinding(FIXGRIDBinding binding)
    • getNumberOfFixColumns

      public int getNumberOfFixColumns()
      Specified by:
      getNumberOfFixColumns in interface IFIXGRIDBinding<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 interface IFIXGRIDBinding<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 interface IFIXGRIDBinding<itemClass extends FIXGRIDItem>
    • setColumnIndexOfLastSelection

      public void setColumnIndexOfLastSelection(int value, boolean shiftPressed, boolean ctrlPressed, boolean altPressed, int mouseButton)
      Internal use only.
      Specified by:
      setColumnIndexOfLastSelection in interface IFIXGRIDBinding<itemClass extends FIXGRIDItem>
    • getRowDataUI

      public org.eclnt.jsfserver.elements.impl.FIXGRIDComponentDetailUtil getRowDataUI()
      Internal use only.
    • getToBeAccessedNode

      public FIXGRIDItem getToBeAccessedNode()
      Internal use only.
    • setToBeAccessedNode

      protected void setToBeAccessedNode(FIXGRIDItem node)
    • getToBeAccessedNodeExpression

      protected String getToBeAccessedNodeExpression(String sortReference)
      Internal use only.
    • getToBeAccessedNodeValue

      protected Object getToBeAccessedNodeValue(String reference)
      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

      public String getItemColumnClientStringValue(itemClass item, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo ci, org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.READTYPE readType)
    • 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

      public FIXGRIDBinding<itemClass>.TextSearcher getTextSearcher()
      TextSearcher instance is responsible for text search within gird processing.
    • createTextSearcher

      protected FIXGRIDBinding<itemClass>.TextSearcher createTextSearcher()
      Factory method to create the TextSearcher instance. You may override this method in order to add an own implementation of TextSearcher.
    • getExporter

      public FIXGRIDBinding<itemClass>.Exporter getExporter()
      Exporter instance is responsible for all export aspects (export to csv, xml, pdf, ...).
    • createExporter

      protected FIXGRIDBinding<itemClass>.Exporter createExporter()
      Factory method for creating exporter. You may override this method and pass back an own Exporter implementation.
    • getScrollHelper

      public FIXGRIDBinding<itemClass>.ScrollHelper getScrollHelper()
      Utility class for explicit scroll operations, that can be e.g. bound to button/icon/menut item components.
    • createScrollHelper

      protected FIXGRIDBinding<itemClass>.ScrollHelper createScrollHelper()
      Factory method for creating scroll helper. You may overrided this method for own implementations of ScrollHelper instances.
    • addConfiguredByLayoutListener

      public void addConfiguredByLayoutListener(IConfiguredByLayoutListener listener)
      Specified by:
      addConfiguredByLayoutListener in interface IConfiguredByLayout
    • removeConfiguredByLayoutListener

      public void removeConfiguredByLayoutListener(IConfiguredByLayoutListener listener)
      Specified by:
      removeConfiguredByLayoutListener in interface IConfiguredByLayout
    • passComponentData

      public void passComponentData(String objectBinding, org.eclnt.jsfserver.elements.impl.IFIXGRIDComponentAbstraction fixgridComponent)
      Internal use.
      Specified by:
      passComponentData in interface IFIXGRIDBinding<itemClass extends FIXGRIDItem>
    • loadPersistentData

      protected void loadPersistentData(String page, String persistId)
      Loads persistent data (sequence of columns, ...) and transfers this data into the grid. Counterpart of storePersistentData(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

      public void applyPersistentData(IFIXGRIDPersistence.PersistentInfo pi)
    • 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's storePersistentData(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 method storePersistentData(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 of setModcolumnwidths(String), setColumnsequence(String) and clearSortInfo().
    • storePersistentData

      protected void storePersistentData(String page, String persistId)
      Method which is called to store the column sequence / sort sequence. Counterpart to loadPersistentData(String, String).
    • getCurrentColumWdithSequenceInfo

      public IFIXGRIDPersistence.PersistentInfo 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 (interface IFIXGRIDPersistence and/or IFIXGRIDPersistence2).
    • 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

      public Set<itemClass> 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

      public itemClass 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 interface IFIXGRIDBinding<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 interface IFIXGRIDBinding<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

      public void setSbvalue(String value)
      See {@link #setSbvalue(int). }
      Specified by:
      setSbvalue in interface IFIXGRIDBinding<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 interface IFIXGRIDBinding<itemClass extends FIXGRIDItem>
    • setClientvisibleamount

      public void setClientvisibleamount(int value)
      Internal use.
      Specified by:
      setClientvisibleamount in interface IFIXGRIDBinding<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 @link getSbvisibleamount() 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 @link getSbvisibleamount().
      Specified by:
      getClientvisibleamount in interface IFIXGRIDBinding<itemClass extends FIXGRIDItem>
    • setColumnsequence

      public void setColumnsequence(String value)
      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 interface IFIXGRIDBinding<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

      public void setDefaultColumnsequence(String value)
      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

      public String 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 interface IFIXGRIDBinding<itemClass extends FIXGRIDItem>
    • getDefaultColumnsequence

      public String getDefaultColumnsequence()
    • setModcolumnwidths

      public void setModcolumnwidths(String value)
      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 interface IFIXGRIDBinding<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

      public String 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 interface IFIXGRIDBinding<itemClass extends FIXGRIDItem>
    • getModcolumnwidthsAsArray

      public String[] getModcolumnwidthsAsArray()
      Same as getModcolumnwidths() - 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

      public String[] getOriginalcolumnwidthsAsArray()
      Returns the widths of the columns as defined in the .jsp/component definition. Please note: via method getColumnInfos() you get more details about the grid's columns structure.
    • getOriginalcolumnwidths

      public String getOriginalcolumnwidths()
      Same as getOriginalcolumnwidthsAsArray() - but now return the result as semicolon separated value string.
    • setModcolumnwidthsArray

      public void setModcolumnwidthsArray(String[] widths)
      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

      public void setModcolumnwidth(int columnIndex, String width)
      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

      public void setModcolumnwidthsList(List<String> widths)
      See setModcolumnwidthsArray(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 method onGridActionExecute(ActionEvent) is called. In cases you do not want to catch all errors, you may override onGridAction and directly call onGridActionExecute(ActionEvent). As result, all errors in this scenario are passed to the normal (optional) error management that is calling the onApplicationError(...) method.
    • checkIfToCatchGridActionError

      protected boolean checkIfToCatchGridActionError(javax.faces.event.ActionEvent event, Throwable t)
      Called within onGridAction(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 using IErrorAware.
    • 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 by onGridAction(ActionEvent) - any error/exception which is thrown in onGridActionExecute is caught and logged by onGridAction(ActionEvent).
    • processMenuItemExecutedOnOutdatedItem

      protected void processMenuItemExecutedOnOutdatedItem(BaseActionEventPopupMenuItem e)
    • onSelectorTitleIconInvoked

      public void onSelectorTitleIconInvoked(BaseActionEventGridSelectorTitleIcon event)
      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

      protected void onLastLineDown(BaseActionEventGridLastLineDown event)
      This method is called when the user presses cursor-down within the last grid item. - Override in order to add your own processing.
    • onFirstLineUp

      protected void onFirstLineUp(BaseActionEventGridFirstLineUp event)
      This method is called when the user presses cursor-up in within the first grid item.
    • onDrop

      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.
    • onPopupMenuItem

      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.
    • 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

      protected void onPopupMenuLoad(BaseActionEventPopupMenuLoad popupMenuLoadEvent)
      This method is called by the onGridAction mehtod when a popup menu item is loaded on grid level.
    • updateHighlight

      protected void updateHighlight(IFIXGRIDItem item, BaseActionEventGridRowSelect event)
      This method is invoked if the user updates the highlight selection on client side.
    • getListOfItems

      protected abstract List<itemClass> 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

      protected List<itemClass> getListOfExportItems()
      Returns all items of the current grid which are exported by the FIXGRIDBinding<itemClass extends FIXGRIDItem>.Exporter. By default the content items of the grid are returned by internally delegating to getListOfItems(). 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

      public 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. This method does NOT deselect any items. If you only want to have one item selected within a grid then call deselectCurrentSelection() before.
    • selectAndFocusItem

      public void selectAndFocusItem(itemClass item)
      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

      public void selectItem(IFIXGRIDItem item, boolean withSelectionProcessingInApplication)
      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

      public void deselectItem(IFIXGRIDItem item)
      Deselect one specific grid item. Use method deselectCurrentSelection() for deselecing all selected items.
    • deselectItem

      public void deselectItem(IFIXGRIDItem item, boolean withSelectionProcessingInApplication)
      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 in FIXGRIDBinding(boolean) for more details on change index management.
      Specified by:
      checkIfChangeIndexIsSupported in interface IFIXGRIDBinding<itemClass extends FIXGRIDItem>
    • setChangeIndexIsSupported

      public void setChangeIndexIsSupported(boolean value)
      See explanation in FIXGRIDBinding(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 interface IFIXGRIDBinding<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

      public final IFIXGRIDBinding.FIXGRIDSortInfo getSortInfoForReference(String sortReference)
      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 interface IFIXGRIDBinding<itemClass extends FIXGRIDItem>
      Parameters:
      sortReference - Value of the sort reference without any expression prefix / postfix.
    • sort

      public void sort(String sortReference, boolean ascending)
      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

      public void sort(String[] sortReferences, boolean[] ascendings)
    • resort

      public void resort()
      Resorts the grid according to the last sorting. This is the actual execution of the sorting based on the info in getSortInfo().
    • renderingBegins

      public void renderingBegins()
      This method is called with each request processing - at the beginning of the processing.
      Specified by:
      renderingBegins in interface IFIXGRIDBinding<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

      protected ModelessPopup 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

      protected ModelessPopup openGridExportFunctionsPopup()
      Method for opening the default popup for grid export functions. You may override in order to update popup parameters (e.g. decorated/...).
    • openGridFunctionsPopup

      protected ModelessPopup openGridFunctionsPopup()
      Method for opening the default popup for showing grid functions. You may override in order to update popup parameters (e.g. decorated/...).
    • getColumnTexts

      public List<String> 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

      public List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> 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

      public abstract void ensureItemToBeDisplayed(itemClass item)
      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

      public List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> 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 method getColumnInfos() 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 method setColumnsequence(String). So this method "getVisibleColumns" is representing the current arrangement of the columns for the current user.
      Specified by:
      getVisibleColumns in interface IFIXGRIDBinding<itemClass extends FIXGRIDItem>
    • getVisibleColumns

      public List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> getVisibleColumns(boolean includeConnectedBinding)
      Specified by:
      getVisibleColumns in interface IFIXGRIDBinding<itemClass extends FIXGRIDItem>
    • getExportableColumns

      public List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> 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 interface IFIXGRIDBinding<itemClass extends FIXGRIDItem>
    • getExportableColumns

      public List<org.eclnt.jsfserver.elements.impl.FIXGRIDComponent.ColumnInfo> getExportableColumns(boolean includeConnectedBinding)
      Specified by:
      getExportableColumns in interface IFIXGRIDBinding<itemClass extends FIXGRIDItem>
    • notifyDownloadWasTriggered

      public void notifyDownloadWasTriggered(FIXGRIDENUMExportType exportType, boolean fullGrid)
      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. Check IFIXGRIDBinding.FIXGRIDSortInfo.getSortSequence() for more details on the sort sequence.
    • findCurrentSortInfo

      public List<IFIXGRIDBinding.FIXGRIDSortInfo> findCurrentSortInfo()
      Returns back current sort status: there can be multiple columns that sorted, for each column that is sorted a IFIXGRIDBinding.FIXGRIDSortInfo instance is added. The sequence in the list represents the priority of sorting: first item highest, then next one, etc.
    • findSortInfoForSortSequence

      protected IFIXGRIDBinding.FIXGRIDSortInfo findSortInfoForSortSequence(int sortSequence)
      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

      protected void processSort(String sortReference)
      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

      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 in processMultipleSort(). 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 in getSortInfo().

      The default implementation, that sorts by accessing the properties of the loaded grid items, is calling the sortGrid(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

      protected void processSearch(String searchString, String sortReference)
      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

      protected Comparator findSortComparatorForColumnValue(String sortReference)
      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 interface IFIXGRIDBinding<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()