TWiki
>
WebXEO Web
>
XeoPrimer
>
XeoPrimerWebComponentViewerEvents
(revision 2) (raw view)
Edit
Attach
Tags:
tag this topic
create new tag
,
view all tags
-- Main.PedroRio - 30 Mar 2011 ---+ XEO Web Components - Viewer Events Viewer Events is a mechanism that allows to interact at the bean level during the life-cycle of a server request. The request life-cyle is depicted in figure 1. There are several points in the request life-cycle in which you can interact, the list is in the following table: | *Property* | *Description* | | onCreateViewPhase | Occurs the first time a viewer is displayed | | onRestoreViewPhase | Occurs whenever a request is made to the viewer and it has already been initialized | | beforeApplyRequestValuesPhase | Occurs before applying request parameters to the components | | afterApplyRequestValuesPhase | Occurs after applying request parameters to the component | | beforeUpdateModelPhase | Occurs before applying component values to beans/XEO Model instances | | afterUpdateModelPhase | Occurs after applying component values to beans/XEO Model instances | | beforeRenderPhase | Occurs before rendering the current view | | afterRenderPhase | Occurs after rendering the current view | All these properties (events) accept an EL Expression to a method with the following signature: <verbatim>public void myEventMethod( PhaseEvent e);</verbatim> Let's see an example: *Viewer Declaration*: <verbatim><xvw:viewer beanClass='MyBean' beanId='viewBean' afterUpdateModelPhase= '#{viewBean.afterUpdateModel}' afterRenderPhase= '#{viewBean.phaseEvent}' ></verbatim> *Bean*: <verbatim>public class MyBean { public void afterUpdateModel( PhaseEvent e ) { System.out.println( "After update Model!!" ); } public void afterRender( PhaseEvent e ) { System.out.println( "Before update Model!!" ); } }</verbatim> The life-cycle of a server request is depicted in figure 1, bellow: <img width="1072" alt="EsquemaUI2.0.png" src="%PUBURLPATH%/WebITDS/XEOECCXEOWebComponents/EsquemaUI2.0.png" height="671" /> __Figure 1 - The life-cycle of a server request__ _
Edit
|
Attach
|
P
rint version
|
H
istory
:
r4
<
r3
<
r2
<
r1
|
B
acklinks
|
V
iew topic
|
Raw edit
|
More topic actions...
Topic revision: r2 - 2011-03-31
-
PedroRio
WebXEO
XEO Primer
-
Instalation
-
Introduction
-
Concepts
-
Architecture
-
XEO Library
-
Deploy to EAR
-
PreferenceStore
XEO - Core
-
XEO Model Reference
-
Security
-
Java API
-
BOL
-
XEOQL (BOQL)
-
Administrating
-
Background Tasks
-
boConfig.xml
-
Web.xml
-
Known Issues
-
XEO Flags
XEO - XWC
- Web Components
- Java Samples
- Custom Components
- Component Plugins
- Internationalization
- Viewer Events
- Value Change Listeners
- XUIServlet
- XeoLocalization
- XvwTemplates
Create New Topic
WebXEO Web
No permission to view
TWiki.WebTopBar
No permission to view
TWiki.WebBottomBar