You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2014/04/03 10:51:20 UTC

[jira] [Comment Edited] (WICKET-5543) wicket:enclusore attribute prevents Behaviour execution

    [ https://issues.apache.org/jira/browse/WICKET-5543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13948376#comment-13948376 ] 

Martin Grigorov edited comment on WICKET-5543 at 4/3/14 8:50 AM:
-----------------------------------------------------------------

Here is a patch that fixes this particular problem.

The problem is that in Ajax request the InlineEnclosure itself is repainted instead of the controlling child. But the InlineEnclosure doesn't have children components, they are children of the enclosure's parent in the component tree, so when the enclosure is repainted its #renderHead() is called but this method is not called for the childrens.
The patch delegates the call to the controlling child and fixes the problem. But this is just a best effort because all other children that this enclosure may have won't be notified...

In Wicket 7 all this can be solved by using queue(enclosureChild1, enclosureChild2, etc.) instead of add(). See WICKET-3335. By using queueing the component tree is properly constructed.

In Wicket 6.x I'd recommend you to use EnclosureContainer instead of wicket:enclosure to avoid/workaround this problems.


was (Author: mgrigorov):
Here is a patch that fixes this particular problem.

The problem is that in Ajax request the InlineEnclosure itself is repainted instead of the controlling child. But the InlineEnclosure doesn't have children components, they are children of the enclosure's parent in the component tree, so when the enclosure is repainted its #renderHead() is called but this method is not called for the childrens.
The patch delegates the call to the controlling child and fixes the problem. But this is just a best effort because all other children that this enclosure may have won't be notified...

In Wicket 7 all this can be solved by using queue(enclosureChild1, enclosureChild1, etc.) instead of add(). See WICKET-3335. By using queueing the component tree is properly constructed.

In Wicket 6.x I'd recommend you to use EnclosureContainer instead of wicket:enclosure to avoid/workaround this problems.

> wicket:enclusore attribute prevents Behaviour execution
> -------------------------------------------------------
>
>                 Key: WICKET-5543
>                 URL: https://issues.apache.org/jira/browse/WICKET-5543
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.14.0
>         Environment: windows java7
>            Reporter: Giovanni Cuccu
>            Assignee: Martin Grigorov
>            Priority: Minor
>         Attachments: WICKET-5543.patch, enclosure_bug.zip
>
>
> the attached quickstart shows that if you add a AjaxFormComponentUpdatingBehavior on onchange to a DropdownChoice the event does not start if in the html the select tag is surrounded by a wicket:enclosure. 
> In the example try to select a value from combo1 and then a value from one of each of the other combo. The value in the label is not update if you select the value from "combo not working"  



--
This message was sent by Atlassian JIRA
(v6.2#6252)