<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: formatDirectory() function print id instead label in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/formatdirectory-function-print-id-instead-label/m-p/326240#M13241</link>
    <description>&lt;P&gt;Can you provide the code of your element please?&lt;/P&gt;</description>
    <pubDate>Tue, 19 May 2020 09:30:18 GMT</pubDate>
    <dc:creator>Gregory_Carlin</dc:creator>
    <dc:date>2020-05-19T09:30:18Z</dc:date>
    <item>
      <title>formatDirectory() function print id instead label</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/formatdirectory-function-print-id-instead-label/m-p/326239#M13240</link>
      <description>&lt;P&gt;Hello,
I have a problem with displaying vocabulary.
I have the Id displayed instead of the labels.
&lt;span class="lia-inline-image-display-wrapper" image-alt="Image"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/1970iBA648FE7E60C2244/image-size/large?v=v2&amp;amp;px=999" role="button" title="Image" alt="Image" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Do you have an idea&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2020 09:17:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/formatdirectory-function-print-id-instead-label/m-p/326239#M13240</guid>
      <dc:creator>Ahmad_BenMaallem</dc:creator>
      <dc:date>2020-05-19T09:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: formatDirectory() function print id instead label</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/formatdirectory-function-print-id-instead-label/m-p/326240#M13241</link>
      <description>&lt;P&gt;Can you provide the code of your element please?&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2020 09:30:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/formatdirectory-function-print-id-instead-label/m-p/326240#M13241</guid>
      <dc:creator>Gregory_Carlin</dc:creator>
      <dc:date>2020-05-19T09:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: formatDirectory() function print id instead label</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/formatdirectory-function-print-id-instead-label/m-p/326241#M13242</link>
      <description>&lt;P&gt;Thank you for your reply,&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2020 09:39:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/formatdirectory-function-print-id-instead-label/m-p/326241#M13242</guid>
      <dc:creator>Ahmad_BenMaallem</dc:creator>
      <dc:date>2020-05-19T09:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: formatDirectory() function print id instead label</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/formatdirectory-function-print-id-instead-label/m-p/326242#M13243</link>
      <description>&lt;P&gt;nuxeo-workspace-view-layout.html&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dom-module id="nuxeo-workspace-view-layout"&amp;gt;

  &amp;lt;template&amp;gt;
    &amp;lt;nuxeo-document-content document="[[document]]"&amp;gt;&amp;lt;/nuxeo-document-content&amp;gt;
  &amp;lt;/template&amp;gt;

  &amp;lt;script&amp;gt;
    Polymer({
      is: 'nuxeo-workspace-view-layout',
      behaviors: [Nuxeo.LayoutBehavior],
      properties: {
        /**
         * @doctype Workspace
         */
        document: {
          type: Object
        }
      }
    });
  &amp;lt;/script&amp;gt;

&amp;lt;/dom-module&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;nuxeo-document-content from elements.html&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dom-module id="nuxeo-document-content" assetpath="nuxeo-results/"&amp;gt;
  &amp;lt;template&amp;gt;

    &amp;lt;style include="nuxeo-styles"&amp;gt;
      :host {
        display: block;
      }

      .results {
        @apply --layout-vertical;
        @apply --layout-flex;
        min-height: var(--nuxeo-document-content-min-height, calc(100vh - 216px - var(--nuxeo-app-top)));
        margin-bottom: var(--nuxeo-document-content-margin-bottom, 0);
      }

      .results.dragging {
        border: 2px dashed var(--nuxeo-primary-color);
      }

      .ellipsis {
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
        display: block;
        width: calc(100% - 38px);
      }

      .capitalize {
        text-transform: capitalize;
      }

      nuxeo-tag {
        margin-right: 2px;
      }
    &amp;lt;/style&amp;gt;

    &amp;lt;nuxeo-connection id="nxcon"&amp;gt;&amp;lt;/nuxeo-connection&amp;gt;

    &amp;lt;nuxeo-page-provider id="nxProvider" provider="[[provider]]" page-size="[[pageSize]]" aggregations="{{aggregations}}" enrichers="[[enrichers]]" params="[[params]]" schemas="[[schemas]]" headers="[[headers]]" fetch-aggregates=""&amp;gt;
    &amp;lt;/nuxeo-page-provider&amp;gt;

    &amp;lt;nuxeo-results id="results" display-mode="table" name="[[document.uid]]" nx-provider="[[nxProvider]]" selected-items="{{selectedItems}}" document="[[document]]" display-quick-filters="" display-sort="[[_canSort(document, sortOptions)]]" sort-options="[[sortOptions]]"&amp;gt;
      &amp;lt;nuxeo-data-grid name="grid" icon="nuxeo:view-thumbnails" class="results" empty-label="[[emptyLabel]]" empty-label-when-filtered="[[emptyLabelWhenFiltered]]" selection-enabled="" draggable$="[[_hasWritePermission(document)]]" drop-target-filter="[[_dropTargetFilter]]"&amp;gt;
        &amp;lt;template&amp;gt;
          &amp;lt;nuxeo-document-grid-thumbnail class="grid-box" tabindex$="{{tabIndex}}" selected$="{{selected}}" index="[[index]]" doc="[[item]]" on-navigate="_navigate" selected-items="[[selectedItems]]"&amp;gt;
          &amp;lt;/nuxeo-document-grid-thumbnail&amp;gt;
        &amp;lt;/template&amp;gt;
      &amp;lt;/nuxeo-data-grid&amp;gt;

      &amp;lt;nuxeo-data-table name="table" icon="nuxeo:view-list" class="results" settings-enabled="" empty-label="[[emptyLabel]]" empty-label-when-filtered="[[emptyLabelWhenFiltered]]" selection-enabled="" on-row-clicked="_navigate" draggable$="[[_hasWritePermission(document)]]" drop-target-filter="[[_dropTargetFilter]]"&amp;gt;
        &amp;lt;nuxeo-data-table-column name="[[i18n('documentContentView.datatable.header.title')]]" field="dc:title" sort-by="[[_displaySort(document, 'dc:title')]]" filter-by="title" flex="100"&amp;gt;
          &amp;lt;template&amp;gt;
            &amp;lt;nuxeo-document-thumbnail document="[[item]]"&amp;gt;&amp;lt;/nuxeo-document-thumbnail&amp;gt;
            &amp;lt;a class="title ellipsis" href$="[[urlFor('browse', item.path)]]" on-tap="_navigate"&amp;gt;[[item.title]]&amp;lt;/a&amp;gt;
          &amp;lt;/template&amp;gt;
        &amp;lt;/nuxeo-data-table-column&amp;gt;
        &amp;lt;nuxeo-data-table-column name="[[i18n('documentContentView.datatable.header.type')]]" field="type" hidden=""&amp;gt;
          &amp;lt;template&amp;gt;
            &amp;lt;nuxeo-tag&amp;gt;[[formatDocType(item.type)]]&amp;lt;/nuxeo-tag&amp;gt;
          &amp;lt;/template&amp;gt;
        &amp;lt;/nuxeo-data-table-column&amp;gt;
        &amp;lt;nuxeo-data-table-column name="[[i18n('documentContentView.datatable.header.modified')]]" field="dc:modified" sort-by="[[_displaySort(document, 'dc:modified')]]" filter-by="dc_modified_agg" flex="50"&amp;gt;
          &amp;lt;template is="header"&amp;gt;
            &amp;lt;nuxeo-dropdown-aggregation placeholder="[[i18n('documentContentView.datatable.header.modified')]]" data="[[aggregations.dc_modified_agg]]" value="{{column.filterValue}}" multiple=""&amp;gt;
            &amp;lt;/nuxeo-dropdown-aggregation&amp;gt;
          &amp;lt;/template&amp;gt;
          &amp;lt;template&amp;gt;
            &amp;lt;nuxeo-date datetime="[[item.properties.dc:modified]]"&amp;gt;&amp;lt;/nuxeo-date&amp;gt;
          &amp;lt;/template&amp;gt;
        &amp;lt;/nuxeo-data-table-column&amp;gt;
        &amp;lt;nuxeo-data-table-column name="[[i18n('documentContentView.datatable.header.lastContributor')]]" filter-by="dc_last_contributor_agg" field="dc:lastContributor" sort-by="[[_displaySort(document, 'dc:lastContributor')]]" flex="50"&amp;gt;
          &amp;lt;template is="header"&amp;gt;
            &amp;lt;nuxeo-dropdown-aggregation placeholder="[[i18n('documentContentView.datatable.header.lastContributor')]]" data="[[aggregations.dc_last_contributor_agg]]" value="{{column.filterValue}}" multiple=""&amp;gt;
            &amp;lt;/nuxeo-dropdown-aggregation&amp;gt;
          &amp;lt;/template&amp;gt;
          &amp;lt;template&amp;gt;
            &amp;lt;nuxeo-user-tag user="[[item.properties.dc:lastContributor]]"&amp;gt;&amp;lt;/nuxeo-user-tag&amp;gt;
          &amp;lt;/template&amp;gt;
        &amp;lt;/nuxeo-data-table-column&amp;gt;
        &amp;lt;nuxeo-data-table-column name="[[i18n('documentContentView.datatable.header.state')]]" field="currentLifeCycleState" hidden=""&amp;gt;
          &amp;lt;template&amp;gt;&amp;lt;span class="capitalize"&amp;gt;[[formatLifecycleState(item.state)]]&amp;lt;/span&amp;gt;&amp;lt;/template&amp;gt;
        &amp;lt;/nuxeo-data-table-column&amp;gt;
        &amp;lt;nuxeo-data-table-column name="[[i18n('documentContentView.datatable.header.version')]]" field="versionLabel" hidden=""&amp;gt;
          &amp;lt;template&amp;gt;
            [[formatVersion(item)]]
          &amp;lt;/template&amp;gt;
        &amp;lt;/nuxeo-data-table-column&amp;gt;
        &amp;lt;nuxeo-data-table-column name="[[i18n('documentContentView.datatable.header.created')]]" field="dc:created" sort-by="[[_displaySort(document, 'dc:created')]]" flex="50" hidden=""&amp;gt;
          &amp;lt;template&amp;gt;
            &amp;lt;nuxeo-date datetime="[[item.properties.dc:created]]"&amp;gt;&amp;lt;/nuxeo-date&amp;gt;
          &amp;lt;/template&amp;gt;
        &amp;lt;/nuxeo-data-table-column&amp;gt;
        &amp;lt;nuxeo-data-table-column name="[[i18n('documentContentView.datatable.header.author')]]" field="dc:creator" sort-by="[[_displaySort(document, 'dc:creator')]]" hidden=""&amp;gt;
          &amp;lt;template&amp;gt;
            &amp;lt;nuxeo-user-tag user="[[item.properties.dc:creator]]"&amp;gt;&amp;lt;/nuxeo-user-tag&amp;gt;
          &amp;lt;/template&amp;gt;
        &amp;lt;/nuxeo-data-table-column&amp;gt;
        &amp;lt;nuxeo-data-table-column name="[[i18n('documentContentView.datatable.header.nature')]]" field="dc:nature" hidden=""&amp;gt;
          &amp;lt;template&amp;gt;
            &amp;lt;nuxeo-tag hidden$="[[!item.properties.dc:nature]]"&amp;gt;
              [[formatDirectory(item.properties.dc:nature)]]
            &amp;lt;/nuxeo-tag&amp;gt;
          &amp;lt;/template&amp;gt;
        &amp;lt;/nuxeo-data-table-column&amp;gt;
        &amp;lt;nuxeo-data-table-column name="[[i18n('documentContentView.datatable.header.coverage')]]" field="dc:coverage" hidden=""&amp;gt;
          &amp;lt;template&amp;gt;
            &amp;lt;nuxeo-tag hidden$="[[!item.properties.dc:coverage]]"&amp;gt;
              [[formatDirectory(item.properties.dc:coverage)]]
            &amp;lt;/nuxeo-tag&amp;gt;
          &amp;lt;/template&amp;gt;
        &amp;lt;/nuxeo-data-table-column&amp;gt;
        &amp;lt;nuxeo-data-table-column name="[[i18n('documentContentView.datatable.header.subjects')]]" field="dc:subjects" hidden="" flex="60"&amp;gt;
          &amp;lt;template&amp;gt;
            &amp;lt;template is="dom-repeat" items="[[item.properties.dc:subjects]]" as="subject"&amp;gt;
              &amp;lt;nuxeo-tag&amp;gt;[[formatDirectory(subject)]]&amp;lt;/nuxeo-tag&amp;gt;
            &amp;lt;/template&amp;gt;
          &amp;lt;/template&amp;gt;
        &amp;lt;/nuxeo-data-table-column&amp;gt;
      &amp;lt;/nuxeo-data-table&amp;gt;
    &amp;lt;/nuxeo-results&amp;gt;

  &amp;lt;/template&amp;gt;

  &amp;lt;script&amp;gt;
    Polymer({
      is: 'nuxeo-document-content',
      behaviors: [Nuxeo.DocumentContentBehavior],
      properties: {
        /**
         * The parameters to be passed on to `provider`.
         */
        params: {
          type: Object
        },
        /**
         * The name of the page provider to be used.
         */
        provider: {
          type: String,
          value: 'advanced_document_content'
        },
        /**
         * The number of results per page.
         */
        pageSize: {
          type: Number,
          value: 40
        },
        /**
         * List of comma separated values of the document schemas to be returned.
         * All document schemas are returned by default.
         */
        schemas: {
          type: String,
          value: 'dublincore,common,uid,file'
        },
        /**
         * List of content enrichers passed on to `provider`.
         * Already set by default are thumbnail, permissions and highlight.
         */
        enrichers: {
          type: String,
          value: 'thumbnail, permissions'
        },
        /**
         * The headers passed on to `provider`.
         * Already set by default are 'X-NXfetch.document': 'properties' and 'X-NXtranslate.directoryEntry': 'label'.
         */
        headers: {
          type: String,
          value: {'X-NXfetch.document': 'properties', 'X-NXtranslate.directoryEntry': 'label'}
        },
        /**
         * The label to be dislayed when there are no results.
         */
        emptyLabel: String,
        /**
         * The label to be dislayed when there are no results with filtering applied.
         */
        emptyLabelWhenFiltered: String
      },

      _computeParams: function(document) {
        if (document) {
          if (this.hasFacet(document, 'Orderable')) {
            this.$.nxProvider.set('sort', { 'ecm:pos': 'ASC' });
          } else {
            this.$.nxProvider.set('sort', {});
          }
          return { 'ecm_parentId': document.uid, 'ecm_trashed': this.isTrashed(document) }
        }
        return {};
      }
    });
  &amp;lt;/script&amp;gt;

