Embed into SmartUI (BETA)¶
What is it?¶
SmartUI BWF Integration is an extension package for Beautiful WebForms that allows you to deploy a Beautiful WebForms powered webform into an OTCS SmartUI perspective's tile.
The main purpose of this extension is to allow you to leverage the BWF framework as a primary input mechanism for your next EIM applications. With SmartUI BWF Integration you wont be able to just collect and validate user's input but also to perform complex actions and surface the most relevant business information in highly interactive dashboards.
Extension setup¶
Installing the SmartUI BWF Integration, is a straight forward procedure which consists of just three steps:
-
Unzip the "SmartUI BWF Integration" archive into your
directory -
Run the Import and Upgrade tool and perform an update of the installed library:
- Re-generate the library manifest.
- Import the SmartUI BWF Integration library
-
Move the newly created Content Script Volume:SmartUI BWF Integration:CSFormSnippets:V2AMDEnabled library of Beautiful WebForms widgets under Content Script Volume:CSFormSnippets
Subject to changes
This step won't be probably necessary in the final version of this extension
Create an embeddable WebForms¶
Creating an embeddable webforms is not different from creating any other webform on the system. The steps are:
- Create a Form Template object
- Create a Beautiful WebFomr View view associated to the Form Template created in the previous step
- Using the Beautiful WebForms Form Builder define your form (structure and layout)
The embeddable view template
What makes a Beautiful WebForms view embeddable into the SmartUI is the usage of the SmartUI Embeddable view template (and a the time of writing of the V2AMDEnabled widgets library)
- Create a standard Content Server Form object and associate it to the previously created Form Template and Beautiful WebFomr View
How to publish a Webform into a SmartUI perspective¶
In order to publish a WebForm in a SmartUI perspective's tile you need either:
ModuleSuite extension for SmartUI is installed
- A Content Script object (for managing the server side initialization of the form)
- An AnswerModules ModuleSuite:Content Script Result perspective tile, configured to use the above script as datasource
or
ModuleSuite extension for SmartUI is not installed
- A Content Script object (to mange the server side initialization of the form)
- A WebReport to encapsulate the above script execution
- An Content Intelligence:HTML WebReport perspective tile, configured to use the above script as Webreport as datasource
ModuleSuite extension for SmartUI is installed¶
If the ModuleSuite extension for SmartUI is installed on your system you will be able to leverage the tight integration between ModuleSuite and the OTCS SmartUI in order to WebForms in perspective's tiles.
In this case the minimum Content Script required for managing the server side initialization of the form will be:
def formNode = docman.getNodeByPath("Path:To:Your:Form") form = formNode.getFormInfo() view = formNode.view form.viewParams.uiParentID = params.uiParentID //The perspective current space json([ output:view.renderView(binding, form), widgetConfig:[ reloadCommands:["someCommand"], tileContentClasses:"am-whitebckg", tileLayoutClasses:"am-whitebckg" ] ] )
The configuration of the associated AnswerModules ModuleSuite:Content Script Result will be as simple as:
ModuleSuite extension for SmartUI is not installed¶
If the ModuleSuite extension for SmartUI is not installed on your system you will not be able to leverage the tight integration between ModuleSuite and the OTCS SmartUI in order to WebForms in perspective's tiles, thus you will need an additional WebReport object in order to encapsulate the execution of the Content Script data source.
In this case the minimum Content Script required for managing the server side initialization of the form will be:
gui.gui = false def formNode = docman.getNodeByPath("Path:To:Your:Form") form = formNode.getFormInfo() view = formNode.view out << view.renderView(binding, form)
While the minimum WebReport required to encapsulate the execution of the above script will be:
[LL_REPTAG_'123456' RUNCS /] [// Script ID [LL_WEBREPORT_STARTROW /] [LL_WEBREPORT_ENDROW /]
The configuration of the associated Content Intelligence:HTML WebReport will be as simple as: