As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
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
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
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.
Ask and you shall receive. Implementing contrib on github