Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Specifies that an HTML template with EJS scripting is to be used for the user interface of a Rich Display File record format. In this case, the Rich Display json is only used to describe the record format's fields and not the look and feel of the a screen. The look and feel is defined by the HTML template.

The HTML can then be displayed using the display.screen.execute() API or a combination of display.screen.write() and display.screen.read(). Once displayed, the screen can be submitted back to the server with the use of the pui.submit() client-side browser API.

Since Profound.js applications are single page applications, the content should not be a full HTML document and must not include <html>, <title>, and <body> tags. It should only include the body content to render.

Parameters

  1. HTML Template File - the file path is relative to the modules directory. If the path is not qualified, the pathlist is used to search for the HTML template file.
  2. EJS options (optional) - a JavaScript object specifying EJS options as documented on www.ejs.co.

Example

Code Block
languagejavascript
pjs.defineDisplay("mydisplay.json");  // declareDeclare Rich Display
mydisplaypjs.myscreen.usedefineDisplay("myscreenmydisplay.htmljson");

// specifySpecify HTML template for a specific Rich Display record format screen
mydisplay.myscreen.executeuse("myscreen.html");
 
// Show the screen

 

...


mydisplay.myscreen.execute();