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

Martin Grigorov commented on WICKET-2886:
-----------------------------------------

Sergey, Mike,

Can you please take a look at WICKET-3112? The patch for this ticket caused 
some troubles to applications that use Wicket Tree component without relying on 
Swing's TreeNode.
Can you please test your apps with the new patch in WICKET-3112 ?
Thanks!

> 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