Search code examples
javaseamecmnuxeo

Add your own vocabulary [Nuxeo]


I'm writing a layout contribution, I added a suggestOneDirectory widget named city but I don't know where can I change/add my own directoryName (instead of l10ncoverage) that contains the vocabulary of cities to be shown on the list.

 <widget name="city" type="suggestOneDirectory">
    <labels>
      <label mode="any">City :</label>
    </labels>
    <translated>true</translated>
    <fields>
      <field>adr:city</field>
    </fields>
    <properties mode="any">
      <property name="width">300</property>
      <property name="labelFieldName">label_{lang}</property>
      <property name="dbl10n">true</property>
      <property name="minChars">0</property>
      <property name="hideHelpLabel">true</property>
      <property name="directoryName">l10ncoverage</property>
      <property name="keySeparator">/</property>
      <property name="placeholder">Ville</property>
      <property name="documentSchemas">dublincore,layout_demo_schema</property>
      <property name="repository">default</property>
    </properties>
    <controls mode="any">
      <!-- enable ajax submit on change/click/select on demo application -->
      <control name="supportInsideInputWidgetEffects">true</control>
    </controls>
  </widget>

I'm not using Nuxeo Studio.


Solution

  • You can do it from the Admin Center: see USERDOC/Managing+Vocabularies

    Or you can use an extension point: see SQLDirectoryFactory--directories