The PresenterComponent
class allows Caplin components (widgets that can be embedded
within a layout or opened within a dialog) to be constructed using a caplin.presenter.PresentationModel
and an HTML template.
Attributes | Name and Description |
---|---|
|
caplin.presenter.component.PresenterComponent(String sTemplateId, Object vPresentationModel)
Constructs a new instance of |
Attributes | Name and Description |
---|---|
|
void
addComponentLifecycleListener(caplin.component.ComponentLifecycleEvents oListener)
Add a component life-cycle event listener. |
|
caplin.presenter.PresentationModel
getPresentationModel()
Retrieve the presentation model being displayed by this component. |
|
boolean
isViewAttached()
Returns |
|
void
removeComponentLifecycleListener(caplin.component.ComponentLifecycleEvents oListener)
Remove a previously registered component life-cycle event listener. |
►
caplin.presenter.component.PresenterComponent(String sTemplateId, Object vPresentationModel)
Constructs a new instance of PresenterComponent
.
Instances of PresenterComponent
can also be created from an XML snippet using the following
methods:
String | sTemplateId | The id of a template to render the presentation model with. |
Object | vPresentationModel | A presentation model instance, or the name of a presentation model class that can be constructed. |
►
void
addComponentLifecycleListener(caplin.component.ComponentLifecycleEvents oListener)
Add a component life-cycle event listener.
caplin.component.ComponentLifecycleEvents | oListener | The listener being registered. |
►
caplin.presenter.PresentationModel
getPresentationModel()
Retrieve the presentation model being displayed by this component.
►
boolean
isViewAttached()
Returns true
once caplin.component.ComponentLifecycleEvents#onOpen has
fired, and the element returned from #getElement has been attached to the page.
►
void
removeComponentLifecycleListener(caplin.component.ComponentLifecycleEvents oListener)
Remove a previously registered component life-cycle event listener.
caplin.component.ComponentLifecycleEvents | oListener | The listener being removed. |