You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Michael Kurz <mi...@gmx.at> on 2010/01/14 18:31:43 UTC
[MyFaces 2] PSS in _DeltaList
Hi,
I have an issue with partial state saving in _DeltaList. I have a page
with a listener for PreRenderView. When I submit the page the listener
is correctly set on building the view but is overwritten with null in
_DeltaList.restoreState:310. This is done as the listener is transient
and the saved state therefore is null. But imho setting the list item to
null in this case should not be done.
This behavior is also checked in the following test cases, which I think
is not correct, too:
_DeltaListTest.testSimpleSaveRestoreTransient4() and
_DeltaListTest.testSimpleSaveRestoreTransient5()
What do you think guys?
regards
Michael
Re: [MyFaces 2] PSS in _DeltaList
Posted by Leonardo Uribe <lu...@gmail.com>.
2010/1/14 Leonardo Uribe <lu...@gmail.com>
> Hi
>
> In theory, a transient component should not survive a save/restore. If this
> is not true, pss will not be consistent, in other words, it will not work as
> jsf 1.2 state saving.
>
> I'm doing some tests related to "MYFACES-2483 Find a way to allow c:if work
> with partial state saving enabled", and this fact is required.
>
> Could you send me a test case for this one, so I can check it and try to
> solve it? (Is it any transient listener with return null from save state?)
>
>
Tested transient listener with return null from saveState and it pass.
Checking again maybe there is an error on
UIComponentBase.restoreDeltaSystemEventListenerClassMap as MYFACES-2466
suggest. (A listener attached to PreRenderView is a SystemEventListener, so
it is not related to _DeltaList.
regards,
Leonardo Uribe
> regards,
>
> Leonardo Uribe
>
> 2010/1/14 Michael Kurz <mi...@gmx.at>
>
> Hi,
>>
>> I have an issue with partial state saving in _DeltaList. I have a page
>> with a listener for PreRenderView. When I submit the page the listener is
>> correctly set on building the view but is overwritten with null in
>> _DeltaList.restoreState:310. This is done as the listener is transient and
>> the saved state therefore is null. But imho setting the list item to null in
>> this case should not be done.
>>
>> This behavior is also checked in the following test cases, which I think
>> is not correct, too:
>>
>> _DeltaListTest.testSimpleSaveRestoreTransient4() and
>> _DeltaListTest.testSimpleSaveRestoreTransient5()
>>
>> What do you think guys?
>>
>> regards
>> Michael
>>
>
>
Re: [MyFaces 2] PSS in _DeltaList
Posted by Leonardo Uribe <lu...@gmail.com>.
2010/1/14 Michael Kurz <mi...@gmx.at>
> Leonardo Uribe schrieb:
>
>>
>>
>> 2010/1/14 Michael Kurz <michi.kurz@gmx.at <ma...@gmx.at>>
>>
>>
>> Leonardo Uribe schrieb:
>>
>> In theory, a transient component should not survive a
>> save/restore. If this is not true, pss will not be consistent,
>> in other words, it will not work as jsf 1.2 state saving.
>>
>>
>> I agree, but in this case the listener that was added on building
>> the view is overwritten with null on restore.
>>
>>
>> It is expected. Transient object are overwritten with null on restore to
>> "simulate" jsf 1.2 behavior. I'll do some tests over
>> _systemEventListenerClassMap.
>>
>
> Well, but in JSF 1.2 the view was built again before rendering, which is
> not the case with PSS in 2.0, or am I mistaken?
>
>
>
Yes, it is true. To allow c:if work we have to change this a little, but I'm
still working on it.
> -
> Michael
>
Re: [MyFaces 2] PSS in _DeltaList
Posted by Michael Kurz <mi...@gmx.at>.
Leonardo Uribe schrieb:
>
>
> 2010/1/14 Michael Kurz <michi.kurz@gmx.at <ma...@gmx.at>>
>
> Leonardo Uribe schrieb:
>
> In theory, a transient component should not survive a
> save/restore. If this is not true, pss will not be consistent,
> in other words, it will not work as jsf 1.2 state saving.
>
>
> I agree, but in this case the listener that was added on building
> the view is overwritten with null on restore.
>
>
> It is expected. Transient object are overwritten with null on restore to
> "simulate" jsf 1.2 behavior. I'll do some tests over
> _systemEventListenerClassMap.
Well, but in JSF 1.2 the view was built again before rendering, which is
not the case with PSS in 2.0, or am I mistaken?
-
Michael
Re: [MyFaces 2] PSS in _DeltaList
Posted by Leonardo Uribe <lu...@gmail.com>.
2010/1/14 Michael Kurz <mi...@gmx.at>
> Leonardo Uribe schrieb:
>
> In theory, a transient component should not survive a save/restore. If
>> this is not true, pss will not be consistent, in other words, it will not
>> work as jsf 1.2 state saving.
>>
>
> I agree, but in this case the listener that was added on building the view
> is overwritten with null on restore.
>
>
It is expected. Transient object are overwritten with null on restore to
"simulate" jsf 1.2 behavior. I'll do some tests over
_systemEventListenerClassMap.
regards,
Leonardo Uribe
> -
> Michael
>
Re: [MyFaces 2] PSS in _DeltaList
Posted by Michael Kurz <mi...@gmx.at>.
Leonardo Uribe schrieb:
> In theory, a transient component should not survive a save/restore. If
> this is not true, pss will not be consistent, in other words, it will
> not work as jsf 1.2 state saving.
I agree, but in this case the listener that was added on building the
view is overwritten with null on restore.
-
Michael
Re: [MyFaces 2] PSS in _DeltaList
Posted by Leonardo Uribe <lu...@gmail.com>.
Hi
In theory, a transient component should not survive a save/restore. If this
is not true, pss will not be consistent, in other words, it will not work as
jsf 1.2 state saving.
I'm doing some tests related to "MYFACES-2483 Find a way to allow c:if work
with partial state saving enabled", and this fact is required.
Could you send me a test case for this one, so I can check it and try to
solve it? (Is it any transient listener with return null from save state?)
regards,
Leonardo Uribe
2010/1/14 Michael Kurz <mi...@gmx.at>
> Hi,
>
> I have an issue with partial state saving in _DeltaList. I have a page with
> a listener for PreRenderView. When I submit the page the listener is
> correctly set on building the view but is overwritten with null in
> _DeltaList.restoreState:310. This is done as the listener is transient and
> the saved state therefore is null. But imho setting the list item to null in
> this case should not be done.
>
> This behavior is also checked in the following test cases, which I think is
> not correct, too:
>
> _DeltaListTest.testSimpleSaveRestoreTransient4() and
> _DeltaListTest.testSimpleSaveRestoreTransient5()
>
> What do you think guys?
>
> regards
> Michael
>