traveling down the implementations of 

AjaxRequestTarget.add
AjaxRequestHandler public void add(Component... components)

one comes across to:

AbstractAjaxResponse.add((final Component component, final String markupId)

I don't see code that signals the Component that it was added to an 
AjaxRequestTarget

it just seems to end up in an HashMap of AbstractAjaxResponse

markupIdToComponent.put(markupId, component);


So my guess is, that the component itself can't detect that it was added.

If you are serious about it, maybe deriving form AjaxRequestHandler and than 
hooking the derived Handler up into the Application might help.

At least the Application has a setter for the AjaxRequestTargetProvider:
        @Override
        protected void internalInit()
        {
[...]
                setAjaxRequestTargetProvider(new 
DefaultAjaxRequestTargetProvider());
[...}
        }


Though I'm not sure if that is an ok path, maybe someone else has a better idea.

Martin



Am 01.11.2013 um 14:45 schrieb Nick Pratt <nbpr...@gmail.com>:

> Is there a way for a Component to detect if its been added to an
> AjaxRequestTarget?
> 
> N


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

Reply via email to