Skip to content

HowToViewApplicationStart

iraichi edited this page Apr 24, 2015 · 6 revisions

How to open a View or a Form at application start

if you want that an application starts 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