You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by jr...@apache.org on 2010/11/05 06:07:53 UTC

svn commit: r1031432 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java

Author: jrthomerson
Date: Fri Nov  5 05:07:52 2010
New Revision: 1031432

URL: http://svn.apache.org/viewvc?rev=1031432&view=rev
Log:
AjaxRequestTarget was not calling IHeaderResponse.close() after traversing hierarchy to renderhead on all appropriate iheadercontributors

Modified:
    wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java

Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java?rev=1031432&r1=1031431&r2=1031432&view=diff
==============================================================================
--- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java (original)
+++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java Fri Nov  5 05:07:52 2010
@@ -1143,6 +1143,7 @@ public class AjaxRequestTarget implement
 				}
 			});
 		}
+		header.getHeaderResponse().close();
 
 		// revert to old response
 



Re: svn commit: r1031432 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java

Posted by Martin Grigorov <mg...@apache.org>.
Johan,

See the discussion from Nov 11 with subject mentioning "...svn commit:
r1033843..."
There we tried to figure out the meaning of the single failing test.
I still wonder where that 'B' comes from in the expected result
:...javascriptUrl[B]...

On Wed, Dec 1, 2010 at 1:34 PM, Johan Compagner <jc...@gmail.com>wrote:

> This commits breaks all header contributions when the
> ajaxrequesttarget has more then 1 component that it must render and
> the component after the first one also wants to render something in
> the head..
>
> i committed a fix:
>
> commit -m "fix form previous commit: 1031432..."
>
> C:/workspace_wicket14/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
>    Sending
>
> C:/workspace_wicket14/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
>    Transmitting file data ...
>    Committed revision 1040980.
>
>
> so that the header is now only closed after all components are rendered.
>
> Don't we have any test that would cover this? That should have failed?
> So a test that renders 2 components in an ajax request and both
> contribute some css or js.
>
> johan
>
>
> On Fri, Nov 5, 2010 at 06:07,  <jr...@apache.org> wrote:
> > Author: jrthomerson
> > Date: Fri Nov  5 05:07:52 2010
> > New Revision: 1031432
> >
> > URL: http://svn.apache.org/viewvc?rev=1031432&view=rev
> > Log:
> > AjaxRequestTarget was not calling IHeaderResponse.close() after
> traversing hierarchy to renderhead on all appropriate iheadercontributors
> >
> > Modified:
> >
>  wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
> >
> > Modified:
> wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
> > URL:
> http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java?rev=1031432&r1=1031431&r2=1031432&view=diff
> >
> ==============================================================================
> > ---
> wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
> (original)
> > +++
> wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
> Fri Nov  5 05:07:52 2010
> > @@ -1143,6 +1143,7 @@ public class AjaxRequestTarget implement
> >                                }
> >                        });
> >                }
> > +               header.getHeaderResponse().close();
> >
> >                // revert to old response
> >
> >
> >
> >
>

Re: svn commit: r1031432 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java

Posted by Johan Compagner <jc...@gmail.com>.
i just moved your all a bit up the call chain
so no when it handles 1 component but when it handles all components,
see my commit.


