Class DefaultFIXGRIDPersistence
java.lang.Object
org.eclnt.jsfserver.util.fixgridpersistence.DefaultFIXGRIDPersistence
- All Implemented Interfaces:
IFIXGRIDPersistence2
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionapplyPersistentInfoFromGridInfo
(FIXGRIDBinding gridBinding, GridInfo gi) void
applySortInfoFromGridInfo
(FIXGRIDBinding gridBinding, GridInfo gi) Sort grid content according to instance ofGridInfo
.static GridInfo
createGridInfo
(FIXGRIDBinding gridBinding, IFIXGRIDPersistence.PersistentInfo persistentInfo) Creates a serialize-ableGridInfo
-object that can be simply persisted by JAXB serialization.static void
initAppendNewColumnsToTheEnd
(boolean value) You can define if new columns within the layout are automatically appended to the grid.static void
initStoreSortInfo
(boolean value) You can define if the sort status of the grid should be stored and re-applied as well.void
protected GridInfo
readGridInfo
(javax.faces.context.FacesContext context, FIXGRIDBinding gridBinding, String pageName, String persistId) The persistent info is kept in the database as instance of "GridInfo".readGridInfoForGrid
(IPageBean pageBean, String persistId) Method for reading theGridInfo
data from outside.
E.g. is used to sort a grid without yet being bound to a component processing.readPersistentInfo
(javax.faces.context.FacesContext context, FIXGRIDBinding gridBinding, String pageName, String persistId) Reads and applies persistent info for grid.protected String
readSerializedPersistentInfo
(javax.faces.context.FacesContext context, FIXGRIDBinding gridBinding, String pageName, String persistId) Reads the serialized persistent info - by default the reading is done from the Streamstore - but this can be overriden. - OVerride this method if you only want to change the way the persistent info is stored.static void
resetGrid
(FIXGRIDBinding<?> grid) protected void
saveSerializedPersistentInfo
(javax.faces.context.FacesContext context, FIXGRIDBinding gridBinding, String pageName, String persistId, IFIXGRIDPersistence.PersistentInfo persistentInfo, String xml) Writes the serialized persistent info - by default the writing is done to the Streamstore - but this can be overriden. - Override this method if you only want to change the way the persistent info is stored.protected void
updateGridInfo
(javax.faces.context.FacesContext context, FIXGRIDBinding gridBinding, String pageName, String persistId, IFIXGRIDPersistence.PersistentInfo persistentInfo, GridInfo gridInfo) void
updatePersistentInfo
(javax.faces.context.FacesContext context, FIXGRIDBinding gridBinding, String pageName, String persistId, IFIXGRIDPersistence.PersistentInfo persistentInfo)
-
Constructor Details
-
DefaultFIXGRIDPersistence
public DefaultFIXGRIDPersistence()
-
-
Method Details
-
initStoreSortInfo
public static void initStoreSortInfo(boolean value) You can define if the sort status of the grid should be stored and re-applied as well. The default is "true".
This definition is applied to all grids. -
initAppendNewColumnsToTheEnd
public static void initAppendNewColumnsToTheEnd(boolean value) You can define if new columns within the layout are automatically appended to the grid. The default is "true".
This definition is applied to all grids. -
readPersistentInfo
public IFIXGRIDPersistence.PersistentInfo readPersistentInfo(javax.faces.context.FacesContext context, FIXGRIDBinding gridBinding, String pageName, String persistId) Reads and applies persistent info for grid.- Specified by:
readPersistentInfo
in interfaceIFIXGRIDPersistence2
-
applyPersistentInfoFromGridInfo
public static IFIXGRIDPersistence.PersistentInfo applyPersistentInfoFromGridInfo(FIXGRIDBinding gridBinding, GridInfo gi) -
updatePersistentInfo
public void updatePersistentInfo(javax.faces.context.FacesContext context, FIXGRIDBinding gridBinding, String pageName, String persistId, IFIXGRIDPersistence.PersistentInfo persistentInfo) Implementation ofIFIXGRIDPersistence2.updatePersistentInfo(FacesContext, FIXGRIDBinding, String, String, PersistentInfo)
. The data is internally kept as instance ofGridInfo
, so the GridInfo instance is created withcreateGridInfo(FIXGRIDBinding, PersistentInfo)
and then stored withupdatePersistentInfo(FacesContext, FIXGRIDBinding, String, String, PersistentInfo)
.- Specified by:
updatePersistentInfo
in interfaceIFIXGRIDPersistence2
-
readGridInfoForGrid
Method for reading theGridInfo
data from outside.
E.g. is used to sort a grid without yet being bound to a component processing. -
applySortInfoFromGridInfo
Sort grid content according to instance ofGridInfo
. -
createGridInfo
public static GridInfo createGridInfo(FIXGRIDBinding gridBinding, IFIXGRIDPersistence.PersistentInfo persistentInfo) Creates a serialize-ableGridInfo
-object that can be simply persisted by JAXB serialization. -
readSerializedPersistentInfo
protected String readSerializedPersistentInfo(javax.faces.context.FacesContext context, FIXGRIDBinding gridBinding, String pageName, String persistId) Reads the serialized persistent info - by default the reading is done from the Streamstore - but this can be overriden. - OVerride this method if you only want to change the way the persistent info is stored. -
readGridInfo
protected GridInfo readGridInfo(javax.faces.context.FacesContext context, FIXGRIDBinding gridBinding, String pageName, String persistId) The persistent info is kept in the database as instance of "GridInfo". This is the method to read the grid info. -
junit_removeWrongValuesFromGridInfo
-
resetGrid
-
saveSerializedPersistentInfo
protected void saveSerializedPersistentInfo(javax.faces.context.FacesContext context, FIXGRIDBinding gridBinding, String pageName, String persistId, IFIXGRIDPersistence.PersistentInfo persistentInfo, String xml) Writes the serialized persistent info - by default the writing is done to the Streamstore - but this can be overriden. - Override this method if you only want to change the way the persistent info is stored.
THe info to be stored is passed as XML string. All other parameters are passed in order to let you build up the correct access string into your database. -
updateGridInfo
protected void updateGridInfo(javax.faces.context.FacesContext context, FIXGRIDBinding gridBinding, String pageName, String persistId, IFIXGRIDPersistence.PersistentInfo persistentInfo, GridInfo gridInfo) - Parameters:
persistentInfo
- - just passed for information reason + for compatibilitygridInfo
- - this is the data of the grid to be persisted
-