You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Martin Grigorov <mg...@apache.org> on 2015/07/06 22:11:52 UTC

Ajax updates do not quite work due to WICKET-5933

Hi,

While testing 7.0.0 I've noticed that ModalWindow example doesn't work as
expected anymore.
Clicking on 'Close this window with result "OK"' link doesn't update the
feedback label.

The regression is caused by: WICKET-5933
<https://issues.apache.org/jira/browse/WICKET-5933> Avoid serialization of
untouched page after ajax request

Wicket doesn't touch the page anymore and changing component member
(like org.apache.wicket.examples.ajax.builtin.modal.ModalWindowPage#result)
doesn't trigger state change
(org.apache.wicket.Page#componentStateChanging) so the new value is lost.

I see no better solution than reverting WICKET-5933.

Any other ideas?

Martin Grigorov
Freelancer. Available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

Re: Ajax updates do not quite work due to WICKET-5933

Posted by Martin Grigorov <mg...@apache.org>.
Added the new method to IPageManager in 7.x and to AbstractPageManager in
6.x.

Martin Grigorov
Freelancer. Available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Jul 7, 2015 at 9:47 PM, Martin Grigorov <mg...@apache.org>
wrote:

> The new untouch() most likely will be in IPageManager, an interface, so it
> has to be added before 7.0.0.
> I'll do it shortly.
>
> Additionally we have to fix the issue with #getResourseStream() before
> 7.0.0.
> I'll do it shortly too.
>
> In the meantime you may test your apps against current master to avoid
> more restarts of the release.
> On Jul 7, 2015 9:15 PM, "Andrea Del Bene" <an...@gmail.com> wrote:
>
>> I meant to go ahead with a new build without this change.
>>
>>> I vote -1 for the release. The effects caused by the change were very
>>> easy
>>> to reproduce, and I know our applications are very likely to be affected.
>>> We heavily rely on pages in page store to implement 'cancel' and 'return'
>>> buttons in our applications. We also use ajax extensively and often
>>> update
>>> properties that will not cause the page to become dirty. This will
>>> undoubtedly lead to subtle bugs and inconsistent behavior.
>>>
>>> Also, the proposed API change seems quite important to me. This has to be
>>> changed before 7.0.0, or else it will have to wait until 8.0.0.
>>>
>>> Best regards,
>>> Emond
>>>
>>> On Tue, Jul 7, 2015 at 5:59 PM, Andrea Del Bene <an...@gmail.com>
>>> wrote:
>>>
>>>  I've reverted the commit for this issue. Since this issue doesn't seem
>>>> to
>>>> affect many people I suggest to go ahead with the release and postpone a
>>>> possible extension of the API to untouch a page. In the meantime to
>>>> solve
>>>> the problem of the issue we could suggest to use a stateless page, which
>>>> might use stateless AJAX components from WicketStuff.
>>>>
>>>> Andrea.
>>>>
>>>>
>>

Re: Ajax updates do not quite work due to WICKET-5933

Posted by Martin Grigorov <mg...@apache.org>.
The new untouch() most likely will be in IPageManager, an interface, so it
has to be added before 7.0.0.
I'll do it shortly.

Additionally we have to fix the issue with #getResourseStream() before
7.0.0.
I'll do it shortly too.

In the meantime you may test your apps against current master to avoid more
restarts of the release.
On Jul 7, 2015 9:15 PM, "Andrea Del Bene" <an...@gmail.com> wrote:

> I meant to go ahead with a new build without this change.
>
>> I vote -1 for the release. The effects caused by the change were very easy
>> to reproduce, and I know our applications are very likely to be affected.
>> We heavily rely on pages in page store to implement 'cancel' and 'return'
>> buttons in our applications. We also use ajax extensively and often update
>> properties that will not cause the page to become dirty. This will
>> undoubtedly lead to subtle bugs and inconsistent behavior.
>>
>> Also, the proposed API change seems quite important to me. This has to be
>> changed before 7.0.0, or else it will have to wait until 8.0.0.
>>
>> Best regards,
>> Emond
>>
>> On Tue, Jul 7, 2015 at 5:59 PM, Andrea Del Bene <an...@gmail.com>
>> wrote:
>>
>>  I've reverted the commit for this issue. Since this issue doesn't seem to
>>> affect many people I suggest to go ahead with the release and postpone a
>>> possible extension of the API to untouch a page. In the meantime to solve
>>> the problem of the issue we could suggest to use a stateless page, which
>>> might use stateless AJAX components from WicketStuff.
>>>
>>> Andrea.
>>>
>>>
>

Re: Ajax updates do not quite work due to WICKET-5933

Posted by Andrea Del Bene <an...@gmail.com>.
I meant to go ahead with a new build without this change.
> I vote -1 for the release. The effects caused by the change were very easy
> to reproduce, and I know our applications are very likely to be affected.
> We heavily rely on pages in page store to implement 'cancel' and 'return'
> buttons in our applications. We also use ajax extensively and often update
> properties that will not cause the page to become dirty. This will
> undoubtedly lead to subtle bugs and inconsistent behavior.
>
> Also, the proposed API change seems quite important to me. This has to be
> changed before 7.0.0, or else it will have to wait until 8.0.0.
>
> Best regards,
> Emond
>
> On Tue, Jul 7, 2015 at 5:59 PM, Andrea Del Bene <an...@gmail.com>
> wrote:
>
>> I've reverted the commit for this issue. Since this issue doesn't seem to
>> affect many people I suggest to go ahead with the release and postpone a
>> possible extension of the API to untouch a page. In the meantime to solve
>> the problem of the issue we could suggest to use a stateless page, which
>> might use stateless AJAX components from WicketStuff.
>>
>> Andrea.
>>


Re: Ajax updates do not quite work due to WICKET-5933

Posted by Emond Papegaaij <em...@topicus.nl>.
I vote -1 for the release. The effects caused by the change were very easy
to reproduce, and I know our applications are very likely to be affected.
We heavily rely on pages in page store to implement 'cancel' and 'return'
buttons in our applications. We also use ajax extensively and often update
properties that will not cause the page to become dirty. This will
undoubtedly lead to subtle bugs and inconsistent behavior.

Also, the proposed API change seems quite important to me. This has to be
changed before 7.0.0, or else it will have to wait until 8.0.0.

Best regards,
Emond

On Tue, Jul 7, 2015 at 5:59 PM, Andrea Del Bene <an...@gmail.com>
wrote:

> I've reverted the commit for this issue. Since this issue doesn't seem to
> affect many people I suggest to go ahead with the release and postpone a
> possible extension of the API to untouch a page. In the meantime to solve
> the problem of the issue we could suggest to use a stateless page, which
> might use stateless AJAX components from WicketStuff.
>
> Andrea.
>
>  Maybe we should expose an API to untouch a page?!
>> This will solve the case in WICKET-5933.
>>
>> Martin Grigorov
>> Freelancer. Available for hire!
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>> On Tue, Jul 7, 2015 at 10:56 AM, Emond Papegaaij <
>> emond.papegaaij@topicus.nl
>>
>>> wrote:
>>> I've reopened 5933, and I think the change should be reverted. The
>>> reason a
>>> page is touched on retrieval is that there is no way to be sure the page
>>> did
>>> not change once it has been read from the page store. The user is free to
>>> change the state of the page in whatever way he/she sees fit. Only a few
>>> of
>>> those will mark the page dirty.
>>>
>>> Best regards,
>>> Emond
>>>
>>> On Tuesday 07 July 2015 09:19:52 Sven Meier wrote:
>>>
>>>
>

Re: Ajax updates do not quite work due to WICKET-5933

Posted by Andrea Del Bene <an...@gmail.com>.
I've reverted the commit for this issue. Since this issue doesn't seem 
to affect many people I suggest to go ahead with the release and 
postpone a possible extension of the API to untouch a page. In the 
meantime to solve the problem of the issue we could suggest to use a 
stateless page, which might use stateless AJAX components from WicketStuff.

Andrea.
> Maybe we should expose an API to untouch a page?!
> This will solve the case in WICKET-5933.
>
> Martin Grigorov
> Freelancer. Available for hire!
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Tue, Jul 7, 2015 at 10:56 AM, Emond Papegaaij <emond.papegaaij@topicus.nl
>> wrote:
>> I've reopened 5933, and I think the change should be reverted. The reason a
>> page is touched on retrieval is that there is no way to be sure the page
>> did
>> not change once it has been read from the page store. The user is free to
>> change the state of the page in whatever way he/she sees fit. Only a few of
>> those will mark the page dirty.
>>
>> Best regards,
>> Emond
>>
>> On Tuesday 07 July 2015 09:19:52 Sven Meier wrote:
>>


Re: Ajax updates do not quite work due to WICKET-5933

Posted by Martin Grigorov <mg...@apache.org>.
Maybe we should expose an API to untouch a page?!
This will solve the case in WICKET-5933.

Martin Grigorov
Freelancer. Available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Jul 7, 2015 at 10:56 AM, Emond Papegaaij <emond.papegaaij@topicus.nl
> wrote:

> I've reopened 5933, and I think the change should be reverted. The reason a
> page is touched on retrieval is that there is no way to be sure the page
> did
> not change once it has been read from the page store. The user is free to
> change the state of the page in whatever way he/she sees fit. Only a few of
> those will mark the page dirty.
>
> Best regards,
> Emond
>
> On Tuesday 07 July 2015 09:19:52 Sven Meier wrote:
> > I'll take a look at the problem too.
> >
> > Sven
> >
> > On 06.07.2015 22:11, Martin Grigorov wrote:
> > > Hi,
> > >
> > > While testing 7.0.0 I've noticed that ModalWindow example doesn't work
> as
> > > expected anymore.
> > > Clicking on 'Close this window with result "OK"' link doesn't update
> the
> > > feedback label.
> > >
> > > The regression is caused by: WICKET-5933
> > > <https://issues.apache.org/jira/browse/WICKET-5933> Avoid
> serialization of
> > > untouched page after ajax request
> > >
> > > Wicket doesn't touch the page anymore and changing component member
> > > (like
> > > org.apache.wicket.examples.ajax.builtin.modal.ModalWindowPage#result)
> > > doesn't trigger state change
> > > (org.apache.wicket.Page#componentStateChanging) so the new value is
> lost.
> > >
> > > I see no better solution than reverting WICKET-5933.
> > >
> > > Any other ideas?
> > >
> > > Martin Grigorov
> > > Freelancer. Available for hire!
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
>
>

Re: Ajax updates do not quite work due to WICKET-5933

Posted by Emond Papegaaij <em...@topicus.nl>.
I've reopened 5933, and I think the change should be reverted. The reason a 
page is touched on retrieval is that there is no way to be sure the page did 
not change once it has been read from the page store. The user is free to 
change the state of the page in whatever way he/she sees fit. Only a few of 
those will mark the page dirty.

Best regards,
Emond

On Tuesday 07 July 2015 09:19:52 Sven Meier wrote:
> I'll take a look at the problem too.
> 
> Sven
> 
> On 06.07.2015 22:11, Martin Grigorov wrote:
> > Hi,
> > 
> > While testing 7.0.0 I've noticed that ModalWindow example doesn't work as
> > expected anymore.
> > Clicking on 'Close this window with result "OK"' link doesn't update the
> > feedback label.
> > 
> > The regression is caused by: WICKET-5933
> > <https://issues.apache.org/jira/browse/WICKET-5933> Avoid serialization of
> > untouched page after ajax request
> > 
> > Wicket doesn't touch the page anymore and changing component member
> > (like
> > org.apache.wicket.examples.ajax.builtin.modal.ModalWindowPage#result)
> > doesn't trigger state change
> > (org.apache.wicket.Page#componentStateChanging) so the new value is lost.
> > 
> > I see no better solution than reverting WICKET-5933.
> > 
> > Any other ideas?
> > 
> > Martin Grigorov
> > Freelancer. Available for hire!
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov


Re: Ajax updates do not quite work due to WICKET-5933

Posted by Sven Meier <sv...@meiers.net>.
I'll take a look at the problem too.

Sven

On 06.07.2015 22:11, Martin Grigorov wrote:
> Hi,
>
> While testing 7.0.0 I've noticed that ModalWindow example doesn't work as
> expected anymore.
> Clicking on 'Close this window with result "OK"' link doesn't update the
> feedback label.
>
> The regression is caused by: WICKET-5933
> <https://issues.apache.org/jira/browse/WICKET-5933> Avoid serialization of
> untouched page after ajax request
>
> Wicket doesn't touch the page anymore and changing component member
> (like org.apache.wicket.examples.ajax.builtin.modal.ModalWindowPage#result)
> doesn't trigger state change
> (org.apache.wicket.Page#componentStateChanging) so the new value is lost.
>
> I see no better solution than reverting WICKET-5933.
>
> Any other ideas?
>
> Martin Grigorov
> Freelancer. Available for hire!
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>