E
- data object shown in the gridpublic class SGrid<E extends DataObject<E>> extends SPageNode implements SDefaultPath
DEFAULT_UNSAVED_EDITION_CONTINUE_MESSAGE, DEFAULT_UNSAVED_EDITION_STOP_MESSAGE, DEFAULT_UNSAVED_EDITION_WARNING_MESSAGE
Constructor and Description |
---|
SGrid(java.lang.String name,
SPage parentpage,
ArrayDataElt<TObjectDataElt<E>> objectarray,
DataObjectFieldMarker<E> linefield,
DataObjectFieldMarker<E> columnfield,
java.util.ArrayList<DataObjectFieldMarker<E>> valuefield,
DataObjectDefinition<E> objectmodel) |
SGrid(java.lang.String name,
SPage parentpage,
ArrayDataElt<TObjectDataElt<E>> objectarray,
DataObjectFieldMarker<E> linefield,
DataObjectFieldMarker<E> columnfield,
DataObjectFieldMarker<E> uniquevaluefield,
DataObjectDefinition<E> objectmodel)
Creates a grid with a single column criteria
|
SGrid(java.lang.String name,
SPage parentpage,
ArrayDataElt<TObjectDataElt<E>> objectarray,
DataObjectFieldMarker<E> linefield,
DataObjectFieldMarker<E> columnfield,
DataObjectFieldMarker<E> secondarycolumnfield,
DataObjectFieldMarker<E> uniquevaluefield,
DataObjectDefinition<E> objectmodel)
creates a grid with two column criteria
|
Modifier and Type | Method and Description |
---|---|
void |
addUpdateAction(SInlineActionRef inlineupdateaction,
java.util.ArrayList<DataObjectFieldMarker<E>> relevantattributes,
SActionOutputDataRef<ArrayDataEltType<TObjectDataEltType<E>>> inlineupdateactionoutputdata)
adds an inline update action
|
void |
addUpdateAction(SInlineActionRef inlineupdateaction,
java.util.ArrayList<DataObjectFieldMarker<E>> relevantattributes,
SActionOutputDataRef<ArrayDataEltType<TObjectDataEltType<E>>> inlineupdateactionoutputdata,
boolean updatenote)
adds an inline update action
|
<F extends SimpleDataEltType> |
getAttributeInput(AttributeMarker<E,F> marker)
gets the data location of an attribute for the cell selected by double click
|
java.lang.String |
getPathName() |
java.util.function.Function<SActionInputDataRef<ArrayDataEltType<TObjectDataEltType<E>>>,SActionDataLoc<ArrayDataEltType<TObjectDataEltType<E>>>> |
getUpdatedObjectArrayInput()
gives a reference to the updated objects in the grid
|
java.util.function.Function<SActionInputDataRef<TextDataEltType>,SActionDataLoc<TextDataEltType>> |
getUpdateNoteInput()
gives a reference to the update note input
|
java.lang.String |
getWidgetCode() |
boolean |
hideComponent(SPageData input,
SecurityBuffer buffer)
This method allows to hide component in a layout if the user is not
authorized
|
void |
populateDown(SPageSignifPath parentpath,
SPageNode[] widgetpathtoroot)
this method should be recursively called from parent structure to all its
children
|
void |
setDefaultAction(SActionRef defaultaction)
sets the default action after double click on a cell in the grid
|
void |
setWarningForUnsavedEdition()
sets a warning for unsaved edition with default messages
|
void |
setWarningForUnsavedEdition(java.lang.String unsavedwarningmessage,
java.lang.String unsavedwarningcontinuemessage,
java.lang.String unsavedwarningstopmessage)
sets a warning for unsaved edition with personalized messages
|
void |
WritePayloadToCDL(MessageWriter writer,
SPageData input,
SecurityBuffer buffer)
writes the payload of the representation (without opening and closing
structure)
|
addCurrentWidgetToRoot, getPage, printPath, setParentSignifPath, setSignifPath, WriteToCDL
public SGrid(java.lang.String name, SPage parentpage, ArrayDataElt<TObjectDataElt<E>> objectarray, DataObjectFieldMarker<E> linefield, DataObjectFieldMarker<E> columnfield, DataObjectFieldMarker<E> uniquevaluefield, DataObjectDefinition<E> objectmodel)
name
- unique name of the widgetparentpage
- pageobjectarray
- the array of objects to showlinefield
- field to use as linecolumnfield
- field to use as columnuniquevaluefield
- field to show: this is a single valueobjectmodel
- definition of the object being shown in the gridpublic SGrid(java.lang.String name, SPage parentpage, ArrayDataElt<TObjectDataElt<E>> objectarray, DataObjectFieldMarker<E> linefield, DataObjectFieldMarker<E> columnfield, DataObjectFieldMarker<E> secondarycolumnfield, DataObjectFieldMarker<E> uniquevaluefield, DataObjectDefinition<E> objectmodel)
name
- unique name of the widgetparentpage
- pageobjectarray
- the array of objects to showlinefield
- field to use as linecolumnfield
- field to use as columnsecondarycolumnfield
- the field to use as secondary column criteriauniquevaluefield
- field to show: this is a single valueobjectmodel
- definition of the object being shown in the gridpublic SGrid(java.lang.String name, SPage parentpage, ArrayDataElt<TObjectDataElt<E>> objectarray, DataObjectFieldMarker<E> linefield, DataObjectFieldMarker<E> columnfield, java.util.ArrayList<DataObjectFieldMarker<E>> valuefield, DataObjectDefinition<E> objectmodel)
name
- unique name of the widgetparentpage
- pageobjectarray
- the array of objects to showlinefield
- field to use as linecolumnfield
- field to use as columnvaluefield
- field to show: this is an arraylist with at least one
element. Practically, more than 3 values will likely
result in an unreadable layoutobjectmodel
- definition of the data object shown in the gridpublic java.util.function.Function<SActionInputDataRef<ArrayDataEltType<TObjectDataEltType<E>>>,SActionDataLoc<ArrayDataEltType<TObjectDataEltType<E>>>> getUpdatedObjectArrayInput()
public java.util.function.Function<SActionInputDataRef<TextDataEltType>,SActionDataLoc<TextDataEltType>> getUpdateNoteInput()
public void addUpdateAction(SInlineActionRef inlineupdateaction, java.util.ArrayList<DataObjectFieldMarker<E>> relevantattributes, SActionOutputDataRef<ArrayDataEltType<TObjectDataEltType<E>>> inlineupdateactionoutputdata)
inlineupdateaction
- inline update actionrelevantattributes
- relevant attributes for the inline update
(only those attributes are sent back to
the action); To take all normal fields of
object, enter nullinlineupdateactionoutputdata
- output data of the inline action to put
back in the grid after the updatepublic void addUpdateAction(SInlineActionRef inlineupdateaction, java.util.ArrayList<DataObjectFieldMarker<E>> relevantattributes, SActionOutputDataRef<ArrayDataEltType<TObjectDataEltType<E>>> inlineupdateactionoutputdata, boolean updatenote)
inlineupdateaction
- inline update actionrelevantattributes
- relevant attributes for the inline update
(only those attributes are sent back to
the action); To take all normal fields of
object, enter nullinlineupdateactionoutputdata
- output data of the inline action to put
back in the grid after the updateupdatenote
- if true, request the user to enter an
update notepublic void setDefaultAction(SActionRef defaultaction)
defaultaction
- default action after double click on a cell in the gridpublic java.lang.String getPathName()
getPathName
in interface SDefaultPath
public void populateDown(SPageSignifPath parentpath, SPageNode[] widgetpathtoroot)
SPageNode
populateDown
in class SPageNode
parentpath
- the parent significant pathwidgetpathtoroot
- an array of all the page nodes for traceability in
case of problemspublic void WritePayloadToCDL(MessageWriter writer, SPageData input, SecurityBuffer buffer) throws java.io.IOException
SPageNode
WritePayloadToCDL
in class SPageNode
writer
- the CDL writer on which to write the messagejava.io.IOException
public java.lang.String getWidgetCode()
getWidgetCode
in class SPageNode
public boolean hideComponent(SPageData input, SecurityBuffer buffer)
SPageNode
hideComponent
in class SPageNode
public <F extends SimpleDataEltType> java.util.function.Function<SActionInputDataRef<F>,SActionDataLoc<F>> getAttributeInput(AttributeMarker<E,F> marker)
marker
- attribute markerpublic void setWarningForUnsavedEdition()
public void setWarningForUnsavedEdition(java.lang.String unsavedwarningmessage, java.lang.String unsavedwarningcontinuemessage, java.lang.String unsavedwarningstopmessage)
unsavedwarningmessage
- message to shown when user is leaving
the pageunsavedwarningcontinuemessage
- label for the continue (and discard
updates) buttonunsavedwarningstopmessage
- label for the stop button