-
Notifications
You must be signed in to change notification settings - Fork 0
Views
In Cosmo, a View is an element that can be send to a client (browser) to represent anything representable with HTML. There are three types of views. A view is created using a combination of controls (implementations of Cosmo.UI.Controls.Control
).
Currently there are three distinct types of views, each one created for specific representation of data:
To create a view you need to implement one of the three types of views:
-
Cosmo.UI.PageView
for a standard page -
Cosmo.UI.ModalView
for a modal views -
Cosmo.UI.PartialView
for a partial views included in a standard page
To implement a view, you need to understand the view life-cycle. When a browser calls a view, the following calls will be performed:
This is the first method called and usually the page construction is placed here.
If a request for the view is a postback from a form (FormControl
), this method is called and via parameters the form with the data received is provided.