>>>1) RI documentation says that conversation bean can be acccessed from EL
JSR-299 says that Conversation instance must be accessed with EL
name(Actually this is the name of Conversation Bean) *
"javax.enterprise.context.conversation*" not with *"conversation"*. This
name is valid according to the section 2.5 Bean EL Names. Currently EL
implementation does not support "dot" notation names. If we try to use it to
get conversation, it throws exception that says "javax" not found. I do not
know how to handles this requirement. It needs contribution :)

>>>Others
These are extensions that are not related with OWB. I think that Mark has
started a some extension project for MyFaces.

--Gurkan


2010/2/23 Martin Koci <[email protected]>

> Hi,
>
> 1) RI documentation says that conversation bean can be acccessed from EL
> with name "
> conversation":
> http://docs.jboss.org/weld/reference/1.0.1-CR2/en-US/html/scopescontexts.html#d0e1882(but
>  is it mentioned in spec?)
>
> This is probably not implemented in OWB. Simple hack in WebBeansELresolver
> solves it:
>
> if ("conversation".equals(property)) {
>                context.setPropertyResolved(true);
>                return
> manager.getInstanceByType(javax.enterprise.context.Conversation.class);
> }
>
> but this is only first try.
>
> 2) accessing conversation scope as java.util.Map from EL
>
> JSF currently has implicit objects sessionScope, requestScope, viewScope
>  ... It would be nice if OWB can expose current conversation context as map
> too - see example below.
>
>
> 3) JSF 2.0 support custom scopes:
> http://blogs.sun.com/rlubke/entry/custom_managed_bean_scopes.
> Maybe exposing conversation context as custom scope can be useful for
> existing applications.
>
>
> 4) uses cases for conversation: I checked all our applications and the most
> common use case is (unsurprisingly):
> - start conversation
> - put some objects into conversation scope
> - start dialog/conversation with user
> - user ends dialog
> - end conversation
>
> following example comes from trinidad:
>
> <h:commandButton action="dialog:textEdit"
> returnListener="#{bean.processReturn}">
>        <f:setPropertyActionListener value="a value passed to dialog"
> target="#{pageFlowScope.valueKey}" />
>        <f:setPropertyActionListener value="other value passed to dialog"
> target="#{pageFlowScope.otherValueKey}" />
> </h:commandButton>
>
>
> with CDI (and 1 and 2 implemented) it looks:
>
> <h:commandButton action="dialog:textEdit"
> returnListener="#{conversation.end()}">
>        <f:actionListener binding="conversation.start()" />
>        <f:setPropertyActionListener value="a value passed to dialog"
> target="#{conversationScope.valueKey}" />
>        <f:setPropertyActionListener value="other value passed to dialog"
> target="#{conversationScope.otherValueKey}" />
> </h:commandButton>
>
> What do you think? I'm not sure what belongs to CDI implementation and what
> should be a separate extension.
>
>
> Regards,
>
> Martin Kočí
>
>
>
>
>
>
>


-- 
Gurkan Erdogdu
http://gurkanerdogdu.blogspot.com

Reply via email to