Hi Sebastian

with #updateAjaxAttribute it seems working - thanks.
But how to add this behavior to the Selectable component, i.e. for the 
onSelect(AjaxRequestTarget target, List<String> items) method?

best regards, Chris

> Am 03.04.2015 um 22:34 schrieb Sebastien <[email protected]>:
> 
> Maybe can you run it before ajax is sent (see link#updateAjaxAttribute),
> its better than using onclick in that case, imo. And then reapply the
> tooltipbehavior globaly afterhand because detaching element from the tree
> make them unavailable to jquery anymore, even if you reattach them. If you
> are using a behavior, it should be "temporary", see isTemporary, to not
> have multiple registrations... If you are not using a behabior, you should
> likely #destroy your previous tooltip widget. Hope this helps (hope i
> understood the issue...)
> On Apr 3, 2015 10:02 PM, "Chris" <[email protected]> wrote:
> 
>> Hi Sebastian,
>> 
>> thanks a lot - it basically works but still I have a problem.
>> 
>> Intro:
>> I am using a JS library to display tooltips for certain elements in the
>> DOM tree.
>> The problem are tooltips for elements in a div container which is reloaded
>> by Ajax. After reloading the container, the tooltips cannot be hidden
>> anymore (seems that they cannot be referenced anymore). Therefore, as soon
>> as the ajax link is clicked, I am calling a JS method to hide and disable
>> the tooltips..
>> 
>> Problem:
>> When I call the page and click the ajax link, the JS method (to hide the
>> tooltips) is called correctly. However, as soon as some container of the
>> page is reloaded by Ajax and I click the link, the Javascript is not called
>> anymore. The link is part of the container that is reloaded.
>> 
>> I am calling the Javascript method via:
>> $(„#link").click(function () {…}
>> 
>> The Javascript is loaded in the Page via:
>> response.render(JavaScriptReferenceHeaderItem.forReference(JS-File));
>> 
>> Thanks a lot,
>> Chris
>> 
>> 
>>> Am 03.04.2015 um 21:34 schrieb Sebastien <[email protected]>:
>>> 
>>> response.render is also correct if belonging to the component you are
>>> re-adding. Idem, the scope is the issue imo
>>> On Apr 3, 2015 9:31 PM, "Sebastien" <[email protected]> wrote:
>>> 
>>>> Hi Chris,
>>>> target.appendJavaScript should work, but your method is probably on
>> window
>>>> scope, try window.method();
>>>> Also, check on the ajaxdebugwindow if the statement has well been added
>>>> for execution and it does not indicate an error...
>>>> Sebastien
>>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to