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

Single user

Type singleUserSuggestion
Title Single user/group suggestion
Description
Available Since Version 5.4.2
Accepting Sub Widgets
No
Handling Labels
No
Containing Form
No
Handler Class org.nuxeo.ecm.platform.forms.layout.facelets.plugins.TemplateWidgetTypeHandler
Properties {template=/widgets/single_user_suggestion_widget_template.xhtml}
Categories document
Use prefixed reference prefixed Check this box if you want the references prefixed with "user:" or "group:".
First label field firstLabelField Field to use as the first label when displaying the selected user. Defaults to 'firstName'.
Second label field secondLabelField Field to use as the second label when displaying the selected user. Defaults to 'lastName'.
Third label field thirdLabelField Field to use as the third label when displaying the selected user. Defaults to 'email'. Available since 5.5.
Hide first label hideFirstLabel Boolean indicating if the first label should be hidden. Defaults to false.
Hide second label hideSecondLabel Boolean indicating if the second label should be hidden.Defaults to false.
Hide third label hideThirdLabel Boolean indicating if the third label should be hidden. Defaults to false. Available since 5.5.
Display action displayAction The display action to use when rendering the user or group. Can be 'nothing' to just display text only, 'view' to have a link going to the user or group view, or 'edit' to have a link going to the user or group edition. The 'edit' action assumes the widget is used in the Users and Groups management.
Display email for users displayEmailInSuggestion Boolean indicating if the email should be displayed for users. Defaults to false. Available since 5.5.
Required required
Placeholder placeholder String representing a short hint (a word or short phrase) intended to aid the user with data entry.
Width width Default value: 100% The suggestion width.
Select2 frequency frequency Delay (in milliseconds) before sending a request to the server after a character is typed. Default value is 300ms.
Minimum characters minChars Default value: 3 The minimal number of characters to type for the suggestion to be active. Defaults to 3.
Search type userSuggestionSearchType
Group id restriction groupRestriction Enter the id of a group to suggest only user from this group.
Use prefixed reference prefixed Check this box if you want the references prefixed with "user:" or "group:".
Max search results userSuggestionMaxSearchResults Number of maximum search results in the suggestion (defaults to 0 that means no limit).
Ajax reRender ajaxReRender Ajax rerender ids, separated by commas.
Display email for users displayEmailInSuggestion Boolean indicating if the email should be displayed for users. Defaults to false. Available since 5.5.
Help Label helpLabel The help label is displayed below the widget.
Hide Help Label hideHelpLabel This attribute controls the possibility to hide the help label. Available since 5.7.
Container css class containerCssClass Css class of the Select2 selection container
Dropdown css class dropdownCssClass Css class of the Select2 dropdown suggestion
Inline Javascript inlinejs Javascript to be injected in the page with the Widget. You can define here custom formatters referenced in "Selection Formatter" and "Suggestion Formatter" fields. Example: <pre> function myFormatter(entry) { var markup = entry.displayLabel; return markup; } </pre>
Selection Formatter selectionFormatter Name of the JavaScript function that will be called by the widget to do the formatting of the selected entries. The target function should take as input the javascript Document as returned by Automation and should return some Html. Use the "Inline Javascript" property field to define your own formatter.
Suggestion Formatter suggestionFormatter Name of the JavaScript function that will be called by select2 to do the formatting of the suggestedentries. The target function should take as input the javascript Document as returned by Automation and should return some Html. Use the "Inline Javascript" property field to define your own formatter.
Dropdown on Arrow dropdownOnArrow Check this option to dropdown the suggestions only when clicking the arrow on the right of the single suggestion widget. By default the suggestions are dropped down wherever you click.