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

Hudson commented on WICKET-2886:
--------------------------------

Integrated in Apache Wicket 1.4.x #214 (See 
[https://hudson.apache.org/hudson/job/Apache%20Wicket%201.4.x/214/])
    WICKET-3112 Fix of issue 2886 breaks all individual implementations of any 
AbstractTree

Don't use Swing's TreeNode in AbstractTree.
Apply the patch provided by Mike Hefner with slight modifications.

brix-demo /admin works fine.
the reporter of WICKET-2886 also confirmed that the patch doesn't break the 
previous fix


> Tree doesn't update correctly
> -----------------------------
>
>                 Key: WICKET-2886
>                 URL: https://issues.apache.org/jira/browse/WICKET-2886
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.8
>         Environment: tomcat 6.0.14, win 7
>            Reporter: Sergey Plevko
>            Assignee: Igor Vaynberg
>             Fix For: 1.4.11, 1.5-M2.1
>
>         Attachments: WICKET-2886-fix.patch, WICKET-2886-Quickstart.zip
>
>
> When we add a first child to the node this update doesn't appeare in a 
> browser. If we collapse/expand this the parent node forced we will see 
> changes. All the rest updates work correctly.
> This bug easily can be reproduced with the next pice of code.
> TestPage.html 
> <html xmlns="http://www.w3.org/1999/xhtml"; 
> xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd";>
> <body>
> <table>
>     <tr>        <td>            <div wicket:id="tree"></div>        </td>    
> </tr>
>     <tr>        <td>            <input type="submit" wicket:id="addChild" 
> class="btn btnStd" />        </td>    </tr>
> </table>
> </body>
> </html>
> TestPage.java
> public class TestPage extends WebPage {
>     public MainTreeTestPage() {
>         DefaultMutableTreeNode root = new DefaultMutableTreeNode("root");
>         final DefaultMutableTreeNode rootChild = new 
> DefaultMutableTreeNode("rootChild");
>         root.add(rootChild);
>         final DefaultTreeModel treeModel = new DefaultTreeModel(root);
>         final BaseTree tree = new LinkTree("tree", treeModel);
>         add(tree);
>         tree.getTreeState().expandNode(root);
>         AjaxLink addButton = new AjaxLink("addChild") {
>             public void onClick(AjaxRequestTarget ajaxRequestTarget) {
>                 DefaultMutableTreeNode child = new 
> DefaultMutableTreeNode("child");
>                 //rootChild.add(child); // it doesn't matter how we add this 
> child
>                 treeModel.insertNodeInto(child, rootChild, 0);
>                 tree.updateTree(ajaxRequestTarget);
>             }
>         };
>         add(addButton);
>     }
> }

-- 
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