Class zwt.ui.TemplateView
Extends
zwt.Object.
A template view is used to display structured data: a model, into an HTML element using a zwt.tpl.Transformer object.
This widget has more or less the same behavior as the zwt.ui.HTML widget. The HTML content is rendered using the transformer when the model is set, the widget redrawn or when the transformer is set.
A typical use of this widget would be to set the model then modify it and call the zwt.ui.TemplateView#render method.
Defined in: TemplateView.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Construct a template view.
|
Method Attributes | Method Name and Description |
---|---|
getModel()
Return the model associate to the template view.
|
|
Return the transformer associated to the template view.
|
|
render()
Render the model in the template view using the transformer.
|
|
setModel(Object_model)
Set the model to render in the template view.
|
|
setTransformer(zwt_tpl_Transformer_transformer)
Set the transformer used to render the model in the template view.
|
Class Detail
zwt.ui.TemplateView()
Construct a template view.
Author: Jeremy KUHN.
Author: Jeremy KUHN.
- See:
- zwt.tpl.Transformer
Method Detail
{Object}
getModel()
Return the model associate to the template view.
- Returns:
- A JSON object
{zwt.tpl.Transformer}
getTransformer()
Return the transformer associated to the template view.
- Returns:
- A transformer instance
render()
Render the model in the template view using the transformer.
setModel(Object_model)
Set the model to render in the template view.
This method triggers the rendering of the template view.
- Parameters:
- {Object} Object_model
- The model to set
setTransformer(zwt_tpl_Transformer_transformer)
Set the transformer used to render the model in the template view.
This method triggers the rendering of the template view.
- Parameters:
- {zwt.tpl.Transformer} zwt_tpl_Transformer_transformer
- The transformer to set