Overview
Other MyFaces Extensions
- ExtVal
- Ext-Script
- [Orchestra]
- [Portlet Bridge]
Community
Development
Sponsorship
Your browser does not support iframes
...
As an alternative to a full phase-listener CODI allows to use observers as phase-listener methods.
Example:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
protected void observePreRenderView(@Observes @BeforePhase(PhaseId.RENDER_RESPONSE) PhaseEvent phaseEvent)
{
//...
}
|
If you would like to restrict the invocation to a specific view, it's possible to use the optional @View
annotation.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
@View(DemoPage.class)
public void observePostInvokeApplication(@Observes @AfterPhase(PhaseId.INVOKE_APPLICATION) PhaseEvent event)
{
//...
}
|
For further details about DemoPage.class
please have a look at the view-config section.
Note | ||
---|---|---|
| ||
|
CODI provides an annotation for phase-listeners:
...