|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.olat.core.gui.components.form.flexible.FormUIFactory
public class FormUIFactory
Factory class to create the flexible form elements.
| Method Summary | |
|---|---|
MultipleSelectionElement |
addCheckboxesHorizontal(java.lang.String name,
FormItemContainer formLayout,
java.lang.String[] keys,
java.lang.String[] values,
java.lang.String[] cssClasses)
Create a multiple selection element with check-boxes horizontal aligned. |
MultipleSelectionElement |
addCheckboxesHorizontal(java.lang.String name,
java.lang.String i18nLabel,
FormItemContainer formLayout,
java.lang.String[] keys,
java.lang.String[] values,
java.lang.String[] cssClasses)
Create a multiple selection element with check-boxes horizontal aligned. |
MultipleSelectionElement |
addCheckboxesVertical(java.lang.String name,
FormItemContainer formLayout,
java.lang.String[] keys,
java.lang.String[] values,
java.lang.String[] cssClasses,
int columns)
Create a multiple selection element with check-boxes that is rendered in vertical columns This method uses the name to set the i18nkey of the label. |
MultipleSelectionElement |
addCheckboxesVertical(java.lang.String name,
java.lang.String i18nLabel,
FormItemContainer formLayout,
java.lang.String[] keys,
java.lang.String[] values,
java.lang.String[] cssClasses,
int columns)
Create a multiple selection element with check-boxes that is rendered in vertical columns |
DateChooser |
addDateChooser(java.lang.String name,
java.lang.String initValue,
FormItemContainer formLayout)
Date chooser is a text field with an icon, which on click shows a java script calendar to choose a date/time. |
DateChooser |
addDateChooser(java.lang.String name,
java.lang.String i18nLabel,
java.lang.String initValue,
FormItemContainer formLayout)
Date chooser is a text field with an icon, which on click shows a java script calendar to choose a date/time. |
MultipleSelectionElement |
addDropdownMultiselect(java.lang.String name,
FormItemContainer formLayout)
Create a multiple selection element as a drop-down This method uses the name to set the i18nkey of the label. |
MultipleSelectionElement |
addDropdownMultiselect(java.lang.String name,
java.lang.String i18nLabel,
FormItemContainer formLayout)
|
SingleSelection |
addDropdownSingleselect(java.lang.String name,
FormItemContainer formLayout,
java.lang.String[] theKeys,
java.lang.String[] theValues,
java.lang.String[] theCssClasses)
Add a drop down menu (also called pulldown menu), with a label's i18n key being the same as the name |
SingleSelection |
addDropdownSingleselect(java.lang.String name,
java.lang.String i18nLabel,
FormItemContainer formLayout,
java.lang.String[] theKeys,
java.lang.String[] theValues,
java.lang.String[] theCssClasses)
Add a drop down menu (also called pulldown menu). |
FileElement |
addFileElement(java.lang.String name,
FormItemContainer formLayout)
Add a file upload element, with a label's i18n key being the same as the name |
FileElement |
addFileElement(java.lang.String name,
java.lang.String i18nLabel,
FormItemContainer formLayout)
Add a file upload element |
FormCancel |
addFormCancelButton(java.lang.String name,
FormLayoutContainer formLayoutContainer,
UserRequest ureq,
WindowControl wControl)
Add a form cancel button. |
FormLink |
addFormLink(java.lang.String name,
FormItemContainer formLayout)
creates a form link with the given name which acts also as command, i18n and component name. |
FormLink |
addFormLink(java.lang.String name,
FormItemContainer formLayout,
int presentation)
Add a form link with the option to choose the presentation, the name parameter is taken as
to be used in $r.render(", as i18nkey for the link text, and also the cmd string. |
FormLink |
addFormLink(java.lang.String name,
FormItemContainer formLayout,
java.lang.String customEnabledLinkCSS)
Add a form link with a special css class |
FormLink |
addFormLink(java.lang.String name,
java.lang.String i18nLink,
java.lang.String i18nLabel,
FormItemContainer formLayout,
int presentation)
|
FormSubmit |
addFormSubmitButton(java.lang.String name,
FormItemContainer formLayout)
Add a form submit button. |
FormSubmit |
addFormSubmitButton(java.lang.String name,
java.lang.String i18nKey,
FormItemContainer formLayout)
Add a form submit button. |
IntegerElement |
addInlineIntegerElement(java.lang.String name,
int initVal,
FormItemContainer formLayout,
FormBasicController listener)
|
TextElement |
addInlineTextElement(java.lang.String name,
java.lang.String value,
FormItemContainer formLayout,
FormBasicController listener)
|
IntegerElement |
addIntegerElement(java.lang.String name,
int initVal,
FormItemContainer formLayout)
create an integer Element. |
IntegerElement |
addIntegerElement(java.lang.String name,
java.lang.String i18nLabel,
int initVal,
FormItemContainer formLayout)
create an integer Element |
TextElement |
addPasswordElement(java.lang.String name,
java.lang.String i18nLabel,
int maxLen,
java.lang.String initialValue,
FormItemContainer formLayout)
|
SingleSelection |
addRadiosHorizontal(java.lang.String name,
FormItemContainer formLayout,
java.lang.String[] theKeys,
java.lang.String[] theValues)
Add horizontal aligned radio buttons. |
SingleSelection |
addRadiosHorizontal(java.lang.String name,
java.lang.String i18nLabel,
FormItemContainer formLayout,
java.lang.String[] theKeys,
java.lang.String[] theValues)
Add horizontal aligned radio buttons. |
SingleSelection |
addRadiosVertical(java.lang.String name,
FormItemContainer formLayout,
java.lang.String[] theKeys,
java.lang.String[] theValues)
Add vertical aligned radio buttons This method uses the name to set the i18nkey of the label. |
SingleSelection |
addRadiosVertical(java.lang.String name,
java.lang.String i18nLabel,
FormItemContainer formLayout,
java.lang.String[] theKeys,
java.lang.String[] theValues)
Add vertical aligned radio buttons |
RichTextElement |
addRichTextElementForFileData(java.lang.String name,
java.lang.String i18nLabel,
java.lang.String initialValue,
int rows,
int cols,
boolean externalToolbar,
VFSContainer baseContainer,
java.lang.String relFilePath,
CustomLinkTreeModel customLinkTreeModel,
FormItemContainer formLayout,
UserSession usess,
WindowControl wControl)
Add a rich text formattable element that offers complex formatting functionality and loads the data from the given file path. |
RichTextElement |
addRichTextElementForStringData(java.lang.String name,
java.lang.String i18nLabel,
java.lang.String initialHTMLValue,
int rows,
int cols,
boolean externalToolbar,
boolean fullProfile,
VFSContainer baseContainer,
CustomLinkTreeModel customLinkTreeModel,
FormItemContainer formLayout,
UserSession usess,
WindowControl wControl)
Add a rich text formattable element that offers simple formatting functionality and loads the data form the given string value. |
RichTextElement |
addRichTextElementForStringDataMinimalistic(java.lang.String name,
java.lang.String i18nLabel,
java.lang.String initialHTMLValue,
int rows,
int cols,
boolean externalToolbar,
FormItemContainer formLayout,
UserSession usess,
WindowControl wControl)
Add a rich text formattable element that offers basic formatting functionality and loads the data form the given string value. |
SpacerElement |
addSpacerElement(java.lang.String name,
FormItemContainer formLayout,
boolean onlySpaceAndNoLine)
Inserts an HTML horizontal bar (<HR>) element. |
FormItem |
addStaticExampleText(java.lang.String name,
java.lang.String text,
FormItemContainer formLayout)
adds a given text formatted in example style as part of the form. |
FormItem |
addStaticExampleText(java.lang.String name,
java.lang.String i18nLabel,
java.lang.String text,
FormItemContainer formLayout)
|
StaticTextElement |
addStaticTextElement(java.lang.String name,
java.lang.String translatedText,
FormItemContainer formLayout)
Add a static text, with a label's i18n key being the same as the name |
StaticTextElement |
addStaticTextElement(java.lang.String name,
java.lang.String i18nLabel,
java.lang.String translatedText,
FormItemContainer formLayout)
Add a static text. |
FlexiTableElment |
addTableElement(java.lang.String name,
FlexiTableDataModel tableModel,
FormItemContainer formLayout)
|
TextElement |
addTextAreaElement(java.lang.String name,
int rows,
int cols,
java.lang.String initialValue,
FormItemContainer formLayout)
Add a multi line text element, using the provided name as i18n key for the label, no max length check set, and fits content hight at maximium (100lnes). |
TextElement |
addTextAreaElement(java.lang.String name,
java.lang.String i18nLabel,
int maxLen,
int rows,
int cols,
boolean isAutoHeightEnabled,
java.lang.String initialValue,
FormItemContainer formLayout)
Add a multi line text element |
TextElement |
addTextElement(java.lang.String name,
java.lang.String i18nLabel,
int maxLen,
java.lang.String initialValue,
FormItemContainer formLayout)
|
MultipleSelectionElement |
addTreeMultiselect(java.lang.String name,
FormItemContainer formLayout,
TreeModel treemodel,
INodeFilter selectableFilter)
Create a multiple selection element as a tree. |
MultipleSelectionElement |
addTreeMultiselect(java.lang.String name,
java.lang.String i18nLabel,
FormItemContainer formLayout,
TreeModel treemodel,
INodeFilter selectableFilter)
Create a multiple selection element as a tree. |
FormItem |
createSimpleErrorText(java.lang.String name,
java.lang.String translatedText)
Static text with the error look and feel. |
FormItem |
createSimpleLabelText(java.lang.String name,
java.lang.String translatedText)
|
static FormUIFactory |
getInstance()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static FormUIFactory getInstance()
public DateChooser addDateChooser(java.lang.String name,
java.lang.String initValue,
FormItemContainer formLayout)
If no label is desired use the addDateChooser(String, String, String, FormItemContainer) with null as i18nLabel.
name - initValue - formLayout -
public DateChooser addDateChooser(java.lang.String name,
java.lang.String i18nLabel,
java.lang.String initValue,
FormItemContainer formLayout)
name - initValue - i18nLabel - formLayout -
public IntegerElement addIntegerElement(java.lang.String name,
int initVal,
FormItemContainer formLayout)
If no label is desired use the addIntegerElement(String, String, int, FormItemContainer) with null as i18nLabel.
name - initVal - formLayout -
public IntegerElement addIntegerElement(java.lang.String name,
java.lang.String i18nLabel,
int initVal,
FormItemContainer formLayout)
name - initVal - formLayout -
public MultipleSelectionElement addCheckboxesHorizontal(java.lang.String name,
FormItemContainer formLayout,
java.lang.String[] keys,
java.lang.String[] values,
java.lang.String[] cssClasses)
If no label is desired use the addCheckboxesHorizontal(String, String, FormItemContainer, String[], String[], String[]) with null as i18nLabel.
name - layouter - keys - values - cssClasses -
public MultipleSelectionElement addCheckboxesHorizontal(java.lang.String name,
java.lang.String i18nLabel,
FormItemContainer formLayout,
java.lang.String[] keys,
java.lang.String[] values,
java.lang.String[] cssClasses)
name - i18nLabel - formLayout - keys - values - cssClasses -
public MultipleSelectionElement addCheckboxesVertical(java.lang.String name,
FormItemContainer formLayout,
java.lang.String[] keys,
java.lang.String[] values,
java.lang.String[] cssClasses,
int columns)
If no label is desired use the addCheckboxesVertical(String, String, FormItemContainer, String[], String[], String[], int) with null as i18nLabel.
name - layouter - keys - values - cssClasses - columns - Currently 1 and 2 columns are supported
public MultipleSelectionElement addCheckboxesVertical(java.lang.String name,
java.lang.String i18nLabel,
FormItemContainer formLayout,
java.lang.String[] keys,
java.lang.String[] values,
java.lang.String[] cssClasses,
int columns)
name - i18nLabel - formLayout - keys - values - cssClasses - columns -
public MultipleSelectionElement addDropdownMultiselect(java.lang.String name,
FormItemContainer formLayout)
If no label is desired use the addDropdownMultiselect(String, String, FormItemContainer) with null as i18nLabel.
name - formLayout -
public MultipleSelectionElement addDropdownMultiselect(java.lang.String name,
java.lang.String i18nLabel,
FormItemContainer formLayout)
name - i18nLabel - formLayout -
public MultipleSelectionElement addTreeMultiselect(java.lang.String name,
FormItemContainer formLayout,
TreeModel treemodel,
INodeFilter selectableFilter)
If no label is desired use the addDropdownMultiselect(String, String, FormItemContainer) with null as i18nLabel.
name - formLayout - treemodel -
public MultipleSelectionElement addTreeMultiselect(java.lang.String name,
java.lang.String i18nLabel,
FormItemContainer formLayout,
TreeModel treemodel,
INodeFilter selectableFilter)
name - i18nLabel - formLayout - treemodel - selectableFilter -
public SingleSelection addRadiosHorizontal(java.lang.String name,
FormItemContainer formLayout,
java.lang.String[] theKeys,
java.lang.String[] theValues)
If no label is desired use the addRadiosHorizontal(String, String, FormItemContainer, String[], String[]) with null as i18nLabel.
name - item identifier and i18n key for the labelformLayout - theKeys - the radio button keystheValues - the radio button display values
public SingleSelection addRadiosHorizontal(java.lang.String name,
java.lang.String i18nLabel,
FormItemContainer formLayout,
java.lang.String[] theKeys,
java.lang.String[] theValues)
name - i18nLabel - formLayout - theKeys - theValues -
public SingleSelection addRadiosVertical(java.lang.String name,
FormItemContainer formLayout,
java.lang.String[] theKeys,
java.lang.String[] theValues)
If no label is desired use the addRadiosVertical(String, String, FormItemContainer, String[], String[]) with null as i18nLabel.
name - item identifier and i18n key for the labelformLayout - theKeys - the radio button keystheValues - the radio button display values
public SingleSelection addRadiosVertical(java.lang.String name,
java.lang.String i18nLabel,
FormItemContainer formLayout,
java.lang.String[] theKeys,
java.lang.String[] theValues)
name - i18nLabel - formLayout - theKeys - theValues -
public SingleSelection addDropdownSingleselect(java.lang.String name,
FormItemContainer formLayout,
java.lang.String[] theKeys,
java.lang.String[] theValues,
java.lang.String[] theCssClasses)
name.
If you do not want a label, use the addDropdownSingleselect(String, String, FormItemContainer, String[], String[], String[])
method with the i18nKey and set it null
- Parameters:
name - item identifier and i18n key for the labelformLayout - theKeys - the menu selection keystheValues - the menu display valuestheCssClasses - the css classes to style the menu items or NULL to use no special styling
- Returns:
public SingleSelection addDropdownSingleselect(java.lang.String name,
java.lang.String i18nLabel,
FormItemContainer formLayout,
java.lang.String[] theKeys,
java.lang.String[] theValues,
java.lang.String[] theCssClasses)
name - labelKey - i18n key for the label, may be null indicating no label.formLayout - theKeys - theValues - theCssClasses -
public StaticTextElement addStaticTextElement(java.lang.String name,
java.lang.String translatedText,
FormItemContainer formLayout)
name.
If you do not want a label, use the addStaticTextElement(String, String, String, FormItemContainer)
method with the i18nKey and set it null
- Parameters:
name - translatedText - formLayout -
- Returns:
public StaticTextElement addStaticTextElement(java.lang.String name,
java.lang.String i18nLabel,
java.lang.String translatedText,
FormItemContainer formLayout)
name - i18nLabel - translatedText - formLayout -
public TextElement addInlineTextElement(java.lang.String name,
java.lang.String value,
FormItemContainer formLayout,
FormBasicController listener)
public IntegerElement addInlineIntegerElement(java.lang.String name,
int initVal,
FormItemContainer formLayout,
FormBasicController listener)
public SpacerElement addSpacerElement(java.lang.String name,
FormItemContainer formLayout,
boolean onlySpaceAndNoLine)
name - formLayout -
public FormItem addStaticExampleText(java.lang.String name,
java.lang.String text,
FormItemContainer formLayout)
name - text - formLayout -
public FormItem addStaticExampleText(java.lang.String name,
java.lang.String i18nLabel,
java.lang.String text,
FormItemContainer formLayout)
name - i18nLabel - i18n key for label, null to disabletext - formLayout -
public TextElement addTextElement(java.lang.String name,
java.lang.String i18nLabel,
int maxLen,
java.lang.String initialValue,
FormItemContainer formLayout)
name - maxLen - initialValue - i18nLabel - formLayout -
public TextElement addPasswordElement(java.lang.String name,
java.lang.String i18nLabel,
int maxLen,
java.lang.String initialValue,
FormItemContainer formLayout)
public TextElement addTextAreaElement(java.lang.String name,
int rows,
int cols,
java.lang.String initialValue,
FormItemContainer formLayout)
name - rows - cols - initialValue - formLayout -
addTextAreaElement(String, String, int, int, int, boolean, String, FormItemContainer)
public TextElement addTextAreaElement(java.lang.String name,
java.lang.String i18nLabel,
int maxLen,
int rows,
int cols,
boolean isAutoHeightEnabled,
java.lang.String initialValue,
FormItemContainer formLayout)
name - i18nLabel - i18n key for the label or null to set no label at all.maxLen - rows - the number of lines or -1 to use default valuecols - the number of characters per line or -1 to use 100% of the
available spaceisAutoHeightEnabled - true: element expands to fit content height,
(max 100 lines); false: specified rows usedinitialValue - Initial valueformLayout -
public RichTextElement addRichTextElementForStringDataMinimalistic(java.lang.String name,
java.lang.String i18nLabel,
java.lang.String initialHTMLValue,
int rows,
int cols,
boolean externalToolbar,
FormItemContainer formLayout,
UserSession usess,
WindowControl wControl)
name - Name of the form itemi18nLabel - The i18n key of the label or NULL when no label is usedinitialValue - The initial value or NULL if no initial value is availablerows - The number of lines the editor should offer. Use -1 to
indicate no specific heightcols - The number of characters width the editor should offer. Use -1
to indicate no specific widthexternalToolbar - true: use an external toolbar that is only visible when the
user clicks into the text area; false: use the static toolbarformLayout - The form item container where to add the rich
text elementusess - The user session that dispatches the imageswControl - the current window controllerwControl - the current window controller
public RichTextElement addRichTextElementForStringData(java.lang.String name,
java.lang.String i18nLabel,
java.lang.String initialHTMLValue,
int rows,
int cols,
boolean externalToolbar,
boolean fullProfile,
VFSContainer baseContainer,
CustomLinkTreeModel customLinkTreeModel,
FormItemContainer formLayout,
UserSession usess,
WindowControl wControl)
name - Name of the form itemi18nLabel - The i18n key of the label or NULL when no label is usedinitialValue - The initial value or NULL if no initial value is availablerows - The number of lines the editor should offer. Use -1 to
indicate no specific heightcols - The number of characters width the editor should offer. Use -1
to indicate no specific widthexternalToolbar - true: use an external toolbar that is only visible when the
user clicks into the text area; false: use the static toolbarfullProfile - false: load only the necessary plugins; true: load all plugins
from the full profilebaseContainer - The VFS container where to load resources from (images etc) or
NULL to not allow embedding of media files at allformLayout - The form item container where to add the richt text elementcustomLinkTreeModel - A custom link tree model or NULL not not use a
custom modelformLayout - The form item container where to add the rich
text elementusess - The user session that dispatches the imageswControl - the current window controllerwControl - the current window controller
public RichTextElement addRichTextElementForFileData(java.lang.String name,
java.lang.String i18nLabel,
java.lang.String initialValue,
int rows,
int cols,
boolean externalToolbar,
VFSContainer baseContainer,
java.lang.String relFilePath,
CustomLinkTreeModel customLinkTreeModel,
FormItemContainer formLayout,
UserSession usess,
WindowControl wControl)
name - Name of the form itemi18nLabel - The i18n key of the label or NULL when no label is usedinitialValue - The initial value or NULL if no initial value is availablerows - The number of lines the editor should offer. Use -1 to
indicate no specific heightcols - The number of characters width the editor should offer. Use -1
to indicate no specific widthexternalToolbar - true: use an external toolbar that is only visible when the
user clicks into the text area; false: use the static toolbarbaseContainer - The VFS container where to load resources from (images etc) or
NULL to not allow embedding of media files at allrelFilePath - The path to the file relative to the baseContainercustomLinkTreeModel - A custom link tree model or NULL not not use a custom modelformLayout - The form item container where to add the rich text elementusess - The user session that dispatches the imageswControl - the current window controller
public FormItem createSimpleLabelText(java.lang.String name,
java.lang.String translatedText)
public FormItem createSimpleErrorText(java.lang.String name,
java.lang.String translatedText)
name - in velocity for $r.render("name")translatedText - already translated text that should be displayed.
public FlexiTableElment addTableElement(java.lang.String name,
FlexiTableDataModel tableModel,
FormItemContainer formLayout)
name - tableModel - formLayout -
and its implementations
public FormLink addFormLink(java.lang.String name,
FormItemContainer formLayout)
name - formLayout -
public FormLink addFormLink(java.lang.String name,
FormItemContainer formLayout,
int presentation)
name parameter is taken as
to be used in $r.render("") , as i18nkey for the link text, and also the cmd string.
If different values are needed for name, i18nkey link text, use the addFormLink(String, String, String, FormItemContainer, int). This allows also to set
the i18n key for label.
name - The name of the form element (identifyer), also used as i18n keyformLayout - presentation - See Link.BUTTON etc
public FormLink addFormLink(java.lang.String name,
java.lang.String i18nLink,
java.lang.String i18nLabel,
FormItemContainer formLayout,
int presentation)
name - to be used to render in velocity $r.render("name")i18nLink - i18n key for the link texti18nLabel - i18n key for the link elements label, maybe nullformLayout - FormLink is added as element herepresentation - See Link.BUTTON etc.
public FormLink addFormLink(java.lang.String name,
FormItemContainer formLayout,
java.lang.String customEnabledLinkCSS)
name - The name of the form element (identifyer), also used as i18n keyformLayout - css - class
public FileElement addFileElement(java.lang.String name,
FormItemContainer formLayout)
name.
If you do not want a label, use the addFileElement(String, String, FormItemContainer)
method with null value for the i18nKey.
- Parameters:
name - formLayout -
- Returns:
public FileElement addFileElement(java.lang.String name,
java.lang.String i18nLabel,
FormItemContainer formLayout)
name - i18nKey - formLayout -
public FormSubmit addFormSubmitButton(java.lang.String name,
FormItemContainer formLayout)
name - the button name (identifyer) and at the same time the i18n key of the buttonformItemContiner - The container where to add the button
public FormSubmit addFormSubmitButton(java.lang.String name,
java.lang.String i18nKey,
FormItemContainer formLayout)
name - the button name (identifyer)i18nKey - The display keyformItemContiner - The container where to add the button
public FormCancel addFormCancelButton(java.lang.String name,
FormLayoutContainer formLayoutContainer,
UserRequest ureq,
WindowControl wControl)
name - formLayoutContainer - ureq - wControl -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||