Rule Template Views
A rule template view defines a visual presentation of the rule template to make it easy for the WebStudio user to define a business rule.
The Rule template view has three tabs Presentation, HTML File, and Preview to help you create an HTML form for the business rule.
Presentation
<binding id="bindingName"></binding>
Require that all applicants have a minimum income of <binding id="minimumIncome"></binding>, a minimum age of <binding id="minimumAge"></binding>, and restrict the credit type to <binding id="creditType"></binding>
If the binding is associated with a domain model, the WebStudio interface displays the input widget as a drop-down list. Otherwise, an input widget of the appropriate type is displayed, for example, a check box for a boolean field.
You can also apply the styling to the input form by using the CSS class, JavaScript, or inline CSS.
CSS Class Styling
RuleTemplateName_bindingID
.Applicant_PreScreen_minimumAge { background: rgba(255,255,255,0.1); border: none; font-size: 16px; }
Inline CSS
<binding id="minimumIncome", style="height:100px; text-align:center"></binding>
JavaScripts
%RTIName%_bindingID
where, %RTIName% is replaced with the business rule name in the run time
For example, to apply blue color to minimumAge binding, you can use the following code in the script:
document.getElementById("%RTIName%_minimumAge").style.color ="red";
The following sample code displays all three method of styling applied to the presentation text:
<head> <style> .Applicant_PreScreen_minimumAge{ height : 100px; text-align : center; } </style> <script> try { document.getElementById("%RTIName%_minimumIncome").style.color= "blue" document.getElementById("%RTIName%_minimumAge").style.color ="red"; } catch(e){ console.log(e); } </script> </head> <body> Require that all applicants have a minimum income of <binding id="minimumIncome" ,style="height:100px; text-align:center"></binding>, a minimum age of <binding id="minimumAge"></binding>, and restrict the credit type to <binding id="creditType"></binding>, testing area for string <binding id="testingTextArea"></binding>, testing check box <binding id="testBoolean"></binding> and testing date <binding id="testDate"></binding> . </body>"/>