cancel
Showing results for 
Search instead for 
Did you mean: 

Paging in vocabulary editor?

patrek
Star Contributor
Star Contributor

Is it possible to do paging in the vocabulary editor?

For one client, the vocabulary is huge and sometimes create a timeout (firefox) while loading.

Is there a way to define the vocabulary so there is paging in the editor?

Thanks,

Patrick

5 REPLIES 5

Anahide_Tchertc
Elite Collaborator
Elite Collaborator

Hi,

There's currently no easy way to do that as directory API does not currently support pagination, see NXP-5301.

And the page displaying directory entries is not optimized: it was the first one designed to use layouts for listings, and it would need an upgrade to rely on content views.

But you could gain something (maybe enough) by overriding the template at /directory/view_directory.xhtml to implement pseudo-pagination for big vocabularies, at least at the UI level: the rendered HTML page would be lighter. Especially the nxu:repeat tag can be costly, and it should not be needed anymore for layouts rendering (using a c:forEach tag should be enough).

I noted the patch for NXP-9668, that replaces nxu

simpoir_
Champ on-the-rise
Champ on-the-rise

For very large vocabulary I had success by replacing the nxu repeat in view_directory.xhtml template with an a4j:repeat and rich:datascroller like follows. I does not makes database query faster, but should shorten considerably page loading time and works well for ~2000 entries vocabularies.

<a4j:form rendered="#{!empty directoryUIActions.currentDirectoryEntries}"
          id="viewDirectoryEntries">

  <rich:datascroller align="center" for="directoryData"
                     reRender="viewDirectoryEntries"
                     renderIfSinglePage="false" />
  <table class="dataOutput">
    <tbody>
      <a4j:repeat id="directoryData" rows="10" var="entry" rowKeyVar="index"
                  value="#{directoryUIActions.currentDirectoryEntries}">
        <nxl:layout name="#{currentVoc.layout}" mode="view_list"
                    value="#{entry}" />
      </a4j:repeat>
    </tbody>
  </table>
  <rich:datascroller align="center" for="directoryData"
                     reRender="viewDirectoryEntries"
                     renderIfSinglePage="false" />

</a4j:form>

Thanks this is interesting waiting the clean implementation.

simpoir_
Champ on-the-rise
Champ on-the-rise

Ask and you shall receive. Implementing contrib on github

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.