Nuxeo Showcase - Layout Service (forms, views, and actions)

Toggleable form

Type toggleableLayoutWithForms
Title Toggleable form
Description This widget displays a form layout which mode can be toggled, with forms inside it. Note that usually layouts do not contain any forms, but are surrounded by one, and nesting forms breaks the available actions. So you should make sure there is no enclosing form around the layout, or around this widget, when using it.
Available Since Version 5.6
Accepting Sub Widgets
No
Handling Labels
Yes
Containing Form
Yes
Handler Class org.nuxeo.ecm.platform.forms.layout.facelets.plugins.TemplateWidgetTypeHandler
Properties {template=/widgets/toggleable_layout_with_forms_widget.xhtml}
Categories tab_designer
Layout(s) initialLayoutName The layout to display before toggling the mode. Also accepts a list of multiple layout names, separated by commas.
Toggled layout(s) toggledLayoutName The layout to display after toggling the mode. Also accepts a list of multiple layout names, separated by commas. If not filled, defaults to the initial layout name(s).
Style class styleClass The given style class will be put in a "div" element around the layout.
Can toggle mode canToggleMode The boolean property to resolve when deciding whether the toggle button should be displayed or not. Defaults to an EL expression checking permission 'Write' on the document. Examples: false, #{webActions.checkFilter('canToggleLayoutToEditMode') and currentUser.isMemberOf('togglers_groups')}. Default expression used (includes check for permission 'Write', check if document is in the trash, and check if document is mutable -- not a proxy nor a version): #{webActions.checkFilter('canToggleLayoutToEditMode')}
Hide default actions hideDefaultActions If set to true, actions from the default category 'EDIT_DOCUMENT_FORM' will not be displayed on the layout in toggled mode. Defaults to false.
Additional actions category additionalActionsCategory The additional actions category to use when displaying the layout in toggled mode.
Actions Display actionsDisplay If set to 'buttons', actions will be displayed as command buttons. If set to 'links', actions will be displayed as command links. If set to 'icons', actions will be displayed as icons. Else (default behaviour), actions will be displayed as command links and display their icons when defined.
Widgets Display widgetsDisplay The display attribute controls the rendering of widgets.
Show edit options showEditOptions If set to true, additional edit options (like a textarea for comment to be visible in the document history) will be visible after the layout in toggled (edit) mode. Only visible if value bound to the layout is a document model. Defaults to false.
Use ajax actions useAjaxForm If set to true, actions will be performed using ajax. Note that sometimes, actions will require you to reload the whole page for other elements than the current zone to be re-rendered, so using ajax will not be user friendly in these cases. Defaults to false.
Foldable foldable If set to true, the layout will be displayed in a box that can be folded/unfolded in javascript. Ignored if the widget is not marked as handling labels as the header will not be displayed in this case. If the widget label is empty, a default label will be shown. Available since 5.7, defaults to false.
Folded by default foldedByDefault Available since 5.7, defaults to false.
Display toggle action in header displayToggleActionInHeader If set to true (and widget has a header, because it handles its label), actions will be displayed in the header. This includes the "toggle" action, as well as "save" actions. Only the "toggle" action is hidden from the rendering when it is displayed on top. "Save" actions are shown twice. Available since 5.7, defaults to false.
Initial action label initialActionLabel The initial action label to display. Defaults to 'action.view.modification' (Edit), is translated when the widget is translated.
Cancel action label cancelActionLabel The toggled action label to display. Defaults to 'command.cancel' (Cancel), is translated when the widget is translated.
Template template The layout template to use instead of the one already set on the layout(s) definition(s).