1. In the HATS admin console, select the setting ‘Enable Host Simulation Recording’.
The host simulation file that is required later to get the error screen for customization, can be obtained by enabling this option.
2. Click on Ok and then Save.
3. Take a screen capture of the error screen:
a) Run the HATS application and go to the error page.
b) When the file opens, close it and then click on ‘Disconnect’ button.
c) Refresh the project.
d) You will be able to see the host simulation file in the project. Enable it in the connection file instead of using the live connection. The host simulation file gets generated every time the HATS application is run and disconnected.
e) Open the Host terminal and keep pressing Enter.
f) When the strpccmd command gets executed (I gave the command as “Strpco” then “strpccmd pccmd('notepad c:\test.txt')”) below is how the screen looks:
g) Click on the screen capture button to capture the error screen, which must be customized. (Ensure to click on the screen capture when the file is open)
4. Create a custom widget as follows:
--> Right-click on Project --> New HATS --> Widget --> give the name --> Select ‘Input field’ (on next screen) and then click Finish.
--> Write the below code in the class:
(Note: This is a sample code, and can be customized as required.)
5. Steps to run a customized project:
a) Click on the Host terminal and select ‘Customization’.
5. Select a section as shown above, and then click on Next.
6. In the subsequent Next Screen, select the input field and then click on Finish.
b) Open ‘Screen Customization’.
i. Insert the Input field component from Palette.
ii. Select the screen (as shown below) and click on Next.
iii. Select the custom widget and then click on Finish.
c) Uncheck Host simulation from the Connections file.
d) Make sure your customization is selected in the events. Click on Save and then Run the application.
The customized screen appears as below when the application is Run:
Soumyamallappa Surgihalli (Senior Consultant, HCL Software)