public class STimePeriodField extends SPageNode implements SDefaultPath
DEFAULT_UNSAVED_EDITION_CONTINUE_MESSAGE, DEFAULT_UNSAVED_EDITION_STOP_MESSAGE, DEFAULT_UNSAVED_EDITION_WARNING_MESSAGE
Constructor and Description |
---|
STimePeriodField(java.lang.String label,
java.lang.String datafieldname,
java.lang.String helper,
TimePeriod.PeriodType periodtype,
TimePeriodDataElt linkeddata,
SPage parentpage,
boolean businessparameter,
boolean readonly,
boolean showintitle,
boolean showinbottomnotes,
SActionRef action)
creates a time period field
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getPathName() |
java.util.function.Function<SActionInputDataRef<TimePeriodDataEltType>,SActionDataLoc<TimePeriodDataEltType>> |
getTimePeriodInput() |
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 |
setLinkedData(TimePeriodDataElt linkeddata)
sets the linked data
|
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 STimePeriodField(java.lang.String label, java.lang.String datafieldname, java.lang.String helper, TimePeriod.PeriodType periodtype, TimePeriodDataElt linkeddata, SPage parentpage, boolean businessparameter, boolean readonly, boolean showintitle, boolean showinbottomnotes, SActionRef action)
label
- label shown to the user in the default languagedatafieldname
- name of the data field (should be unique, without
special characters and space)helper
- a long explanation of the field that will display as
roll-overperiodtype
- type of period (Year, quarter, month...)linkeddata
- linked data to put when displaying the field for the
first timeparentpage
- page the widget is created forbusinessparameter
- true if business parameterreadonly
- true if field is read-onlyshowintitle
- show the field value in object title if trueshowinbottomnotes
- show the field value in object bottom notes only if
trueaction
- the action to trigger at edition of the fieldpublic 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 setLinkedData(TimePeriodDataElt linkeddata)
linkeddata
- linked data to display and potentially editpublic 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 java.util.function.Function<SActionInputDataRef<TimePeriodDataEltType>,SActionDataLoc<TimePeriodDataEltType>> getTimePeriodInput()