how to display an documentValue object content in form bonita community 6.4.2

how to display an documentValue object content in form
version : bonita community 6.4.2

Hello,

If you are referring to bonita document object, this is one way to display it.

  1. Define html widget in form
  2. Define data for the widget with href link ex: href=“formsDocumentDownload?document=” + doc.getId()
    This will display the document link in the form.

Can you be a bit more specific about what you want? Is it the document name or the document content you want to display? What type of document?

is a document content that i want to display and the type is pdf or txt
thank you

Still not really sure, do you want the PDF file to open in a browser window so people can read the document?

If so then the following code will work provided your file is in the filesystem. I use this a lot.

var docLocation = '../downloads/doc.pdf'; window.open(docLocation,"resizeable,scrollbar");

Your browser will also need configuring to have the necessary plugin installed, for example Adobe Reader.