wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Audenaerde <rob.audenae...@gmail.com>
Subject AjaxEventBehavior/AjaxFormComponentUpdatingBehavior & visibility
Date Mon, 20 Jan 2020 09:36:36 GMT
Hi all,

I recently got some javascript errors that came from behaviors of
components that where triggered to be visible or invisible in the dom
(using onConfigure()) in an ajax request.

Typically something like:

Wicket.Ajax:  Cannot bind a listener for event "change" on element
"format1dd" because the element is not in the DOM

I solve this by adding an isVisibleInHierarchy() check in the renderHead()
like this:


public void renderHead(final Component component, final IHeaderResponse
response) {
    if (component.isVisibleInHierarchy()) {
        super.renderHead(component, response);

I was wondering if this is the 'correct' way to solve this? Or am I doing
something wrong?

Please advise :)


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message