Implement Abilities to Control the Code Generation Process to Control the Application Behavior

Implement Abilities to Control the Code Generation Process to Control the Application Behavior


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.

Eclipse

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:

  1. Click on Application Settings and then click in apply:

  2. 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:


Test Changes

Note how the new button is displayed and can be used to navigate to the specified form: