You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Ryan Sonnek (JIRA)" <ji...@apache.org> on 2007/06/05 21:56:26 UTC

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

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.


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

Posted by "Alastair Maw (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alastair Maw updated WICKET-618:
--------------------------------

    Fix Version/s: 1.4.0-alpha

> 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
>             Fix For: 1.4.0-alpha
>
>
> 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

Posted by "Matej Knopp (JIRA)" <ji...@apache.org>.
    [ 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] Assigned: (WICKET-618) auto add javascript in AjaxRequestTarget for behaviors that implement IHeaderContributor

Posted by "Eelco Hillenius (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eelco Hillenius reassigned WICKET-618:
--------------------------------------

    Assignee: Matej Knopp

Matej, you wanna look at this one?

> 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

Posted by "Eelco Hillenius (JIRA)" <ji...@apache.org>.
    [ 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.


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

Posted by "Ryan Sonnek (JIRA)" <ji...@apache.org>.
    [ 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.