Document list - DocumentList

List of generated documents

Component properties

Eximee Designer property
Attribute name in the Source
Description

List of documents

items

List of documents to present

Presentation of the component as a button (Download all documents) (section Basic properties)

allowDownloadingOfAllDocuments

Presentation of the component as a single button enabling download of all documents. Default value "false". Availability of the functionality depends on the license and may not be available in all deployments.

Showing loader while generating the document (section Basic properties)

async

Option that shows a loader while the document is being generated. Default value "false".

The availability of functionality depends on the license and may not be available in all deployments.

Collapsible document list (Other section)

GesDocumentList.foldable

Presentation of the document list is hidden in a collapsible section.

Availability of the functionality depends on the license and may not be available in all deployments

More information about component properties: Common component properties

Illustration 1. Example appearance of the component on the application

After adding the component from the palette, the remaining configuration (regarding the list of displayed documents) should be set in the The number of page columns can be changed after creating the form by editing its definition. In the application edit mode go to thetab. Example configuration for the component:

The most important things in the above configuration are:

  • fileName="my_file.pdf" - in quotes we provide the document name presented on the template.

  • documentTemplate="my_template.xsl-" - in quotes we provide the name of the xsl template in the format name- where the asterisk denotes the highest version of the component.

If the artifact attached in the Document List component is fed with data from the application, you should add a listener on the DocumentList component, e.g. for currentPageMid (or another element that changes on the application when navigating between pages). This will avoid a situation where a change in data is not reflected in the printout.


Configuring the items property to feed the document list with a PDF print generated using an XSL template

Eximee Designer property
Attribute name in the Source
Description

Name of the generator

Generator name

"fop" - if the data feeding the printout comes from the application. "fopFromVariable" - if the data feeding the printout is generated from a variable xmlDocument (in that case the component must also listen to that variable!)

Document name

File name

the document name displayed on the template

Artifact name

Document template

the name of the component in the format name-* where the asterisk denotes the highest version of the component (there is also the possibility to specify a particular version)

Feeding the document list with data from a service

The component can be fed with data from a service attached to the component or to the page.

The availability of functionality depends on the license and may not be available in all deployments.

Demo application: demoWebview

We attach the service to the component in the standard way via EXTERNAL DATA SOURCE (External Data Source). It should return (endpoint names are bolded):

  • documentLink — a list of links or document identifiers that we want to display,

  • fileName — the file name to download,

  • documentLabel — optionally a label displayed next to the file (if absent, the file name is displayed),

  • source — type of source (values: "externalWeb" or "internalDoc"), a flag that tells the platform whether the source system is a CMS ("externalWeb") or Nemo ("internalDoc").

Keep in mind that if the document list is to be presented in channels other than native, the service must return values correlated with the current channel. E.g. returning document identifiers makes no sense for the desktop channel.

Sample service code (Java, OSGI/Charon component):

Feeding the document list with data from two services

We attach the first service to the component in the standard way via EXTERNAL DATA SOURCE (External Data Source). It should return (endpoint names are bolded):

  • fileName - the file name to download,

  • fileMimeType - the file type to download,

  • documentLabel - an optional label displayed next to the file (if absent, the file name is displayed),

  • fileContent - recommended if we want to support more than 1 file - it allows us to set a file identifier and distinguish files from each other,

  • source - the type of source, in this case the value 'externalDocument',

  • documentServiceName - the name of the second service that is called to fetch the file content. If it is a script service, add the prefix script: (without this prefix the system will look for a Charon/OSGI service),

  • documentServiceParams - optional parameters that we want to pass to the service fetching the file content. They have the form parameter1=value&parameter2=value...

Example script service codes:

Demo application: demoDocuments

Last updated

Was this helpful?