12.07.2015 Views

Using Zen Components - InterSystems Documentation

Using Zen Components - InterSystems Documentation

Using Zen Components - InterSystems Documentation

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Model View Controller• Click OK.The new class definition for MyApp.MyOtherPage displays in Studio.9. Take a shortcut by leaving the id as "patientData".You may ignore this shortcut by globally replacing "patientData" with a more meaningful id, for example "employee-Data". However, make sure you change all the instances of this id string in the class, or you will encounter errors atruntime.10. Change the modelClass to "MyApp.EmployeeModel".11.12.Choose Build > Compile or Ctrl-F7 or the icon.Choose View > Web Page or the icon.The following figure shows the resulting form, with the values for record 5. has chosen controls for this form as follows:• for the Name, which is a %String• for the Salary, which is %Numeric• for the Active status, which is a %Boolean6.7.3.1 Controls Based on Data Types determines which type of control to assign to each property in the model based on the data type of that property.The following table match property data types with the controls they generate.Note:If you do not like the choices that makes, you can switch to and bind each control to aproperty individually, using the dataBinding attribute as described in the exercise “Binding a to an ObjectData Model” during “Step 2: Data View.”172 <strong>Using</strong> <strong>Zen</strong> <strong>Components</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!