myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Ivankovits <ma...@ops.co.at>
Subject Re: partial model update on ppr request
Date Sat, 29 Mar 2008 17:02:05 GMT
Hi!
>> The complicated thing is, that the pprSubmit enhancement would require a
>> custom LifeCycle for PPR requests (why is it a PhaseListener by now?)
>>   
>>     
> I am investigating some time into that.
>   
Ok, I've committed something which did the trick. I've not yet fully
replace the PhaseListener as first we have to check if the way I deal
with the Lifecycle is stable enough.
And that is exactly what I would like to ask you to review.

I don't wanted to reimplement the whole lifecycle like Tobago did. More,
I wanted to delegate to the original lifecycle and just change the bits
I am interested in.
And that was again not that easy .... probably something to change with
JSF 2.0 - the Lifecycle class ... but thats another story.

What I did is in PPRLifecycleFactory I return a decorated Lifecycle
(PPRLifeCycle) which again just wrappes the FacesContext (in case of an
PPR request) which then returns a wrapped UIViewRoot
(PPRViewRootWrapper) and overrides processValidations and processUpdates
if processComponentIds has been configured on pprSubmit.
The bad about that solution is the wrapping stuff which might not be
robust enough yet - especially with JSF 1.2.
The good thing is that it will work with any other custom lifecycle
already there. I tried to avoid any side-effect, but we will see how
well that worked.

pprSumit now also works with an embedded command control instead of
being the child of one. That way I was able to intercept the queueEvent
of the command component and configure things early enough.

If things are going to work nicely we can put the code of
PPRPhaseListener into the custom lifecycle.

Please review!
I'll put it in production by Monday, so more tests will follow then.

Ciao,
Mario


Mime
View raw message