[jira] Commented: (WICKET-618) auto add javascript in AjaxRequestTarget for behaviors that implement IHeaderContributor

2007-06-08 Thread Matej Knopp (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12502892
 ] 

Matej Knopp commented on WICKET-618:


I don't understand this. It should be already supported. If there still is 
issue with this i'll need something to reproduce it.
Btw. You can easily determine whether the request is ajax (WebRequest.isAjax()) 
.

> auto add javascript in AjaxRequestTarget for behaviors that implement 
> IHeaderContributor 
> -
>
> Key: WICKET-618
> URL: https://issues.apache.org/jira/browse/WICKET-618
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Reporter: Ryan Sonnek
>Assignee: Matej Knopp
>
> see:
> http://www.nabble.com/adding-a-listener-to-the-AjaxRequestTarget-tf3065865.html#a8548871
> It's very common to have a component that renders javascript into the head, 
> and if it's refreshed with an ajax operation, the component no longer works 
> because the javascript wasn't re-attached.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (WICKET-618) auto add javascript in AjaxRequestTarget for behaviors that implement IHeaderContributor

2007-06-06 Thread Ryan Sonnek (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12502204
 ] 

Ryan Sonnek commented on WICKET-618:


One interesting thing to note is that the javascript rendered in the header 
contribution may need to be different than the javascript appended to an ajax 
request.

for example, my components usually use onload scripts in the header to make 
sure they are executed after the DOM is loaded:
Event.observe(window, 'load', function() {
  doStuff();
}

When the ajax operation occurs, i don't think it's correct to re-attach this 
onload function (i could be wrong).  I think the correct behavior would be just 
to stream down:
  doStuff();

This seems to be a pretty common usecase, and I'm not sure the best way for 
wicket to handle this...

> auto add javascript in AjaxRequestTarget for behaviors that implement 
> IHeaderContributor 
> -
>
> Key: WICKET-618
> URL: https://issues.apache.org/jira/browse/WICKET-618
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Reporter: Ryan Sonnek
>Assignee: Matej Knopp
>
> see:
> http://www.nabble.com/adding-a-listener-to-the-AjaxRequestTarget-tf3065865.html#a8548871
> It's very common to have a component that renders javascript into the head, 
> and if it's refreshed with an ajax operation, the component no longer works 
> because the javascript wasn't re-attached.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (WICKET-618) auto add javascript in AjaxRequestTarget for behaviors that implement IHeaderContributor

2007-06-05 Thread Eelco Hillenius (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12501741
 ] 

Eelco Hillenius commented on WICKET-618:


probably related: 
http://www.nabble.com/DateField-in-1.3-extensions-doesn%27t-work-across-Ajax-requests-tf3873582.html

> auto add javascript in AjaxRequestTarget for behaviors that implement 
> IHeaderContributor 
> -
>
> Key: WICKET-618
> URL: https://issues.apache.org/jira/browse/WICKET-618
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Reporter: Ryan Sonnek
>
> see:
> http://www.nabble.com/adding-a-listener-to-the-AjaxRequestTarget-tf3065865.html#a8548871
> It's very common to have a component that renders javascript into the head, 
> and if it's refreshed with an ajax operation, the component no longer works 
> because the javascript wasn't re-attached.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.