Prepending JS in AjaxRequestTarget via listener is unusable
-----------------------------------------------------------

                 Key: WICKET-1727
                 URL: https://issues.apache.org/jira/browse/WICKET-1727
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 1.4-M2
         Environment: java 1.6, windows
            Reporter: Karel Cabel


If component wants prepend javascript in ajax request, the only way to do it is 
register itself like listener in ajax request and then implements
method AjaxRequestTarget.IListener.onBeforeRespond. This method is called 
before prepending. Other methods (like onRender, onBeforeRender, ...)
are called AFTER prepending, so they can't be used for...

It works, but problem is, who will register this component? Now, it must be 
registered manually in ajax method and this method
must know, that this component will be rendered in this ajax request. And this 
is very bad.
In other words, component has no chance to register itself BEFORE prepending...

I think, that there should be some method (like onBeforeRender) called in 
AjaxRequestTarget.respond() BEFORE prepending (called on every component)...

Karel



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

Reply via email to