public class SDateField extends SPageNode implements SDefaultPath
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_EMPTY |
static int |
DEFAULT_TODAY |
DEFAULT_UNSAVED_EDITION_CONTINUE_MESSAGE, DEFAULT_UNSAVED_EDITION_STOP_MESSAGE, DEFAULT_UNSAVED_EDITION_WARNING_MESSAGE
Constructor and Description |
---|
SDateField(java.lang.String label,
java.lang.String datafieldname,
java.lang.String helper,
int defaultvalue,
boolean businessparameter,
boolean timeedit,
SPage parent,
boolean readonly,
boolean showintitle,
boolean showinbottomnotes,
SActionRef action) |
SDateField(java.lang.String label,
java.lang.String datafieldname,
java.lang.String helper,
int defaultvalue,
boolean businessparameter,
SPage parent,
boolean readonly,
boolean showintitle,
boolean showinbottomnotes,
SActionRef action)
creates a date field that only allows to enter a date (no time)
|
Modifier and Type | Method and Description |
---|---|
java.util.function.Function<SActionInputDataRef<DateDataEltType>,SActionDataLoc<DateDataEltType>> |
getDateInput()
provides a reference to the payload of this field to be used as an action on
the page
|
java.lang.String |
getPathName() |
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 |
setCompactShow()
shows the widget as compact (to be used in menus, bars...)
|
void |
setCompactShow(boolean twolines)
shows the widget as compact, potentially on two lines (one for label, one for
date entry widget)
|
void |
setDateBusinessData(DateDataElt data)
sets the page input as data for this widget
|
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 static final int DEFAULT_EMPTY
public static final int DEFAULT_TODAY
public SDateField(java.lang.String label, java.lang.String datafieldname, java.lang.String helper, int defaultvalue, boolean businessparameter, SPage parent, boolean readonly, boolean showintitle, boolean showinbottomnotes, SActionRef action)
label
- label in the main language of the applicationdatafieldname
- unique name of the widget in the scope of parent
widgethelper
- roll-over tip. Can be longdefaultvalue
- default value to put if field is emptybusinessparameter
- business parameter (to analyze if still needed)parent
- parent widgetreadonly
- true if read-onlyshowintitle
- if true, show in title of the object and the main
sectionshowinbottomnotes
- if true, show only in bottom notesaction
- action to trigger when user modifies the valuepublic SDateField(java.lang.String label, java.lang.String datafieldname, java.lang.String helper, int defaultvalue, boolean businessparameter, boolean timeedit, SPage parent, boolean readonly, boolean showintitle, boolean showinbottomnotes, SActionRef action)
label
- label in the main language of the applicationdatafieldname
- unique name of the widget in the scope of parent
widgethelper
- roll-over tip. Can be longdefaultvalue
- default value to put if field is emptybusinessparameter
- business parameter (to analyze if still needed)timeedit
- if true, time edition, if false just date editionparent
- parent widgetreadonly
- true if read-onlyshowintitle
- if true, show in title of the object and the main
sectionshowinbottomnotes
- if true, show only in bottom notesaction
- action to trigger when user modifies the valuepublic java.util.function.Function<SActionInputDataRef<DateDataEltType>,SActionDataLoc<DateDataEltType>> getDateInput()
public java.lang.String getPathName()
getPathName
in interface SDefaultPath
public void setDateBusinessData(DateDataElt data)
data
- page input attribute of date formatpublic 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 void setCompactShow()
public void setCompactShow(boolean twolines)
twolines
- if true, shows widget on two linespublic java.lang.String getWidgetCode()
getWidgetCode
in class SPageNode
public boolean hideComponent(SPageData input, SecurityBuffer buffer)
SPageNode
hideComponent
in class SPageNode
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