Step 3 Define Filters and Command Handlers for Employees

VLF Windows Application Development

Step 3. Define Filters and Command Handlers for Employees

VFW030 – Create a Prototype

In this step you will define two filters for Employees and make a few basic enhancements to the prototype application.

1.  Open the Business Object Properties dialog for Employees.

     To do this, select the Employees business object on the Navigation panel and use the context menu (that is, the right mouse menu) to select the Properties dialog.

     Alternatively, the Properties dialog will open if you double click on the business object in the Navigation panel.

     The Properties dialog consists of a number of tab sheets which enable you to define and refine your application design. The Framework contains literally thousands of features which you enable or disable or refine, using one of these property tab sheets.

2.  On the Identification tab, change the User Object Name / Type to III_EMPLOYEES. A business object named EMPLOYEES already exists because it is part of the shipped demonstration applications.

     Note: The Verify Name button will check whether your User Object Name is unique within the framework. That is, not already used for an existing business object.

3.  Select the Icons tab sheet and select any suitable icon for the Employees business object.

4.  Select the Filters tab sheet. This tab enables you to define one or more filter which may be used with this business object. The Filters tab sheet itself contains three more tab sheets.

a.  The Instant Prototyping Assistant creates one filter for each business object. Change the Caption for the default filter (New Filter) to By Name.

b.  Select the Icons tab and select any suitable icon for the By Name filter.

5.  Add a new filter by clicking the New button.

a.  Change the new filter's Caption to By Location.

b.  Select the Icons tab sheet and give the By Location filter any suitable icon.

6.  You will now refine the Command Handler definitions for the Employees business object.

     Select the Commands Enabled tab sheet. Note that its Enabled column contains the actions you defined in the Instant Prototyping Assistant.

a.  Select the New command in the Enabled column.

     The information shown on the right hand side now contains the definition of the New command, as it will be used for the Employees business object.

     Notice that in the Choose Command Type group box, the Business Object Command is selected. This is because the New command does not depend on selection from the instance list.
Using the New command would usually add a new entry to the instance list.

7.  You will now specify how business object commands are displayed.

     Select the Command Display tab sheet.
The property Object Command Presentation defines how business object commands are displayed.

a.  Select Separate Stay on Top Window from the drop down.

b.  Click Close on the Please Note dialog which will appear.
You will make further changes before you Save and Restart the Framework.

8.  Click on the Commands Enabled tab sheet and click the Command Definitions button. Review the icons shown against each of the Enabled commands. You may find that some of your commands share the same icon. To change a command's icon, do the following:

a.  Click the Command Definitions button (bottom right).

b.  Select the required command in the list on the left hand side.

c.  Select the Bitmap and Icons tab sheets and select a suitable icon. The change is saved automatically.

d.  Use the Scrollbar on the Bitmaps panel to select the same bitmap. This will ensure the instance list toolbar contains the same image as the command handler tab sheet.

Note: Do not spend time changing Icons and Bitmaps for all your Employee Commands. These could be changed at any time during development.

     Hint: Clicking on the slider and using the cursor keys to scroll through the bitmaps provides more control than dragging the mouse.

9.  Close the Business Object properties dialog. Save and Restart the Framework.

10. When the Framework has re-started, select your iii HR Application, followed by the Employees business object.

11. Confirm that Employees now has two filters.

a.  Click the Emulate Search button and select an Employee.

b.  Notice that the toolbar above the instance list contains your command handler icons.

c.  Notice that all your instance list command handlers have a tab sheet at the bottom of the Framework, with the appropriate icon.

12. Click in one of your Employee filter panels. Notice that these can be edited. The prototype panel is an HTML line editor. When adding text or images, use the Enter key to move to a new line.

a.  Delete the existing text, add suitable text.

b.  Click on the Images Palette button to display a dialog which enables images to be drag and dropped onto the filter panel.

  • Your objective is to make each panel "realistic" so that the prototype can be reviewed with and end user.
  • Restrict your changes to one panel. In a real project you would enhance the appearance of every filter and command handler panel.

13. Save and Restart the Framework.

14. Open the Employees business object properties dialog. Select the Instance List / Relations tab sheet.

     A grid defines how the instance list columns are used and displayed. The third column Caption defines the column heading for columns shown in the instance list.

15. Change the Captions to Number and Full Name.

     Note: The columns to be displayed are defined by giving them a Sequence number.

     In your own application you would probably enable additional columns. Your filters must then be changed to populate the additional columns.

16. Close the Business Object properties dialog.