Document list - DocumentList

List of generated documents

Component properties

Eximee Designer property
Attribute name in 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 allowing download of all documents. Default value "false". Availability of the functionality depends on the license and may not be available in all deployments.

Show loader while generating document (section Basic properties)

async

Option to show a loader while generating the document. Default value "false".

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

Collapsible document list (Other section)

GesDocumentList.foldable

The 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. Sample appearance of the component on the form

After adding the component from the palette, the remaining configuration (concerning the list of displayed documents) should be set in the Source. Example configuration for the component:

The most important things in the configuration above are to specify:

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

  • documentTemplate="my_template.xsl-" - in quotes 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 form, you should add listening on the DocumentList component e.g. to currentPageMid (or another element that changes on the form when navigating between pages). This will help avoid a situation where changes in data are not reflected in the printout.

circle-exclamation

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

Eximee Designer property
Attribute name in Source
Description

Name of the generator

Generator name

"fop" - if the data feeding the printout comes from the form. "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 component name in the format name-* where the asterisk denotes the highest version of the component (there is also the possibility to specify a specific 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.

circle-info

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

circle-info

Demo form: demoWebview

We attach the service to the component normally 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 alongside the file (if absent, the file name is displayed),

  • source — the source type (values: "externalWeb" or "internalDoc"), a constant that will let the platform know 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. For example, returning document identifiers does not make sense for the desktop channel.

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

Feeding the document list with data from two services

circle-exclamation

The PDF file content encoded in Base64 was passed to the component using two scripts:

  • document_list_example1 - the script takes the input parameter fileName from the form and returns output data for the component.

  • document_list_example2 - the script takes parameters passed from the first script and returns the file content in Base64.

The first service is attached to the component normally 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 alongside the file (if absent, the file name is displayed),

  • fileContent - worth adding if we want to handle more than one file - it allows us to set a file identifier and distinguish files from each other,

  • source - the source type, 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, we 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 take the form parameter1=value&parameter2=value...

Illustration 1. Wiring output parameters

Sample script service codes:

circle-exclamation
circle-info

Demo form: demoDocuments

Last updated

Was this helpful?