You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by dennisB <de...@gmail.com> on 2011/12/20 14:52:04 UTC

Problem with wicket 1.5.3 and wiquery 1.5.3

Hi all

We are performing upgrade to wicket 1.5.3 and wiquery 1.5.3 and we got some
problem with
the Response, the problem is that all my Responses is wrapped now with
WiQueryDecoratingHeaderResponse class and the Ajax events doesn't work
properly 

Thanks .

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-with-wicket-1-5-3-and-wiquery-1-5-3-tp4217860p4217860.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Problem with wicket 1.5.3 and wiquery 1.5.3

Posted by dennisB <de...@gmail.com>.
hi Hielke 

We staying with the patch for now, we have to stable our system.

but i will check it in few days.

Thanks.


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-with-wicket-1-5-3-and-wiquery-1-5-3-tp4217860p4221949.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Problem with wicket 1.5.3 and wiquery 1.5.3

Posted by Hielke Hoeve <Hi...@topicus.nl>.
Found it :) A silly bug... I squashed it and committed a fix and released a new snapshot version. Can you guys verify it is working now?

wiquery-core
1.5-SNAPSHOT

Hielke

-----Original Message-----
From: Hielke Hoeve [mailto:Hielke.Hoeve@topicus.nl] 
Sent: woensdag 21 december 2011 8:06
To: users@wicket.apache.org
Subject: RE: Problem with wicket 1.5.3 and wiquery 1.5.3

Thats something that i would like to know once you stumble upon it. Adding dummy behaviors to fix things should not be necessary. I will try and fix the problem.

Hielke

-----Original Message-----
From: Chris Hawkins [mailto:chris@chawkins.com]
Sent: dinsdag 20 december 2011 19:12
To: users@wicket.apache.org
Subject: Re: Problem with wicket 1.5.3 and wiquery 1.5.3

This sounds very similar to a problem that I had with WiQuery.  I found that if a page did not have any WiQuery components or behaviors on it I got errors with the Wicket ajax javascript due to the WiQueryDecoratingResponseHeader.  My solution was to force WiQuery to load jQuery by adding an empty WiQuery behavior to my base page.

/**
* This patch is intended to load jquery on every page because the WiQueryDecoratingHeaderResponse
* is rewriting every JS call regardless of if there is WiQuery code on the page
* @author chrish
*
*/
public class WiQueryJsPatch extends WiQueryAbstractBehavior {

	private static final long serialVersionUID = 1L;

	@Override
	public JsStatement statement() {
		return null;
	}

}

On Dec 20, 2011, at 9:05 AM, dennisB wrote:

> hi Hielke
> 
> thanks for the fast reply.
> 
> I create a simple example to demonstrate my problem:
> 
> this is the scenario:
> 
> In my application i have wicket 1.5.3 and i am using AjaxLazyLoadPanel
> -
> 
> add(new AjaxLazyLoadPanel("testPanel") {
>            @Override
>            public Component getLazyLoadComponent(String markupId) {
>                return new DataPanel(markupId);// simple panel which 
> includes only one Label
>            }
>     });
> 
> and it works fine...
> 
> when i add wiquery 1.5.3 you have this code
> 
> application.setHeaderResponseDecorator(new IHeaderResponseDecorator()
> 		{
> 			private static final long serialVersionUID = 1L;
> 
> 			public IHeaderResponse decorate(IHeaderResponse response)
> 			{
> 				return new WiQueryDecoratingHeaderResponse(response);
> 			}
> 		});
> in  the WiQueryCoreInitializer class
> 
> now when i run this test it doesn't work correctly, and all 
> AjaxLazyLoadPanels in my application are not working. in ours real 
> application also other ajax events doesn't work correctly because of 
> wiquery .
> 
> Thanks.
> 
> 
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Problem-with-wicket-1-5-3-a
> nd-wiquery-1-5-3-tp4217860p4218578.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Problem with wicket 1.5.3 and wiquery 1.5.3

Posted by Hielke Hoeve <Hi...@topicus.nl>.
Thats something that i would like to know once you stumble upon it. Adding dummy behaviors to fix things should not be necessary. I will try and fix the problem.

Hielke

-----Original Message-----
From: Chris Hawkins [mailto:chris@chawkins.com] 
Sent: dinsdag 20 december 2011 19:12
To: users@wicket.apache.org
Subject: Re: Problem with wicket 1.5.3 and wiquery 1.5.3

This sounds very similar to a problem that I had with WiQuery.  I found that if a page did not have any WiQuery components or behaviors on it I got errors with the Wicket ajax javascript due to the WiQueryDecoratingResponseHeader.  My solution was to force WiQuery to load jQuery by adding an empty WiQuery behavior to my base page.

/**
* This patch is intended to load jquery on every page because the WiQueryDecoratingHeaderResponse
* is rewriting every JS call regardless of if there is WiQuery code on the page
* @author chrish
*
*/
public class WiQueryJsPatch extends WiQueryAbstractBehavior {

	private static final long serialVersionUID = 1L;

	@Override
	public JsStatement statement() {
		return null;
	}

}

On Dec 20, 2011, at 9:05 AM, dennisB wrote:

