You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Jani Väisänen <ja...@syncrontech.com> on 2008/03/07 09:41:14 UTC
Problems with AbstractAjaxTimerBehavior
I have a case with AbstractAjaxTimerBehavior on wicket 1.3.1.
AbstractAjaxTimerBehavior seems to add header-contribution to every ajax
response.
The method renderHead calls super.renderHead
(AbstractDefaultAjaxBehavior), which adds lines:
- response.renderJavascriptReference(WicketEventReference.INSTANCE); -
response.renderJavascriptReference(WicketAjaxReference.INSTANCE);
to every response.
This behavior causes at least usability problems in IE6.
-Jani
Re: Problems with AbstractAjaxTimerBehavior
Posted by Jani Väisänen <ja...@syncrontech.com>.
But like I said, this behaviour does not occur with wicket 1.2.6 and
IE6. The response does not affect the dropdown, so it shouldn't be closed.
Here is a comparison of ajax debug log of versions 1.3.1 and 1.2.6. The
older wicket does not add the header-contribution part to the response.
Wicket 1.3.1:
INFO: Received ajax response (1181 characters)
INFO:
<?xml version="1.0"
encoding="UTF-8"?><ajax-response><header-contribution encoding="wicket1"
><![CDATA[<head xmlns:wicket="http://wicket.apache.org"><script
type="text/javascript"
src="resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
<script type="text/javascript"
src="resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
<script type="text/javascript"
src="resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
<script type="text/javascript"
id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/
wicketAjaxDebugEnable=true;
/*-->]^]^>*/</script>
</head>]]></header-contribution><component id="test1" ><![CDATA[<span
id="test1">
<span>
<span>first</span><br/>
</span><span>
<span>second</span><br/>
</span>
</span>]]></component><evaluate><![CDATA[setTimeout("var
wcall=wicketAjaxGet('?wicket:interface=:1:form:test::IActivePageBehaviorListener:0:-1&wicket:ignoreIfNotActive=true',null,null,
function() {var c = Wicket.$('test1'); return typeof(c) != 'undefined'
&& c != null}.bind(this));", 3000);]]></evaluate></ajax-response>
INFO: Response parsed. Now invoking steps...
Wicket 1.2.6:
INFO: Received ajax response (496 characters)
INFO:
<?xml version="1.0" encoding="UTF-8"?><ajax-response><component
id="form_test" ><![CDATA[<span id="form_test">
<span>
<span>first</span><br/>
</span><span>
<span>second</span><br/>
</span>
</span>]]></component><evaluate><![CDATA[setTimeout("var
wcall=wicketAjaxGet('/wicket/?wicket:interface=:0:form:test:-1:IUnversionedBehaviorListener&wicket:behaviorId=0&wicket:ignoreIfNotActive=true',
function() { }, function() { });", 3000);]]></evaluate></ajax-response>
INFO: Response parsed. Now invoking steps...
Jani
Igor Vaynberg wrote:
> not really sure we can do anything. if you have a dropdown open and we
> tweak the dom tree it is the browser that closes it...
>
> -igor
>
>
> On Mon, Mar 10, 2008 at 1:40 AM, Jani Väisänen
> <ja...@syncrontech.com> wrote:
>> Yes. I created a new issue:
>> https://issues.apache.org/jira/browse/WICKET-1405
>>
>> -Jani
>>
>>
>>
>> Johan Compagner wrote:
>> > Did you crreate a jira issue for this with that test case? This will
>> > be lost on the userlist
>> >
>> > On 3/10/08, Jani Väisänen <ja...@syncrontech.com> wrote:
>> >> Selected components lose focus on every update even if it is not updated.
>> >> If the page have a list which is updated on every second and a dropdown
>> >> which isn't updated at all, user has to do his selection from the
>> >> dropdown within that update interval. The dropdown list is closed on
>> >> every update in IE6. This problem doesn't occur with wicket 1.2.6.
>> >>
>> >> I made sample code, which can be found from:
>> >> https://download.syncrontech.com/public/update_problem_ie6.zip
>> >>
>> >> Ajax debug:
>> >> INFO: Received ajax response (1181 characters)
>> >> INFO:
>> >> <?xml version="1.0"
>> >> encoding="UTF-8"?><ajax-response><header-contribution encoding="wicket1"
>> >> ><![CDATA[<head xmlns:wicket="http://wicket.apache.org"><script
>> >> type="text/javascript"
>> >> src="resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
>> >>
>> >> <script type="text/javascript"
>> >> src="resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
>> >>
>> >> <script type="text/javascript"
>> >> src="resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
>> >>
>> >> <script type="text/javascript"
>> >> id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/
>> >> wicketAjaxDebugEnable=true;
>> >> /*-->]^]^>*/</script>
>> >>
>> >> </head>]]></header-contribution><component id="test1" ><![CDATA[<span
>> >> id="test1">
>> >> <span>
>> >> <span>first</span><br/>
>> >> </span><span>
>> >> <span>second</span><br/>
>> >> </span>
>> >> </span>]]></component><evaluate><![CDATA[setTimeout("var
>> >> wcall=wicketAjaxGet('?wicket:interface=:0:form:test::IActivePageBehaviorListener:0:-1&wicket:ignoreIfNotActive=true',null,null,
>> >> function() {var c = Wicket.$('test1'); return typeof(c) != 'undefined'
>> >> && c != null}.bind(this));", 3000);]]></evaluate></ajax-response>
>> >>
>> >> -Jani
>> >>
>> >> Igor Vaynberg wrote:
>> >>> what kind of usability problems?
>> >>>
>> >>> -igor
>> >>>
>> >>>
>> >>> On Fri, Mar 7, 2008 at 12:41 AM, Jani Väisänen
>> >>> <ja...@syncrontech.com> wrote:
>> >>>> I have a case with AbstractAjaxTimerBehavior on wicket 1.3.1.
>> >>>> AbstractAjaxTimerBehavior seems to add header-contribution to every ajax
>> >>>> response.
>> >>>>
>> >>>> The method renderHead calls super.renderHead
>> >>>> (AbstractDefaultAjaxBehavior), which adds lines:
>> >>>> - response.renderJavascriptReference(WicketEventReference.INSTANCE);
>> >> -
>> >>>> response.renderJavascriptReference(WicketAjaxReference.INSTANCE);
>> >>>> to every response.
>> >>>>
>> >>>> This behavior causes at least usability problems in IE6.
>> >>>>
>> >>>> -Jani
>> >>>>
>>
Re: Problems with AbstractAjaxTimerBehavior
Posted by Igor Vaynberg <ig...@gmail.com>.
not really sure we can do anything. if you have a dropdown open and we
tweak the dom tree it is the browser that closes it...
-igor
On Mon, Mar 10, 2008 at 1:40 AM, Jani Väisänen
<ja...@syncrontech.com> wrote:
> Yes. I created a new issue:
> https://issues.apache.org/jira/browse/WICKET-1405
>
> -Jani
>
>
>
> Johan Compagner wrote:
> > Did you crreate a jira issue for this with that test case? This will
> > be lost on the userlist
> >
> > On 3/10/08, Jani Väisänen <ja...@syncrontech.com> wrote:
> >> Selected components lose focus on every update even if it is not updated.
> >> If the page have a list which is updated on every second and a dropdown
> >> which isn't updated at all, user has to do his selection from the
> >> dropdown within that update interval. The dropdown list is closed on
> >> every update in IE6. This problem doesn't occur with wicket 1.2.6.
> >>
> >> I made sample code, which can be found from:
> >> https://download.syncrontech.com/public/update_problem_ie6.zip
> >>
> >> Ajax debug:
> >> INFO: Received ajax response (1181 characters)
> >> INFO:
> >> <?xml version="1.0"
> >> encoding="UTF-8"?><ajax-response><header-contribution encoding="wicket1"
> >> ><![CDATA[<head xmlns:wicket="http://wicket.apache.org"><script
> >> type="text/javascript"
> >> src="resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
> >>
> >> <script type="text/javascript"
> >> src="resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
> >>
> >> <script type="text/javascript"
> >> src="resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
> >>
> >> <script type="text/javascript"
> >> id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/
> >> wicketAjaxDebugEnable=true;
> >> /*-->]^]^>*/</script>
> >>
> >> </head>]]></header-contribution><component id="test1" ><![CDATA[<span
> >> id="test1">
> >> <span>
> >> <span>first</span><br/>
> >> </span><span>
> >> <span>second</span><br/>
> >> </span>
> >> </span>]]></component><evaluate><![CDATA[setTimeout("var
> >> wcall=wicketAjaxGet('?wicket:interface=:0:form:test::IActivePageBehaviorListener:0:-1&wicket:ignoreIfNotActive=true',null,null,
> >> function() {var c = Wicket.$('test1'); return typeof(c) != 'undefined'
> >> && c != null}.bind(this));", 3000);]]></evaluate></ajax-response>
> >>
> >> -Jani
> >>
> >> Igor Vaynberg wrote:
> >>> what kind of usability problems?
> >>>
> >>> -igor
> >>>
> >>>
> >>> On Fri, Mar 7, 2008 at 12:41 AM, Jani Väisänen
> >>> <ja...@syncrontech.com> wrote:
> >>>> I have a case with AbstractAjaxTimerBehavior on wicket 1.3.1.
> >>>> AbstractAjaxTimerBehavior seems to add header-contribution to every ajax
> >>>> response.
> >>>>
> >>>> The method renderHead calls super.renderHead
> >>>> (AbstractDefaultAjaxBehavior), which adds lines:
> >>>> - response.renderJavascriptReference(WicketEventReference.INSTANCE);
> >> -
> >>>> response.renderJavascriptReference(WicketAjaxReference.INSTANCE);
> >>>> to every response.
> >>>>
> >>>> This behavior causes at least usability problems in IE6.
> >>>>
> >>>> -Jani
> >>>>
>
>
>
Re: Problems with AbstractAjaxTimerBehavior
Posted by Jani Väisänen <ja...@syncrontech.com>.
Yes. I created a new issue:
https://issues.apache.org/jira/browse/WICKET-1405
-Jani
Johan Compagner wrote:
> Did you crreate a jira issue for this with that test case? This will
> be lost on the userlist
>
> On 3/10/08, Jani Väisänen <ja...@syncrontech.com> wrote:
>> Selected components lose focus on every update even if it is not updated.
>> If the page have a list which is updated on every second and a dropdown
>> which isn't updated at all, user has to do his selection from the
>> dropdown within that update interval. The dropdown list is closed on
>> every update in IE6. This problem doesn't occur with wicket 1.2.6.
>>
>> I made sample code, which can be found from:
>> https://download.syncrontech.com/public/update_problem_ie6.zip
>>
>> Ajax debug:
>> INFO: Received ajax response (1181 characters)
>> INFO:
>> <?xml version="1.0"
>> encoding="UTF-8"?><ajax-response><header-contribution encoding="wicket1"
>> ><![CDATA[<head xmlns:wicket="http://wicket.apache.org"><script
>> type="text/javascript"
>> src="resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
>>
>> <script type="text/javascript"
>> src="resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
>>
>> <script type="text/javascript"
>> src="resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
>>
>> <script type="text/javascript"
>> id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/
>> wicketAjaxDebugEnable=true;
>> /*-->]^]^>*/</script>
>>
>> </head>]]></header-contribution><component id="test1" ><![CDATA[<span
>> id="test1">
>> <span>
>> <span>first</span><br/>
>> </span><span>
>> <span>second</span><br/>
>> </span>
>> </span>]]></component><evaluate><![CDATA[setTimeout("var
>> wcall=wicketAjaxGet('?wicket:interface=:0:form:test::IActivePageBehaviorListener:0:-1&wicket:ignoreIfNotActive=true',null,null,
>> function() {var c = Wicket.$('test1'); return typeof(c) != 'undefined'
>> && c != null}.bind(this));", 3000);]]></evaluate></ajax-response>
>>
>> -Jani
>>
>> Igor Vaynberg wrote:
>>> what kind of usability problems?
>>>
>>> -igor
>>>
>>>
>>> On Fri, Mar 7, 2008 at 12:41 AM, Jani Väisänen
>>> <ja...@syncrontech.com> wrote:
>>>> I have a case with AbstractAjaxTimerBehavior on wicket 1.3.1.
>>>> AbstractAjaxTimerBehavior seems to add header-contribution to every ajax
>>>> response.
>>>>
>>>> The method renderHead calls super.renderHead
>>>> (AbstractDefaultAjaxBehavior), which adds lines:
>>>> - response.renderJavascriptReference(WicketEventReference.INSTANCE);
>> -
>>>> response.renderJavascriptReference(WicketAjaxReference.INSTANCE);
>>>> to every response.
>>>>
>>>> This behavior causes at least usability problems in IE6.
>>>>
>>>> -Jani
>>>>
Re: Problems with AbstractAjaxTimerBehavior
Posted by Johan Compagner <jc...@gmail.com>.
Did you crreate a jira issue for this with that test case? This will
be lost on the userlist
On 3/10/08, Jani Väisänen <ja...@syncrontech.com> wrote:
> Selected components lose focus on every update even if it is not updated.
> If the page have a list which is updated on every second and a dropdown
> which isn't updated at all, user has to do his selection from the
> dropdown within that update interval. The dropdown list is closed on
> every update in IE6. This problem doesn't occur with wicket 1.2.6.
>
> I made sample code, which can be found from:
> https://download.syncrontech.com/public/update_problem_ie6.zip
>
> Ajax debug:
> INFO: Received ajax response (1181 characters)
> INFO:
> <?xml version="1.0"
> encoding="UTF-8"?><ajax-response><header-contribution encoding="wicket1"
> ><![CDATA[<head xmlns:wicket="http://wicket.apache.org"><script
> type="text/javascript"
> src="resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
>
> <script type="text/javascript"
> src="resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
>
> <script type="text/javascript"
> src="resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
>
> <script type="text/javascript"
> id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/
> wicketAjaxDebugEnable=true;
> /*-->]^]^>*/</script>
>
> </head>]]></header-contribution><component id="test1" ><![CDATA[<span
> id="test1">
> <span>
> <span>first</span><br/>
> </span><span>
> <span>second</span><br/>
> </span>
> </span>]]></component><evaluate><![CDATA[setTimeout("var
> wcall=wicketAjaxGet('?wicket:interface=:0:form:test::IActivePageBehaviorListener:0:-1&wicket:ignoreIfNotActive=true',null,null,
> function() {var c = Wicket.$('test1'); return typeof(c) != 'undefined'
> && c != null}.bind(this));", 3000);]]></evaluate></ajax-response>
>
> -Jani
>
> Igor Vaynberg wrote:
> > what kind of usability problems?
> >
> > -igor
> >
> >
> > On Fri, Mar 7, 2008 at 12:41 AM, Jani Väisänen
> > <ja...@syncrontech.com> wrote:
> >> I have a case with AbstractAjaxTimerBehavior on wicket 1.3.1.
> >> AbstractAjaxTimerBehavior seems to add header-contribution to every ajax
> >> response.
> >>
> >> The method renderHead calls super.renderHead
> >> (AbstractDefaultAjaxBehavior), which adds lines:
> >> - response.renderJavascriptReference(WicketEventReference.INSTANCE);
> -
> >> response.renderJavascriptReference(WicketAjaxReference.INSTANCE);
> >> to every response.
> >>
> >> This behavior causes at least usability problems in IE6.
> >>
> >> -Jani
> >>
> >
>
>
Re: Problems with AbstractAjaxTimerBehavior
Posted by Jani Väisänen <ja...@syncrontech.com>.
Selected components lose focus on every update even if it is not updated.
If the page have a list which is updated on every second and a dropdown
which isn't updated at all, user has to do his selection from the
dropdown within that update interval. The dropdown list is closed on
every update in IE6. This problem doesn't occur with wicket 1.2.6.
I made sample code, which can be found from:
https://download.syncrontech.com/public/update_problem_ie6.zip
Ajax debug:
INFO: Received ajax response (1181 characters)
INFO:
<?xml version="1.0"
encoding="UTF-8"?><ajax-response><header-contribution encoding="wicket1"
><![CDATA[<head xmlns:wicket="http://wicket.apache.org"><script
type="text/javascript"
src="resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js"></script>
<script type="text/javascript"
src="resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js"></script>
<script type="text/javascript"
src="resources/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/wicket-ajax-debug.js"></script>
<script type="text/javascript"
id="wicket-ajax-debug-enable"><!--/*--><![CDATA[/*><!--*/
wicketAjaxDebugEnable=true;
/*-->]^]^>*/</script>
</head>]]></header-contribution><component id="test1" ><![CDATA[<span
id="test1">
<span>
<span>first</span><br/>
</span><span>
<span>second</span><br/>
</span>
</span>]]></component><evaluate><![CDATA[setTimeout("var
wcall=wicketAjaxGet('?wicket:interface=:0:form:test::IActivePageBehaviorListener:0:-1&wicket:ignoreIfNotActive=true',null,null,
function() {var c = Wicket.$('test1'); return typeof(c) != 'undefined'
&& c != null}.bind(this));", 3000);]]></evaluate></ajax-response>
-Jani
Igor Vaynberg wrote:
> what kind of usability problems?
>
> -igor
>
>
> On Fri, Mar 7, 2008 at 12:41 AM, Jani Väisänen
> <ja...@syncrontech.com> wrote:
>> I have a case with AbstractAjaxTimerBehavior on wicket 1.3.1.
>> AbstractAjaxTimerBehavior seems to add header-contribution to every ajax
>> response.
>>
>> The method renderHead calls super.renderHead
>> (AbstractDefaultAjaxBehavior), which adds lines:
>> - response.renderJavascriptReference(WicketEventReference.INSTANCE); -
>> response.renderJavascriptReference(WicketAjaxReference.INSTANCE);
>> to every response.
>>
>> This behavior causes at least usability problems in IE6.
>>
>> -Jani
>>
>
Re: Problems with AbstractAjaxTimerBehavior
Posted by Igor Vaynberg <ig...@gmail.com>.
what kind of usability problems?
-igor
On Fri, Mar 7, 2008 at 12:41 AM, Jani Väisänen
<ja...@syncrontech.com> wrote:
> I have a case with AbstractAjaxTimerBehavior on wicket 1.3.1.
> AbstractAjaxTimerBehavior seems to add header-contribution to every ajax
> response.
>
> The method renderHead calls super.renderHead
> (AbstractDefaultAjaxBehavior), which adds lines:
> - response.renderJavascriptReference(WicketEventReference.INSTANCE); -
> response.renderJavascriptReference(WicketAjaxReference.INSTANCE);
> to every response.
>
> This behavior causes at least usability problems in IE6.
>
> -Jani
>