I can't find "Multiple vocabulary suggestion" (select2) in Nuxeo Studio

Hello,
I try to customize layouts using Studio (Nuxeo 5.8 platform). I need to create/view/edit the dc:subjects attribute (l10nsubjects vocabulary). I think I have to use the “multiple vocabulary suggestion” widget type, but I can not find it in Studio. Other types of widgets do not work properly (List, Multiple vocabulary, Multiple chained vocabulary, Multiple generic suggestion …) What can I do ? Thanks for your help.

0 votes

1 answers

1080 views

ANSWER



The widget is called “Multiple directory suggestion”, you should find it in the “More Widgets / Widgets by type” part

It should also be present in the drop down list “Widget Type” on the widget popup if you have previoulsy chosen “Widgets by property / dublincore / Subjects”

0 votes



Thank you for your answer.

I tried this widget but I can not get a result. I always get the following error :

<b>Unable to find field label_en in directory schema vocabulary</b>

           javax.servlet.ServletException: /widgets/suggest_many_directory_widget_template.xhtml @49,225 value=&quot;#{select2Actions.resolveMultipleDirectoryEntries(currentValue, widgetProperty_directoryName, widgetProperty_localize, widgetProperty_keySeparator, widgetProperty_dbl10n, widgetProperty_labelFieldName)}&quot;: java.lang.IllegalArgumentException: Unable to find field label_en in directory schema vocabulary

I can't understand what is wrong… The widget parameters are as follows:

Studio label <b>Subject</b>

Label <b>SUJETS</b>

Help label <b>-void-</b>

Translated <b>-not checked-</b>

Hide label <b>-not checked-</b>

Field <b>dc:subjects</b>

Add surrounding form <b>-checked-</b>

Widget Type <b>Multiple directory suggestion</b>

View Properties

Directory Name <b>subject</b>

Width <b>100%</b>

Localize <b>No(default value)</b>

Activate dbl10n <b>No (default value)</b>

Label field name <b>label_fr</b>

Container css class <b>-void-</b>

Inline Javascript

    function dirformatter(entry) {
        var markup = entry.displayLabel;
        if (entry.warn_message) {
            markup += &quot;&lt;img src=&apos;/nuxeo/icons/warning.gif&apos; title=&apos;&quot; + entry.warn_message + &quot;&apos;/&gt;&quot;;
        }
        return markup;
    }

Selection Formatter <b>dirformatter</b>

Custom properties configuration <b>-void-</b>

Advanced mode configuration <b>-void-</b>

03/31/2016

"Directory Name :subject" is wrong (this is the old version without l10n)

You should use "directoryName=l10n_subjects" (or l10nsubjects, can t remember) in the custom configuration properties (the vocabulary does not appear in the drop down list)

03/31/2016

Thank you ! It's OK now with directoryName=l10nsubjects.
04/04/2016