Skip to content

HowToViewApplicationStart

Carlo Barazzetta edited this page Jan 20, 2017 · 1 revision

How to open a View or a Form at application start

If you want an application to start with a View or a Form already opened, you have to customize your homeView

View

For example HelloKitto starts with Girls and Dolls views opened:

# view home.yaml

CenterView:
  Controller: TabPanel
    Border: True
    SubViews:
      View: Girls
      View: Dolls

Form

The code is similar to the view case, but you have to guarantee that the form can open: you have to use filters on model in order to obtain just one record.

Example from a real project using a custom View Form:

ModelName: Employee
....
DefaultFilter: {Q}AD_USER_NAME =  '%Auth:USER_NAME%'
# view home.yaml

CenterView:
  Controller: TabPanel
    Border: True
    SubViews:
      View: EmployeeForm
# view EmployeeForm.yaml
Type: Data
DisplayLabel: Personal Data
Controller: Form
  Operation: Edit

MainTable:
  Model: Employee
  Controller:
    PopupWindow:
      Width: 800
      Height: 640
    Form:
      Layout: Employee_Form
Clone this wiki locally