E
- type of data objects shownpublic class SObjectDisplay<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 |
---|
SObjectDisplay(java.lang.String name,
TObjectDataElt<E> inputdata,
DataObjectDefinition<E> objectmodel,
SPage parent,
boolean readonly)
creates an object display
|
SObjectDisplay(java.lang.String name,
TObjectDataElt<E> inputdata,
DataObjectDefinition<E> objectmodel,
SPage parent,
boolean readonly,
SActionRef defaultaction)
creates an object display with a default action
|
Modifier and Type | Method and Description |
---|---|
void |
addFieldLabelOverrides(DataObjectFieldMarker<E> fieldmarker,
TextDataElt newlabel)
adds a new label for a field
|
void |
addPageNodeRightOfTitle(SPageNode node)
adds a node right of title.
|
<F extends SimpleDataEltType> |
getAttributeInput(AttributeMarker<E,F> marker)
gets the attribute of the object to be used as an argument for an action on
the page
|
TObjectDataElt<E> |
getInputData()
get the data from this widget (used by security mechanisms)
|
java.util.function.Function<SActionInputDataRef<TObjectDataEltType<E>>,SActionDataLoc<TObjectDataEltType<E>>> |
getObjectInput()
gets the full object as input for an action on the page
|
<F extends SimpleDataEltType> |
getOneElementArrayInput(AttributeMarker<E,F> marker)
gets the attribute of the object as a one element array to be used as
argument for an action on the page
|
java.lang.String |
getPathName() |
java.lang.String |
getWidgetCode() |
void |
hideAttribute(DataObjectFieldMarker<E> marker)
hides the specified field
|
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 |
setHideReadOnly()
if true, read-only fields are hidden
|
void |
setMinFieldPriority(int minfieldpriority)
when this parameter is set, only the fields with a priority higher or equal
than the specified field priority are displayed.
|
void |
setMoreFieldPriority(int morefieldpriority)
when this parameter is set, only the fields with a priority higher or equal
than the specified field priority are displayed above the more collapsible
pane
|
void |
setReducedDisplay(boolean title)
displays the object as summarized version (only the title)
|
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 SObjectDisplay(java.lang.String name, TObjectDataElt<E> inputdata, DataObjectDefinition<E> objectmodel, SPage parent, boolean readonly)
name
- unique name of the widget inside the significant parent
widgetinputdata
- page attribute to showobjectmodel
- definition of the data objectparent
- parent pagereadonly
- if true, widget is readonly, if false, the widget is
allowedpublic SObjectDisplay(java.lang.String name, TObjectDataElt<E> inputdata, DataObjectDefinition<E> objectmodel, SPage parent, boolean readonly, SActionRef defaultaction)
name
- unique name of the widget inside the significant parent
widgetinputdata
- page attribute to showobjectmodel
- definition of the data objectparent
- parent pagereadonly
- if true, widget is readonly, if false, the widget is
alloweddefaultaction
- action to trigger when clicking return on one of the
fieldspublic void addFieldLabelOverrides(DataObjectFieldMarker<E> fieldmarker, TextDataElt newlabel)
fieldmarker
- field of the object to overridenewlabel
- new label for the fieldpublic void setReducedDisplay(boolean title)
title
- if true, show only the titlepublic void setMinFieldPriority(int minfieldpriority)
minfieldpriority
- a value between 1000 and -1000public void setMoreFieldPriority(int morefieldpriority)
morefieldpriority
- a value between 1000 and -1000public void setHideReadOnly()
public void hideAttribute(DataObjectFieldMarker<E> marker)
marker
- field marker for the fieldpublic <F extends SimpleDataEltType> java.util.function.Function<SActionInputDataRef<F>,SActionDataLoc<F>> getAttributeInput(AttributeMarker<E,F> marker)
marker
- marker of the fieldpublic <F extends SimpleDataEltType> java.util.function.Function<SActionInputDataRef<ArrayDataEltType<F>>,SActionDataLoc<ArrayDataEltType<F>>> getOneElementArrayInput(AttributeMarker<E,F> marker)
marker
- marker of the fieldpublic java.util.function.Function<SActionInputDataRef<TObjectDataEltType<E>>,SActionDataLoc<TObjectDataEltType<E>>> getObjectInput()
public void addPageNodeRightOfTitle(SPageNode node)
node
- node to add right of the titlepublic java.lang.String getPathName()
getPathName
in interface SDefaultPath
public 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 TObjectDataElt<E> getInputData()
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 problems