Business Console 10.7 | webMethods Business Console Documentation | Developing Gadgets for Business Console | Importing and Enhancing AgileApps Forms | Example: Use Case to Add New Business Logic
 
Example: Use Case to Add New Business Logic
The example use case lists instructions on how to add a new JavaScript function in the aa_view_partial.xhtml file to enhance the business logic.
*To add a new JavaScript function AgileApps Cloud using Software AG Designer
1. Launch the Software AG Designer.
2. In the Solutions tab, navigate to the imported <gadget_name_project> > Scripts > aa_view_directive.js file. This file contains all the business logic.
3. Open the aa_view_directive.js file to edit it.
4. In the defineScope() function, add a custom function as follows:
$scope.custom=function(){
$scope._Data.customMessage = "hello world"
}
5. Navigate to the <gadget_name_project> > Views > aa_view_partial.xhtml file. This file contains all the UI fields pertaining to AgileApps Cloud.
6. Add the new UI fields and controls to bind the function(custom) and model(_Data) variable (customMessage) created previously.
The example code snippet is as follows:
<div class="form-group" style="margin-top: 10px;">
<button data-ng-click='custonFunc()'>Click Here</button>
<div class="col-sm-6 col-md-6">
<input type='text' class='bc-newci-text form-control'
data-ng-model='_Data.customMessage'/>
</div>
</div>