new Controller(model, view)
The picasso Controller entity.
To create an application controller use the extend static method
Parameters:
Name | Type | Description |
---|---|---|
model |
Picasso.Model | A model to associate to this controller |
view |
Picasso.View | A view to associate to this controller |
- Source:
Members
-
<protected> _model :Picasso.Model
-
Type:
- Source:
-
<protected> _views :Object.<string, Picasso.View>
-
Type:
- Object.<string, Picasso.View>
- Source:
-
validator :Picasso.form.Validator
-
Autowired form validator
Type:
- Source:
Methods
-
<static> extend(constructor) → {function}
-
Extends from a Controller
Parameters:
Name Type Description constructor
function The constructor to extend - Source:
Returns:
The updated constructor- Type
- function
-
construct(model)
-
The Default Controller constructor
Parameters:
Name Type Argument Description model
Picasso.Model Picasso.View <repeatable>
- Source:
-
getModel() → {Picasso.Model|Picasso.Collection}
-
Gets the model associated with this controller
- Source:
Returns:
- Type
- Picasso.Model | Picasso.Collection
-
listen(uiActionName, callback)
-
Register a uiAction (event) to a controller callback
Parameters:
Name Type Description uiActionName
string callback
function - Source:
-
registerView(view)
-
Registers a view to this controller
Parameters:
Name Type Description view
Picasso.View - Source: