Skip to content

Hello World! Part Three

This Walkthrough Tutorial will show you how to create an Application from scratch. This part assumes that you already read Part One & Part Two

In this part we will see how to:

  1. Extend the Domain model with a new class associated with the existing
  2. Use the wizard to bootstrap Master/Detail Forms
  3. At an existing form add a dropdown where user can select the new class

Create a Class

At ProductBO:

  • Create one more class
  • Name the class Category
  • Insert Name as attribute (data type: string)

Create association between classes

  • Hover the Product class close to borders
  • When the cursor turns into a cross click and drag the line until it reaches class Category
  • A modal is displayed

Configure Association Properties as:

  • A Product can have zero or one category
  • Many Products can have the same category
  • On delete of a product, the related category is disassociated
  • A category cannot be deleted if there is a related product
  • Click OK

BOModel

BOModel

Create Category master & detail forms

Use wizard to bootstrap Master & Detail forms

BOModel

Open ProductForm

  • Select Model on the right
  • Right click at property Product
  • Select Add Related Classes

BOModel

  • A modal is displayed
  • Select Category class
  • Click OK

BOModel

  • From Toolbox find the Dropdown control and insert at the canvas
  • Select it

From Properties, at DATA section:

  • Bind the dropdown to Category

BOModel

  • Create a dataset (from Category class & the operation GetAll)

BOModel

  • Click on the Display & Value Options

BOModel

A modal is displayed:

  • Select Name for Display Member
  • Select Category for Value Member
  • Click OK

BOModel

  • Save, validate and build the application

Speed up this process using Wizard

At Model

  • Navigate to Category
  • Drag & Drop it inside the Body

BOModel

On drop, select as Dropdown

BOModel

Select the dropdown. As you xan notice at Properties wizard created everything needed

Remember

Remember to save, validate and build the application