-
Type: Improvement
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 9.10
-
Fix Version/s: 10.3
-
Component/s: Web UI
-
Release Notes Summary:Allows to override/extend fetch properties and enrichers used to browse a document
-
Epic Link:
-
Tags:
-
Browser:
-
Upgrade notes:
-
Sprint:nxGang Sprint 10.3.3, nxGang Sprint 10.3.4, nxGang Sprint 10.3.5
-
Story Points:1
Today, nuxeo-app.html hardcodes the following:
<nuxeo-document id="doc" doc-id="[[docId]]" doc-path="[[docPath]]" response="{{currentDocument}}" enrichers="firstAccessibleAncestor, permissions, breadcrumb, preview, favorites, subscribedNotifications, thumbnail, renditions, pendingTasks, runnableWorkflows, runningWorkflows, collections, audit, subtypes, tags" headers='{"X-NXfetch.document": "lock,properties", "X-NXfetch.directoryEntry": "parent", "X-NXtranslate.directoryEntry": "label", "X-NXfetch.task": "actors"}'> </nuxeo-document>
the X-NXfetch.document": "lock,properties http header is to be able to have all the possible document metadata to be rendered when browsing a given document out of the box.
However in the case of a document having thousands of metadata with a lot resolving to user/group, other document, vocabulary entities, it won't scale.
We should be able to override this.
A possible and simple way of doing would just to move these default values to an element property and people will be able to narrow the schemas and properties to be fetched as well as enrichers to be used when seriliazing the document by overriding the index.jsp with:
<nuxeo-app enrichers="xxx,yyy,etc." headers='{"X-NXfetch.document": "lock,dc:lastContributor", "X-NXfetch.directoryEntry": "parent", "X-NXtranslate.directoryEntry": "label", "X-NXfetch.task": "actors"}' base-url="<%= request.getRequestURI() %>" product-name="<%= Framework.getProperty(Environment.PRODUCT_NAME) %>" unresolved> <div id="sidebar"> <img src="themes/default/logo.png"> </div> <div id="container"> <div id="toolbar"> </div> <span id="loading"></span> </div> </nuxeo-app>
But overriding index.jsp is not really the best advice we could give.
Maybe introducing a property and do the following
headers="<%= Framework.getProperty("org.nuxeo.web.ui.app.headers") %>"
would be nicer?
EDIT
Since required headers and enrichers may actually be dynamically computed depending on the type of the document to be loaded/browsed, it would actually make more sense these values should be defined by doc layouts but unfortunately, doc layouts are not able to outject this kind of info up to nuxeo-app :/
- depends on
-
NXP-25678 Evolve ConfigurationService to support list property and namespace
- Resolved
- is related to
-
NXP-26520 Fix fetch property config override regression
- Resolved
-
NXDOC-1588 Add a Web UI doc about performance tweaks to promote scalability
- Resolved
- is required by
-
NXP-25702 Add WOPI WebUI module
- Resolved
-
NXP-21249 Add a way to open documents in Google Drive
- Resolved
-
NXP-26038 Make ConfigurationService.getPropertiesAsJson() support nested properties
- Resolved