&amp;lt;/dom-module&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 May 2020 09:41:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/formatdirectory-function-print-id-instead-label/m-p/326242#M13243</guid>
      <dc:creator>Ahmad_BenMaallem</dc:creator>
      <dc:date>2020-05-19T09:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: formatDirectory() function print id instead label</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/formatdirectory-function-print-id-instead-label/m-p/326243#M13244</link>
      <description>&lt;P&gt;I had this problem on an infra nuxeo docker with mongodb and elasticsearch and I can't reproduce it in a dev all in one instance&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2020 09:57:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/formatdirectory-function-print-id-instead-label/m-p/326243#M13244</guid>
      <dc:creator>Ahmad_BenMaallem</dc:creator>
      <dc:date>2020-05-19T09:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: formatDirectory() function print id instead label</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/formatdirectory-function-print-id-instead-label/m-p/326244#M13245</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I cannot reproduce your issue with a standard installation, even switching from EN to FR language (see screenshot).&lt;/P&gt;
&lt;P&gt;It doesn't depend on your database, it is pure i18n issue.&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2020 13:31:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/formatdirectory-function-print-id-instead-label/m-p/326244#M13245</guid>
      <dc:creator>Gregory_Carlin</dc:creator>
      <dc:date>2020-05-19T13:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: formatDirectory() function print id instead label</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/formatdirectory-function-print-id-instead-label/m-p/326245#M13246</link>
      <description>&lt;P&gt;I still cannot understand this weird behavior.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 16:29:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/formatdirectory-function-print-id-instead-label/m-p/326245#M13246</guid>
      <dc:creator>Ahmad_BenMaallem</dc:creator>
      <dc:date>2021-01-22T16:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: formatDirectory() function print id instead label</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/formatdirectory-function-print-id-instead-label/m-p/326246#M13247</link>
      <description>&lt;P&gt;The problem is related to ngnix configuration.&lt;/P&gt;
&lt;P&gt;see &lt;A href="https://doc.nuxeo.com/nxdoc/http-and-https-reverse-proxy-configuration/#ngnix-issue" target="test_blank"&gt;https://doc.nuxeo.com/nxdoc/http-and-https-reverse-proxy-configuration/#ngnix-issue&lt;/A&gt; for more details&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 14:50:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/formatdirectory-function-print-id-instead-label/m-p/326246#M13247</guid>
      <dc:creator>Ahmad_BenMaallem</dc:creator>
      <dc:date>2021-01-25T14:50:20Z</dc:date>
    </item>
  </channel>
</rss>

