>I don't get it working :-(. > >Although i removed the tiger annotations and trying to use the >faces-config.xml, prerender and preprocess aren't called, and even >sometimes destroy does not get called although init was called ( really >a break of contract as this should be called ). >So i've got a question about implementation details. > >The prerender method and the others has to have to be registered as >phase listener, am i right? >So maybe someone can make some short details, at which shale "points" or >JSF ones i could look for if the listener is registered or not. >If it is done in some other way - i don't know in detail where to look >for at the moment - some hints would be nice, i'll really want to debug >this. >
This view controller is an orchestration of several moving parts. It uses some new listeners available in servlet 2.4. So, make sure your web container is 2.4 compliant. http://svn.apache.org/viewvc/shale/framework/trunk/shale-view/src/main/java/org/apache/shale/view/faces/LifecycleListener.java?view=markup The listeners are registered from a TLD within the META-INF folder of the shale-view.jar. http://svn.apache.org/viewvc/shale/framework/trunk/shale-view/src/main/resources/META-INF/taglib.tld?view=markup The init and destroy callback methods are invoked on a ViewController from events fired by the web container. When request scoped objects are added or removed, the view controller callback methods are invoked if the object being acted on extends AbstractRequestBean or implements the ViewController interface. These events are controlled by the servlet containers lifecycle as it handles request scoped beans. The destroy is invoked when the container is cleaning up from handling the response lifecycle. The init is invoked when the bean is added to request scope. This is triggered by the managed bean container facility when a managed bean is needed. The managed bean is instantiated by a custom view handler that adds to the decorated view handler. This view handler is registered in the faces-config.xml along with the phase listener. http://svn.apache.org/viewvc/shale/framework/trunk/shale-view/src/main/java/org/apache/shale/view/faces/ViewViewHandler.java?view=markup The createView method of the view handler is overridden for the purpose of making sure the ViewController bean is instantiated by the managed bean facility. The viewId is used to determine the name of the managed bean. This is done by the DefaultViewControllerMapper that is also configurable (you can plug in your own implementation). http://svn.apache.org/viewvc/shale/framework/trunk/shale-view/src/main/java/org/apache/shale/view/impl/DefaultViewControllerMapper.java?view=markup The viewid to managed bean name mapping is determined and the bean is created using the application's variable resolver. If there is a managed bean registered by that name, it is instantiated and added to request scope. This in turn fires the ServletRequestAttributeListener that we talked about above that invokes the init method on the ViewController. The prerender and preproces methods on the ViewController are invoked from the JSF PhaseListener that is registered using the faces-config.xml within the META-INF directory of the shale-view.jar. http://svn.apache.org/viewvc/shale/framework/trunk/shale-view/src/main/resources/META-INF/faces-config.xml?view=markup So, there are several faces and servlet extensions that are utilized to add the additional view controller events. >Torsten Gary
--- Begin Message ---I don't get it working :-(. Although i removed the tiger annotations and trying to use the faces-config.xml, prerender and preprocess aren't called, and even sometimes destroy does not get called although init was called ( really a break of contract as this should be called ). So i've got a question about implementation details. The prerender method and the others has to have to be registered as phase listener, am i right? So maybe someone can make some short details, at which shale "points" or JSF ones i could look for if the listener is registered or not. If it is done in some other way - i don't know in detail where to look for at the moment - some hints would be nice, i'll really want to debug this. Torsten Am Montag, den 20.11.2006, 14:11 -0800 schrieb Craig McClanahan: > > * Download and d
smime.p7s
Description: S/MIME cryptographic signature
--- End Message ---