> hi Hielke
> 
> thanks for the fast reply.
> 
> I create a simple example to demonstrate my problem:
> 
> this is the scenario:
> 
> In my application i have wicket 1.5.3 and i am using AjaxLazyLoadPanel 
> -
> 
> add(new AjaxLazyLoadPanel("testPanel") {
>            @Override
>            public Component getLazyLoadComponent(String markupId) {
>                return new DataPanel(markupId);// simple panel which 
> includes only one Label
>            }
>     });
> 
> and it works fine...
> 
> when i add wiquery 1.5.3 you have this code
> 
> application.setHeaderResponseDecorator(new IHeaderResponseDecorator()
> 		{
> 			private static final long serialVersionUID = 1L;
> 
> 			public IHeaderResponse decorate(IHeaderResponse response)
> 			{
> 				return new WiQueryDecoratingHeaderResponse(response);
> 			}
> 		});
> in  the WiQueryCoreInitializer class
> 
> now when i run this test it doesn't work correctly, and all 
> AjaxLazyLoadPanels in my application are not working. in ours real 
> application also other ajax events doesn't work correctly because of 
> wiquery .
> 
> Thanks.
> 
> 
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Problem-with-wicket-1-5-3-a
> nd-wiquery-1-5-3-tp4217860p4218578.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Problem with wicket 1.5.3 and wiquery 1.5.3

Posted by dennisB <de...@gmail.com>.
hi Chris

your solution worked for my test project, i still need to check it on my
real project.

Thanks

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-with-wicket-1-5-3-and-wiquery-1-5-3-tp4217860p4219254.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Problem with wicket 1.5.3 and wiquery 1.5.3

Posted by Chris Hawkins <ch...@chawkins.com>.
This sounds very similar to a problem that I had with WiQuery.  I found that if a page did not have any WiQuery components or behaviors on it I got errors with the Wicket ajax javascript due to the WiQueryDecoratingResponseHeader.  My solution was to force WiQuery to load jQuery by adding an empty WiQuery behavior to my base page.

/**
* This patch is intended to load jquery on every page because the WiQueryDecoratingHeaderResponse
* is rewriting every JS call regardless of if there is WiQuery code on the page
* @author chrish
*
*/
public class WiQueryJsPatch extends WiQueryAbstractBehavior {

	private static final long serialVersionUID = 1L;

	@Override
	public JsStatement statement() {
		return null;
	}

}

On Dec 20, 2011, at 9:05 AM, dennisB wrote:

> hi Hielke 
> 
> thanks for the fast reply.
> 
> I create a simple example to demonstrate my problem:
> 
> this is the scenario:
> 
> In my application i have wicket 1.5.3 and i am using AjaxLazyLoadPanel -
> 
> add(new AjaxLazyLoadPanel("testPanel") {
>            @Override
>            public Component getLazyLoadComponent(String markupId) {
>                return new DataPanel(markupId);// simple panel which
> includes only one Label
>            }
>     });
> 
> and it works fine...
> 
> when i add wiquery 1.5.3 you have this code 
> 
> application.setHeaderResponseDecorator(new IHeaderResponseDecorator()
> 		{
> 			private static final long serialVersionUID = 1L;
> 
> 			public IHeaderResponse decorate(IHeaderResponse response)
> 			{
> 				return new WiQueryDecoratingHeaderResponse(response);
> 			}
> 		});
> in  the WiQueryCoreInitializer class
> 
> now when i run this test it doesn't work correctly, and all
> AjaxLazyLoadPanels in my application are not working. in ours real
> application also other ajax events doesn't work correctly because of wiquery
> .
> 
> Thanks.
> 
> 
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-with-wicket-1-5-3-and-wiquery-1-5-3-tp4217860p4218578.html
> Sent from the Users forum mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Problem with wicket 1.5.3 and wiquery 1.5.3

Posted by dennisB <de...@gmail.com>.
hi Hielke 

thanks for the fast reply.

I create a simple example to demonstrate my problem:

this is the scenario:

In my application i have wicket 1.5.3 and i am using AjaxLazyLoadPanel -

add(new AjaxLazyLoadPanel("testPanel") {
            @Override
            public Component getLazyLoadComponent(String markupId) {
                return new DataPanel(markupId);// simple panel which
includes only one Label
            }
     });

and it works fine...

when i add wiquery 1.5.3 you have this code 

application.setHeaderResponseDecorator(new IHeaderResponseDecorator()
		{
			private static final long serialVersionUID = 1L;

			public IHeaderResponse decorate(IHeaderResponse response)
			{
				return new WiQueryDecoratingHeaderResponse(response);
			}
		});
in  the WiQueryCoreInitializer class

now when i run this test it doesn't work correctly, and all
AjaxLazyLoadPanels in my application are not working. in ours real
application also other ajax events doesn't work correctly because of wiquery
.

Thanks.


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-with-wicket-1-5-3-and-wiquery-1-5-3-tp4217860p4218578.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Problem with wicket 1.5.3 and wiquery 1.5.3

Posted by Hielke Hoeve <Hi...@topicus.nl>.
Hi Dennis,

Unfortunately this is the (only) way how WiQuery can work. If you provide some code we can help you fix this, otherwise we'll have to try and read minds which is bound to fail :)

Hielke

-----Original Message-----
From: dennisB [mailto:dennisborsh@gmail.com] 
Sent: dinsdag 20 december 2011 14:52
To: users@wicket.apache.org
Subject: Problem with wicket 1.5.3 and wiquery 1.5.3

Hi all

We are performing upgrade to wicket 1.5.3 and wiquery 1.5.3 and we got some problem with the Response, the problem is that all my Responses is wrapped now with WiQueryDecoratingHeaderResponse class and the Ajax events doesn't work properly 

Thanks .

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-with-wicket-1-5-3-and-wiquery-1-5-3-tp4217860p4217860.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org