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.

ControllerFigure 6–3: Data Controller and Data View Classes6.2.1 To provide a data controller for a <strong>Zen</strong> page, simply add a or a subclass of %ZEN.Auxiliary.dataControllerinside the . The component appears in XData Contents along with other components, but it is notvisible onscreen. It acts as an intermediary between a data model and one or more data views.The following example defines a that opens an instance of the class MyApp.MyModel using an id valueof 1. A is bound to the by setting the controllerId property to the id of the. This causes the to display a form that provides a <strong>Zen</strong> control for every property within themodelClass.6.2.2 AttributesWhen you place a within a <strong>Zen</strong> , you can assign it the following attributes:Attribute<strong>Zen</strong> componentattributesDescriptionA has the same general-purpose attributes as any <strong>Zen</strong> component.For descriptions, see these sections:• “Behavior” in the “<strong>Zen</strong> Component Concepts” chapter of <strong>Using</strong> <strong>Zen</strong>• “Component Style Attributes” in the “<strong>Zen</strong> Style” chapter of <strong>Using</strong> <strong>Zen</strong>The id attribute is required for . name and condition may also apply. A is not visible, so visual style attributes do not apply.alertOnErrorIf true, the displays an alert box when it encounters errors while invokingserver-side functions, such as when saving or deleting. The default is true.alertOnError has the underlying data type %ZEN.Datatype.boolean. It has the value "true"or "false" in XData Contents, 1 or 0 in server-side code, true or false in client-side code.<strong>Using</strong> <strong>Zen</strong> <strong>Components</strong> 155

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

Saved successfully!

Ooh no, something went wrong!