UserPickerΒΆ

/libs/granite/ui/components/coral/foundation/form/userpicker

An autocomplete component that is designed to allow the user to pick the user from suggested list.

It extends Field component.

It has the following content structure:

granite:FormUserPicker
  1. granite:FormField
namestring

The name that identifies the field when submitting the form.

valuestring

The value of the field.

emptyTextstring
i18n

A hint to the user of what can be entered in the field.

disabledboolean

Indicates if the field is in disabled state.

requiredboolean

Indicates if the field is mandatory to be filled.

multipleboolean

true to allow selection of multiple authorizables; false otherwise.

validationstring
multiple

The name of the validator to be applied. E.g. foundation.jcr.name. See validation in Granite UI.

srcstring

The URI Template that is giving the response of HTML of the suggestion. The format of the HTML is a stream of li elements. For example:

<li class="coral-SelectList-item coral-SelectList-item--option" data-value="itemvalue1">Item Display 1</li>
<li class="coral-SelectList-item coral-SelectList-item--option" data-value="itemvalue2">Item Display 2</li>

The URI Template supports start, end, query variables.

start
The start index of the paging of selection items to be returned.
end
The end index of the paging of selection items to be returned.
query
The text that the user queries for.

Example:

/path.html?start={start}&end={end}&query={query}&my-other-param=param1

If this property is not set, the default value is used that is giving the response of the users in Granite.

impersonatesOnlyboolean

true to display the users suggestion that are allowed to be impersonated by current user; false otherwise. This property is only applicable when the src property is not specified.

groupsOnlyboolean

true to display only groups suggestions; false to display only users suggestions. This property is only applicable when the src property is not specified.

showAllAuthorizablesboolean

true to display both users and groups; false otherwise. This property is only applicable when the src property is not specified.

serviceUsersOnlyboolean

true to show service users only from the suggestion; false otherwise. This property is only applicable when the src property is not specified.

hideServiceUsersboolean

true to hide the service users from the suggestion; false otherwise. This property is only applicable when the src property is not specified.

useHomeAsValueboolean

true to use the authorizable home as value for the automcomplete items; false to use the authorizable IDs as value for the autocomplete items. This property is only applicable when the src property is not specified.