On Wed, Dec 1, 2010 at 15:15, Jeremy Thomerson
<je...@wickettraining.com> wrote:
> I think it does. I haven't had the opportunity to look through the entire
> thread, but it looks like Johan has a fix. As long as the fix still includes
> calling close somewhere near the end of the request, it works for me. In
> that case, if there are VP objections, I'll plan on building a release to
> vote on in the next 48 hours.
>
> Thoughts?
>
> Jeremy Thomerson
> http://wickettraining.com
> -- sent from my "smart" phone, so please excuse spelling, formatting, or
> compiler errors
>
> On Dec 1, 2010 8:42 AM, "Ernesto Reinaldo Barreiro" <re...@gmail.com>
> wrote:
>
> Thanks for the explanation.  So, this makes 1.4.14 a really
> "dangerous" version to use:-( Does this merits rolling out a 1.4.15?
>
> Regards,
>
> Ernesto
>
>
> On Wed, Dec 1, 2010 at 2:26 PM, Johan Compagner <jc...@gmail.com>
> wrote:
>> that really sounds ...
>

Re: svn commit: r1031432 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java

Posted by Jeremy Thomerson <je...@wickettraining.com>.
I think it does. I haven't had the opportunity to look through the entire
thread, but it looks like Johan has a fix. As long as the fix still includes
calling close somewhere near the end of the request, it works for me. In
that case, if there are VP objections, I'll plan on building a release to
vote on in the next 48 hours.

Thoughts?

Jeremy Thomerson
http://wickettraining.com
-- sent from my "smart" phone, so please excuse spelling, formatting, or
compiler errors

On Dec 1, 2010 8:42 AM, "Ernesto Reinaldo Barreiro" <re...@gmail.com>
wrote:

Thanks for the explanation.  So, this makes 1.4.14 a really
"dangerous" version to use:-( Does this merits rolling out a 1.4.15?

Regards,

Ernesto


On Wed, Dec 1, 2010 at 2:26 PM, Johan Compagner <jc...@gmail.com>
wrote:
> that really sounds ...

Re: svn commit: r1031432 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
Thanks for the explanation.  So, this makes 1.4.14 a really
"dangerous" version to use:-( Does this merits rolling out a 1.4.15?

Regards,

Ernesto

On Wed, Dec 1, 2010 at 2:26 PM, Johan Compagner <jc...@gmail.com> wrote:
> that really sounds the same thing yes.
>
> tabs are contributed by ajax, so if there are 2 components that are
> not nested but added both the the AjaxRequestTarget then the second
> will not contribute any css or js
> so i guess all js that you think should work will fail.
>
>
> On Wed, Dec 1, 2010 at 13:51, Ernesto Reinaldo Barreiro
> <re...@gmail.com> wrote:
>> May I ask which would be the "side effects" of this? I ask because
>> many wiquery users  were complaining about things, e.g. tabs, stopping
>> to work properly via AJAX replacement, for different versions of
>> wiquery, after upgrading to 1.4.14. Could this be related?
>>
>> Regards,
>>
>> Ernesto
>>
>> On Wed, Dec 1, 2010 at 1:34 PM, Johan Compagner <jc...@gmail.com> wrote:
>>> This commits breaks all header contributions when the
>>> ajaxrequesttarget has more then 1 component that it must render and
>>> the component after the first one also wants to render something in
>>> the head..
>>>
>>> i committed a fix:
>>>
>>> commit -m "fix form previous commit: 1031432..."
>>> C:/workspace_wicket14/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
>>>    Sending
>>> C:/workspace_wicket14/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
>>>    Transmitting file data ...
>>>    Committed revision 1040980.
>>>
>>>
>>> so that the header is now only closed after all components are rendered.
>>>
>>> Don't we have any test that would cover this? That should have failed?
>>> So a test that renders 2 components in an ajax request and both
>>> contribute some css or js.
>>>
>>> johan
>>>
>>>
>>> On Fri, Nov 5, 2010 at 06:07,  <jr...@apache.org> wrote:
>>>> Author: jrthomerson
>>>> Date: Fri Nov  5 05:07:52 2010
>>>> New Revision: 1031432
>>>>
>>>> URL: http://svn.apache.org/viewvc?rev=1031432&view=rev
>>>> Log:
>>>> AjaxRequestTarget was not calling IHeaderResponse.close() after traversing hierarchy to renderhead on all appropriate iheadercontributors
>>>>
>>>> Modified:
>>>>    wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
>>>>
>>>> Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
>>>> URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java?rev=1031432&r1=1031431&r2=1031432&view=diff
>>>> ==============================================================================
>>>> --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java (original)
>>>> +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java Fri Nov  5 05:07:52 2010
>>>> @@ -1143,6 +1143,7 @@ public class AjaxRequestTarget implement
>>>>                                }
>>>>                        });
>>>>                }
>>>> +               header.getHeaderResponse().close();
>>>>
>>>>                // revert to old response
>>>>
>>>>
>>>>
>>>>
>>>
>>
>

Re: svn commit: r1031432 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java

Posted by Johan Compagner <jc...@gmail.com>.
that really sounds the same thing yes.

tabs are contributed by ajax, so if there are 2 components that are
not nested but added both the the AjaxRequestTarget then the second
will not contribute any css or js
so i guess all js that you think should work will fail.


