Back in business.

I am currently working on a patch for OWB-171. Besides some cleanups I have
refactored the code:

Conversation is request scoped and solely created or restored by
ConversationBean which delegates the later one to the ConversationManager.
WebBeansPhaseListener is only responsible for retrieving and handling the
ConversationContext. Conversation is only restored using the "cid" request
parameter and not the UIViewRoot's attributes, because the view is only
accessible after restore view phase. The restored conversation (and it's
context of course) must actually exist for restoring the view. This chicken
or egg problem was the reason not to store the the cid in the view's
attributes, because restoring these attributes actually needs restoring the
conversation beforehand.

There is still an issue with the jsf2-example: In case of ajax requests
which start a long running conversation, all form's action attributes needs
to be updated to reflect the current active conversation for following
request. This could be done using JSF2 specific API features. At the moment
webbeans-impl is purely compiled against the JSF 1.2 API. Without the
necessary abstraction there is no chance to get the JSF2 specific ajax
functionality working again.

I have attached the patch to this mail and not to the issue, because the
patch is not meant for inclusion yet, but for testing purposes. Integration
it and rerunning the jsf2-example points out my problem. If you disable ajax
by disabling javascript in your browser e.g. the conversation example is
working, because in this case the full page with updated form's action urls
is rendered during each action invocation.

Last but not least: Do you guys have a glue how JSF2 specific extension for
conversation handling should be integrated? I supose either adding another
project (webbeans-jsf2 e.g.) or updating the JSF API (not impl) version to
2.x and making sure, we are loading JSF2 specific classes only for this ajax
purpose.

good night, Sven

Reply via email to