Directory suggestion widget in user edit layout won't show label

Hello community,

I overrode the default user schema to add new columns, one of them is a custom vocabulary. It saves and edits no problem, however, whenever one opens the edit dialog, the label for the selected vocabulary is missing, only showing the numerical id of the item, i.e: The selected item is missing the label

That only happens the first time, as after editing the item, it will correctly show the label, or unless the page is reloaded. How do I solve this?

This is the xml contribution that adds the vocabulary:

<?xml version="1.0"?>
<component name="">
    <extension target="" point="directories">
        <directory name="VOC_honorifico" extends="template-xvocabulary">
    <extension target="org.nuxeo.ecm.core.cache.CacheService" point="caches">
        <cache name="vocab-VOC_honorifico-cache">
            <option name="maxSize">1000</option>
            <option name="concurrencyLevel">500</option>
        <cache name="vocab-VOC_honorifico-cache-without-references">
            <option name="maxSize">1000</option>
            <option name="concurrencyLevel">500</option>

The custom vocabulary is loaded to storage using a csv file that has the fields : “id”,“label”,“obsolete”,“ordering”.

This is the user schema extension that overrides the default user schema:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace=""

<xs:include schemaLocation="base.xsd" />

<xs:element name="username" type="xs:string" />
<xs:element name="password" type="xs:string" />
<xs:element name="firstName" type="xs:string" />
<xs:element name="lastName" type="xs:string" />
<xs:element name="company" type="xs:string" />

<!-- the new field for the custom vocabulary -->
<xs:element name="honorifico">
        <xs:restriction base="xs:string" ref:resolver="directoryResolver" ref:directory="VOC_honorifico"/>

<xs:element name="email">
        <xs:restriction base="xs:string">
            <!-- the same pattern is used in userinfo.xsd -->
            <xs:pattern value="[^@]+@[^\.]+\..+" />

<!-- inverse reference -->
<xs:element name="groups" type="nxs:stringList" />

<!-- tenant id for the user -->
<xs:element name="tenantId" type="xs:string" />


And finally, this is the widget used at the edit user layout:

0 votes

1 answers



After some research, I found out that the requests use enrichers to get additonal information. Since the only user enricher available is the userProfile, I wrote a custom enricher that finds the custom vocabulary object by id; also I had to customize the user management views to add this custom enricher to the user request (), handle the value changes and the submition of the user form.

0 votes