On Wed, Dec 1, 2010 at 13:51, Ernesto Reinaldo Barreiro
<re...@gmail.com> wrote:
> May I ask which would be the "side effects" of this? I ask because
> many wiquery users  were complaining about things, e.g. tabs, stopping
> to work properly via AJAX replacement, for different versions of
> wiquery, after upgrading to 1.4.14. Could this be related?
>
> Regards,
>
> Ernesto
>
> On Wed, Dec 1, 2010 at 1:34 PM, Johan Compagner <jc...@gmail.com> wrote:
>> This commits breaks all header contributions when the
>> ajaxrequesttarget has more then 1 component that it must render and
>> the component after the first one also wants to render something in
>> the head..
>>
>> i committed a fix:
>>
>> commit -m "fix form previous commit: 1031432..."
>> C:/workspace_wicket14/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
>>    Sending
>> C:/workspace_wicket14/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
>>    Transmitting file data ...
>>    Committed revision 1040980.
>>
>>
>> so that the header is now only closed after all components are rendered.
>>
>> Don't we have any test that would cover this? That should have failed?
>> So a test that renders 2 components in an ajax request and both
>> contribute some css or js.
>>
>> johan
>>
>>
>> On Fri, Nov 5, 2010 at 06:07,  <jr...@apache.org> wrote:
>>> Author: jrthomerson
>>> Date: Fri Nov  5 05:07:52 2010
>>> New Revision: 1031432
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1031432&view=rev
>>> Log:
>>> AjaxRequestTarget was not calling IHeaderResponse.close() after traversing hierarchy to renderhead on all appropriate iheadercontributors
>>>
>>> Modified:
>>>    wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
>>>
>>> Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
>>> URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java?rev=1031432&r1=1031431&r2=1031432&view=diff
>>> ==============================================================================
>>> --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java (original)
>>> +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java Fri Nov  5 05:07:52 2010
>>> @@ -1143,6 +1143,7 @@ public class AjaxRequestTarget implement
>>>                                }
>>>                        });
>>>                }
>>> +               header.getHeaderResponse().close();
>>>
>>>                // revert to old response
>>>
>>>
>>>
>>>
>>
>

Re: svn commit: r1031432 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java

Posted by Antoine Angénieux <aa...@yahoo.fr>.
Hello Johan, Ernesto,

This is exactly the problem I encountered and described in the user list 
on Monday: Wicket 1.4.14 > Bug with panels updated by Ajax rendering a CSS.

I am very glad that you found at the culprit this fast ;)

I am not sure for the WiQuery part, even though it sounds like it is the 
same kind of issue I was facing with CSS contributions.

Cheers,

Antoine.

Le 01/12/2010 13:51, Ernesto Reinaldo Barreiro a écrit :
> May I ask which would be the "side effects" of this? I ask because
> many wiquery users  were complaining about things, e.g. tabs, stopping
> to work properly via AJAX replacement, for different versions of
> wiquery, after upgrading to 1.4.14. Could this be related?
>
> Regards,
>
> Ernesto
>
> On Wed, Dec 1, 2010 at 1:34 PM, Johan Compagner<jc...@gmail.com>  wrote:
>> This commits breaks all header contributions when the
>> ajaxrequesttarget has more then 1 component that it must render and
>> the component after the first one also wants to render something in
>> the head..
>>
>> i committed a fix:
>>
>> commit -m "fix form previous commit: 1031432..."
>> C:/workspace_wicket14/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
>>     Sending
>> C:/workspace_wicket14/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
>>     Transmitting file data ...
>>     Committed revision 1040980.
>>
>>
>> so that the header is now only closed after all components are rendered.
>>
>> Don't we have any test that would cover this? That should have failed?
>> So a test that renders 2 components in an ajax request and both
>> contribute some css or js.
>>
>> johan
>>
>>
>> On Fri, Nov 5, 2010 at 06:07,<jr...@apache.org>  wrote:
>>> Author: jrthomerson
>>> Date: Fri Nov  5 05:07:52 2010
>>> New Revision: 1031432
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1031432&view=rev
>>> Log:
>>> AjaxRequestTarget was not calling IHeaderResponse.close() after traversing hierarchy to renderhead on all appropriate iheadercontributors
>>>
>>> Modified:
>>>     wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
>>>
>>> Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
>>> URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java?rev=1031432&r1=1031431&r2=1031432&view=diff
>>> ==============================================================================
>>> --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java (original)
>>> +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java Fri Nov  5 05:07:52 2010
>>> @@ -1143,6 +1143,7 @@ public class AjaxRequestTarget implement
>>>                                 }
>>>                         });
>>>                 }
>>> +               header.getHeaderResponse().close();
>>>
>>>                 // revert to old response
>>>
>>>
>>>
>>>
>>
>
>
> -----
> Aucun virus trouvé dans ce message.
> Analyse effectuée par AVG - www.avg.fr
> Version: 10.0.1170 / Base de données virale: 426/3290 - Date: 30/11/2010
>
>


