CustomFormButtons.inc is a good example to exemplify the addition of custom code within the test application presented in this document. In this example, we will be adding a button to navigate to a specific form ‘Supplier Info’.
Adding the custom code requires adding an /(include..) tag at an appropriate place, then creating the referenced include file with the custom code. This is similar to adding an Edit Point in PLEX to add inherited code.
In Eclipse look for CustomFormButtons.inc and add the code for ‘Supplier info’ button:
The form is therefore going to include a new button ‘Supplier Info’ which will display in the region where ‘Product Info’. ‘Custom Demo’, and ‘Customer Info’ buttons exist.
After we have the code add an /(include..) tag at an appropriate place:
Then run the Application Generator:
When the application is up and running:
- Click on Application Settings and then click in apply:
- Click on Application Template, select Gen Folder, and Generate Application. Wait for the message that all was generated succesfully:
Now right click and refresh the web project:
Run tomcat server:
Note how the new button is displayed and can be used to navigate to the specified form: