Skip to main content

This version of the product is no longer supported, and this documentation is no longer updated regularly. See the latest version of this content.Opens in a new tab

ZENMVC.CRUDTemplate

abstract class ZENMVC.CRUDTemplate extends %ZEN.Component.page

Example of a CRUD (create, read, update, delete) base class.
This class provides a basic template for the look and feel of a series of data entry pages.
To use:
  1. Create a subclass of this template class,
  2. Set the MODELCLASS parameter to the name of your DataModel class,
  3. Set the LOOKUPTABLE parameter to the SQL table name used to show the pick list of objects,
  4. Set the LOOKUPCOLUMN parameter (default is "Name") to the SQL column name used in the pick list

Property Inventory

Method Inventory

Parameters

parameter APPLICATION = ZENMVC.MVCApplication;
Class name of application this page belongs to.
parameter DOMAIN;
Domain used for localization.
parameter LOOKUPCOLUMN = Name;
SQL name of column to display withn the lookup table.
parameter LOOKUPTABLE;
SQL name of table that provides contents of the lookup table.
parameter MODELCLASS;
Name of MVC DataModel class that supplies data for the form.
parameter PAGENAME;
Displayed name of this page.

Properties

property LookupColumn as %String [ InitialExpression = ..#LOOKUPCOLUMN ];
Holds the name of the lookup column. This should be the name of a column within the lookup table.
Property methods: LookupColumnDisplayToLogical(), LookupColumnGet(), LookupColumnIsValid(), LookupColumnLogicalToDisplay(), LookupColumnLogicalToOdbc(), LookupColumnNormalize(), LookupColumnSet()
property LookupTable as %String [ InitialExpression = ..#LOOKUPTABLE ];
Holds the name of the lookup table. This should be the name of an SQL table.
Property methods: LookupTableDisplayToLogical(), LookupTableGet(), LookupTableIsValid(), LookupTableLogicalToDisplay(), LookupTableLogicalToOdbc(), LookupTableNormalize(), LookupTableSet()
property ModelClass as %String [ InitialExpression = ..#MODELCLASS ];
Holds the name of the model class. This should be set to the name of a DataModel class.
Property methods: ModelClassDisplayToLogical(), ModelClassGet(), ModelClassIsValid(), ModelClassLogicalToDisplay(), ModelClassLogicalToOdbc(), ModelClassNormalize(), ModelClassSet()
property ObjectID as %String (ZENURL = "ID");
ID of object to edit. This can be passed in as a URL parameter.
Property methods: ObjectIDDisplayToLogical(), ObjectIDGet(), ObjectIDIsValid(), ObjectIDLogicalToDisplay(), ObjectIDLogicalToOdbc(), ObjectIDNormalize(), ObjectIDSet()

Methods

clientmethod cancelItem() [ Language = javascript ]
Cancel current edit.
clientmethod deleteItem() [ Language = javascript ]
Delete current item from database
clientmethod newItem() [ Language = javascript ]
Create a new item to edit.
clientmethod rowSelected(table, which) [ Language = javascript ]
Row selected in pick list; update controller. which indicates how this event was fired.
clientmethod saveItem() [ Language = javascript ]
clientmethod showObject(id) [ Language = javascript ]
Load the object with the given id into the form.

Inherited Members

Inherited Properties

Inherited Methods

Subclasses

FeedbackOpens in a new tab