Re: svn commit: r1031432 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
May I ask which would be the "side effects" of this? I ask because
many wiquery users  were complaining about things, e.g. tabs, stopping
to work properly via AJAX replacement, for different versions of
wiquery, after upgrading to 1.4.14. Could this be related?

Regards,

Ernesto

On Wed, Dec 1, 2010 at 1:34 PM, Johan Compagner <jc...@gmail.com> wrote:
> This commits breaks all header contributions when the
> ajaxrequesttarget has more then 1 component that it must render and
> the component after the first one also wants to render something in
> the head..
>
> i committed a fix:
>
> commit -m "fix form previous commit: 1031432..."
> C:/workspace_wicket14/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
>    Sending
> C:/workspace_wicket14/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
>    Transmitting file data ...
>    Committed revision 1040980.
>
>
> so that the header is now only closed after all components are rendered.
>
> Don't we have any test that would cover this? That should have failed?
> So a test that renders 2 components in an ajax request and both
> contribute some css or js.
>
> johan
>
>
> On Fri, Nov 5, 2010 at 06:07,  <jr...@apache.org> wrote:
>> Author: jrthomerson
>> Date: Fri Nov  5 05:07:52 2010
>> New Revision: 1031432
>>
>> URL: http://svn.apache.org/viewvc?rev=1031432&view=rev
>> Log:
>> AjaxRequestTarget was not calling IHeaderResponse.close() after traversing hierarchy to renderhead on all appropriate iheadercontributors
>>
>> Modified:
>>    wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
>>
>> Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
>> URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java?rev=1031432&r1=1031431&r2=1031432&view=diff
>> ==============================================================================
>> --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java (original)
>> +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java Fri Nov  5 05:07:52 2010
>> @@ -1143,6 +1143,7 @@ public class AjaxRequestTarget implement
>>                                }
>>                        });
>>                }
>> +               header.getHeaderResponse().close();
>>
>>                // revert to old response
>>
>>
>>
>>
>

Re: svn commit: r1031432 - /wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java

Posted by Johan Compagner <jc...@gmail.com>.
This commits breaks all header contributions when the
ajaxrequesttarget has more then 1 component that it must render and
the component after the first one also wants to render something in
the head..

i committed a fix:

commit -m "fix form previous commit: 1031432..."
C:/workspace_wicket14/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
    Sending
C:/workspace_wicket14/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
    Transmitting file data ...
    Committed revision 1040980.


so that the header is now only closed after all components are rendered.

Don't we have any test that would cover this? That should have failed?
So a test that renders 2 components in an ajax request and both
contribute some css or js.

johan


On Fri, Nov 5, 2010 at 06:07,  <jr...@apache.org> wrote:
> Author: jrthomerson
> Date: Fri Nov  5 05:07:52 2010
> New Revision: 1031432
>
> URL: http://svn.apache.org/viewvc?rev=1031432&view=rev
> Log:
> AjaxRequestTarget was not calling IHeaderResponse.close() after traversing hierarchy to renderhead on all appropriate iheadercontributors
>
> Modified:
>    wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
>
> Modified: wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java
> URL: http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java?rev=1031432&r1=1031431&r2=1031432&view=diff
> ==============================================================================
> --- wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java (original)
> +++ wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/ajax/AjaxRequestTarget.java Fri Nov  5 05:07:52 2010
> @@ -1143,6 +1143,7 @@ public class AjaxRequestTarget implement
>                                }
>                        });
>                }
> +               header.getHeaderResponse().close();
>
>                // revert to old response
>
>
>
>