Class UIFormSpec
- java.lang.Object
-
- com.orchestranetworks.ui.UIFormSpec
-
public final class UIFormSpec extends Object
In the context of User services, specifies the general features of an HTML form.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:
UIServiceComponentWriter.startForm(UIFormSpec)
-
-
Constructor Summary
Constructors Constructor Description UIFormSpec()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddActionBackInBottomBar(UIButtonSpec actionBack)Adds a button on the left side of the bottom bar.voidaddActionBackInBottomBar(UIButtonSpec actionBack, boolean isPreviousStep)Adds a button on the left side of the bottom bar.voidaddActionForwardInBottomBar(UIButtonSpec actionForward)Adds a button on the right side of the bottom bar.voidaddActionForwardInBottomBar(UIButtonSpec actionForward, boolean isNextStep)Adds a button on the right side of the bottom bar.voidaddActionInplaceInBottomBar(UIButtonSpec actionInplace)Adds a button at the center of the bottom bar.voidsetDetectionOfLostModificationDisabled(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.voidsetId(String id)Defines the HTML id for theformelement.voidsetJsFnNameToCallBeforeSubmit(String jsFnNameToCallBeforeSubmit)Sets a JavaScript's function to be called before submitting the form.voidsetMarginForContent(boolean hasMarginForContent)Deprecated.Since 5.4.0 which provides new look & feel.voidsetMultipart(boolean isMultipart)Defines whether of not the form has multiple parts.voidsetURLForAction(String urlForAction)Defines the URL of theactionattribute of theform.
-
-
-
Method Detail
-
addActionBackInBottomBar
public void addActionBackInBottomBar(UIButtonSpec actionBack)
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:
UIButtonSpecSubmit
-
addActionBackInBottomBar
public void addActionBackInBottomBar(UIButtonSpec actionBack, boolean isPreviousStep)
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-trueto defines that the button will induce the previous screen/step,falseotherwise.- See Also:
UIButtonSpecSubmit
-
addActionForwardInBottomBar
public void addActionForwardInBottomBar(UIButtonSpec actionForward)
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:
UIButtonSpecSubmit
-
addActionForwardInBottomBar
public void addActionForwardInBottomBar(UIButtonSpec actionForward, boolean isNextStep)
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-trueto defines that the button will induce the next screen/step,falseotherwise.- See Also:
UIButtonSpecSubmit
-
addActionInplaceInBottomBar
public void addActionInplaceInBottomBar(UIButtonSpec actionInplace)
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:
s
-
setId
public void setId(String id)
Defines the HTML id for theformelement.This id is useful for finding the
formelement 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
public void setJsFnNameToCallBeforeSubmit(String jsFnNameToCallBeforeSubmit)
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
trueand 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_lastSubmitFocusedisnull.- Parameters:
jsFnNameToCallBeforeSubmit- the name of the JavaScript function to call before submitting the form.
-
setMarginForContent
@Deprecated public void setMarginForContent(boolean hasMarginForContent)
Deprecated.Since 5.4.0 which provides new look & feel.UICSSClasses.CONTAINER_WITH_TEXTcan 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-trueto enable margin for content,falseotherwise.
-
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-trueto enable multipart,falseotherwise.
-
setURLForAction
public void setURLForAction(String urlForAction)
Defines the URL of theactionattribute of theform.By default, the URL is
null, so the form will submit values to the current page.- Parameters:
urlForAction- the URL of theactionattribute 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-trueto disable form detection upon leaving the page,falseto enable it and reset to default.- See Also:
UIButtonSpecNavigation.setAskBeforeLeavingModifiedForm(boolean)
-
-