Class UIFormSpec
Note
This class if for compatibility with user services developed using older versions of EBX®. This class
must not
be used with user services implementing interface UserService
.
Bottom bar
It is possible to set the buttons in a bottom bar.
This feature enables a special layout for the workspace: the bottom bar is fixed at the bottom, and the scrollbar on the right is drawn to fit the space between the header and the bottom bar.
All properties of this object must be set before calling
UIServiceComponentWriter.startForm(UIFormSpec)
.
Caution: Due to this special layout, no content (HTML code) is allowed before or after the form.
- Since:
- 5.2.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addActionBackInBottomBar
(UIButtonSpec actionBack) Adds a button on the left side of the bottom bar.void
addActionBackInBottomBar
(UIButtonSpec actionBack, boolean isPreviousStep) Adds a button on the left side of the bottom bar.void
addActionForwardInBottomBar
(UIButtonSpec actionForward) Adds a button on the right side of the bottom bar.void
addActionForwardInBottomBar
(UIButtonSpec actionForward, boolean isNextStep) Adds a button on the right side of the bottom bar.void
addActionInplaceInBottomBar
(UIButtonSpec actionInplace) Adds a button at the center of the bottom bar.void
setDetectionOfLostModificationDisabled
(boolean isDisabled) Sets whether or not the user is prompted for a confirmation when input has been entered in the form, but the page is abandoned before saving the input.void
Defines the HTML id for theform
element.void
setJsFnNameToCallBeforeSubmit
(String jsFnNameToCallBeforeSubmit) Sets a JavaScript's function to be called before submitting the form.void
setMarginForContent
(boolean hasMarginForContent) Deprecated.Since 5.4.0 which provides new look & feel.void
setMultipart
(boolean isMultipart) Defines whether of not the form has multiple parts.void
setURLForAction
(String urlForAction) Defines the URL of theaction
attribute of theform
.
-
Constructor Details
-
UIFormSpec
public UIFormSpec()
-
-
Method Details
-
addActionBackInBottomBar
Adds a button on the left side of the bottom bar.Caution: If the form contains a bottom bar, no content (HTML code) is allowed before or after the form.
- Parameters:
actionBack
- the button's specification.- See Also:
-
addActionBackInBottomBar
Adds a button on the left side of the bottom bar.Caution: If the form contains a bottom bar, no content (HTML code) is allowed before or after the form.
- Parameters:
actionBack
- the button's specification.isPreviousStep
-true
to defines that the button will induce the previous screen/step,false
otherwise.- See Also:
-
addActionForwardInBottomBar
Adds a button on the right side of the bottom bar.Caution: If the form contains a bottom bar, no content (HTML code) is allowed before or after the form.
- Parameters:
actionForward
- the button's specification.- See Also:
-
addActionForwardInBottomBar
Adds a button on the right side of the bottom bar.Caution: If the form contains a bottom bar, no content (HTML code) is allowed before or after the form.
- Parameters:
actionForward
- the button's specification.isNextStep
-true
to defines that the button will induce the next screen/step,false
otherwise.- See Also:
-
addActionInplaceInBottomBar
Adds a button at the center of the bottom bar.Caution: If the form contains a bottom bar, no content (HTML code) is allowed before or after the form.
- Parameters:
actionInplace
- the button's specification.- See Also:
-
setId
Defines the HTML id for theform
element.This id is useful for finding the
form
element using JavaScript. For instance, to list a form's elements.The id attribute must respect the W3C Recommendation (such as being unique in the page). See https://www.w3.org/TR/REC-html40/struct/global.html#adef-id for more information.
- Parameters:
id
- the HTML id of theform
.
-
setJsFnNameToCallBeforeSubmit
Sets a JavaScript's function to be called before submitting the form.The DOM form element will be given as an argument of this function.
Example:If the JavaScript's function returns
true
and the clicked submit button has a confirmation message, the confirmation message will be displayed after calling of the JavaScript's function.If the form is submitted by clicking a submit button, that button can be accessed using
formEl.ebx_lastSubmitFocused
; otherwiseformEl.ebx_lastSubmitFocused
isnull
.- Parameters:
jsFnNameToCallBeforeSubmit
- the name of the JavaScript function to call before submitting the form.
-
setMarginForContent
Deprecated.Since 5.4.0 which provides new look & feel.UICSSClasses.CONTAINER_WITH_TEXT
can still be used to include a margin around text.Forms are used to display node values (tree layout), or other content (text layout). In the latter case, it is advised to set a thin margin for content, otherwise information will be flush against the left border.Default value is
false
.- Parameters:
hasMarginForContent
-true
to enable margin for content,false
otherwise.
-
setMultipart
public void setMultipart(boolean isMultipart) Defines whether of not the form has multiple parts. This is required in order to enable file uploads.Default value is
false
.- Parameters:
isMultipart
-true
to enable multipart,false
otherwise.
-
setURLForAction
Defines the URL of theaction
attribute of theform
.By default, the URL is
null
, so the form will submit values to the current page.- Parameters:
urlForAction
- the URL of theaction
attribute of theform
.
-
setDetectionOfLostModificationDisabled
public void setDetectionOfLostModificationDisabled(boolean isDisabled) Sets whether or not the user is prompted for a confirmation when input has been entered in the form, but the page is abandoned before saving the input.Default value is
false
.- Parameters:
isDisabled
-true
to disable form detection upon leaving the page,false
to enable it and reset to default.- See Also:
-