Hi folks!

I'm working on the Apache Implementation of JSR-299 OpenWebBeans and I'm 
looking forward to add more support for JSF-2 via providing portable CDI 
extensions.

I already implemented an Extension for the javax.faces.beans.ViewScoped in our 
openwebbeans-jsf module, but honestly think that this is not the right place, 
because it is really CDI-container independent. Plus, I have a few other ideas 
which may serve the Apache JSF community.

So, because those extensions are both JSF container independent and also CDI 
container independent, what about adding them to tomahawk-2 ?

The extensions I have in mind are

1.) moving the CDI support for the @ViewScoped as mentioned above from 
openwebbeans-jsf to tomahawk.

2.) a new @ViewConversationScoped. Usually @ConversationScoped beans have the 
same lifecycle as @RequestScoped beans if no Conversation#begin() will get 
called in an action. Which means that one will always get a fresh instance of a 
@ConversationScoped bean if e.g. the validation fails before the begin() can be 
called. The lifecycle of @ViewConversationScoped bean would begin with the 
first view invocation and end at the end of the request in which the 
conversation gets closed.

3.) a new @ViewRequestScoped. This is basically the same as @ViewScoped, but 
the contextual instance will stay available until the end of the request and 
will not get destroyed after the action continues on a return "nextPage";. This 
may be tricky if the following view accesses the same bean as the previous view 
- any suggestions on how this should behave are welcome.

wdyt?

a) is tomahawk the right place (at least for 2 and 3)?
b) would the functionality be useful for JSF-2 developers?


txs and LieGrue,
strub


      

Reply via email to