You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Korbinian Bachl (JIRA)" <ji...@apache.org> on 2010/10/17 12:45:23 UTC

[jira] Created: (WICKET-3112) Fix of issue 2886 breaks all individual implementations of any AbstractTree

Fix of issue 2886 breaks all individual implementations of any AbstractTree
---------------------------------------------------------------------------

                 Key: WICKET-3112
                 URL: https://issues.apache.org/jira/browse/WICKET-3112
             Project: Wicket
          Issue Type: Sub-task
          Components: wicket
    Affects Versions: 1.4.12, 1.4.11
         Environment: any wicket 1.4 app
            Reporter: Korbinian Bachl
            Priority: Blocker


AbstratTree was originally written againt pure interfaces and not relies on a special Class, namely the javax.swing.tree.TreeNode. This breaks all custom tree's out there like e.g. the one in the brix project. 

A workaround to this problem I tried was unsuccessful as the problem is that many parts of AbstratTree are final and can't be easily overwritten and that many other projects epen on Abstrattree like the inmethod grid stuff and much more. This means that any special Nodes for trees can't be implemented anymore, making this a ultimate stopper for all projects rlying on some special nodes. IMHO 2886 should be reverted and then looked upon a differnet patch for this solution that doesn't break everything out there. 


Example from default Brxix 1.2.3-SNAPSHOT:
java.lang.ClassCastException: brix.plugin.menu.editor.MenuTreeNode
cannot be cast to javax.swing.tree.TreeNode
        at
org.apache.wicket.markup.html.tree.AbstractTree.treeNodesInserted(AbstractTree.java:
823)
        at
brix.web.tree.AbstractTreeModel.nodeInserted(AbstractTreeModel.java:
138)
        at brix.plugin.menu.editor.MenuEditor$5.onClick(MenuEditor.java:194)
        at org.apache.wicket.ajax.markup.html.AjaxLink
$1.onEvent(AjaxLink.java:68)
        at
org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
177)
        at
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:
300)
        at
org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:
119) 


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3112) Fix of issue 2886 breaks all individual implementations of any AbstractTree

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12921896#action_12921896 ] 

Hudson commented on WICKET-3112:
--------------------------------

Integrated in Apache Wicket 1.4.x #211 (See [https://hudson.apache.org/hudson/job/Apache%20Wicket%201.4.x/211/])
    WICKET-3112 Format the code

No functional changes


> Fix of issue 2886 breaks all individual implementations of any AbstractTree
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-3112
>                 URL: https://issues.apache.org/jira/browse/WICKET-3112
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 1.4.11, 1.4.12
>         Environment: any wicket 1.4 app
>            Reporter: Korbinian Bachl
>            Assignee: Martin Grigorov
>            Priority: Blocker
>         Attachments: WICKET-3112.patch, WICKET-3112.patch
>
>
> AbstratTree was originally written againt pure interfaces and not relies on a special Class, namely the javax.swing.tree.TreeNode. This breaks all custom tree's out there like e.g. the one in the brix project. 
> A workaround to this problem I tried was unsuccessful as the problem is that many parts of AbstratTree are final and can't be easily overwritten and that many other projects epen on Abstrattree like the inmethod grid stuff and much more. This means that any special Nodes for trees can't be implemented anymore, making this a ultimate stopper for all projects rlying on some special nodes. IMHO 2886 should be reverted and then looked upon a differnet patch for this solution that doesn't break everything out there. 
> Example from default Brxix 1.2.3-SNAPSHOT:
> java.lang.ClassCastException: brix.plugin.menu.editor.MenuTreeNode
> cannot be cast to javax.swing.tree.TreeNode
>         at
> org.apache.wicket.markup.html.tree.AbstractTree.treeNodesInserted(AbstractTree.java:
> 823)
>         at
> brix.web.tree.AbstractTreeModel.nodeInserted(AbstractTreeModel.java:
> 138)
>         at brix.plugin.menu.editor.MenuEditor$5.onClick(MenuEditor.java:194)
>         at org.apache.wicket.ajax.markup.html.AjaxLink
> $1.onEvent(AjaxLink.java:68)
>         at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
> 177)
>         at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:
> 300)
>         at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:
> 119) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3112) Fix of issue 2886 breaks all individual implementations of any AbstractTree

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922074#action_12922074 ] 

Martin Grigorov commented on WICKET-3112:
-----------------------------------------

Sergey,

Did you apply any of the patches in this ticket before testing ?
Latest SVN version doesn't contain any of these patches. That's why we ask the affected users for feedback.

> Fix of issue 2886 breaks all individual implementations of any AbstractTree
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-3112
>                 URL: https://issues.apache.org/jira/browse/WICKET-3112
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 1.4.11, 1.4.12
>         Environment: any wicket 1.4 app
>            Reporter: Korbinian Bachl
>            Assignee: Martin Grigorov
>            Priority: Blocker
>         Attachments: WICKET-3112.patch, WICKET-3112.patch, WICKET-3122-fix.patch
>
>
> AbstratTree was originally written againt pure interfaces and not relies on a special Class, namely the javax.swing.tree.TreeNode. This breaks all custom tree's out there like e.g. the one in the brix project. 
> A workaround to this problem I tried was unsuccessful as the problem is that many parts of AbstratTree are final and can't be easily overwritten and that many other projects epen on Abstrattree like the inmethod grid stuff and much more. This means that any special Nodes for trees can't be implemented anymore, making this a ultimate stopper for all projects rlying on some special nodes. IMHO 2886 should be reverted and then looked upon a differnet patch for this solution that doesn't break everything out there. 
> Example from default Brxix 1.2.3-SNAPSHOT:
> java.lang.ClassCastException: brix.plugin.menu.editor.MenuTreeNode
> cannot be cast to javax.swing.tree.TreeNode
>         at
> org.apache.wicket.markup.html.tree.AbstractTree.treeNodesInserted(AbstractTree.java:
> 823)
>         at
> brix.web.tree.AbstractTreeModel.nodeInserted(AbstractTreeModel.java:
> 138)
>         at brix.plugin.menu.editor.MenuEditor$5.onClick(MenuEditor.java:194)
>         at org.apache.wicket.ajax.markup.html.AjaxLink
> $1.onEvent(AjaxLink.java:68)
>         at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
> 177)
>         at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:
> 300)
>         at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:
> 119) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3112) Fix of issue 2886 breaks all individual implementations of any AbstractTree

Posted by "Mike Hefner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12923864#action_12923864 ] 

Mike Hefner commented on WICKET-3112:
-------------------------------------

I've created WICKET-3127 and attached a patch to fix the change in the add-node behavior that was introduced in the fix for WICKET-3112.

> Fix of issue 2886 breaks all individual implementations of any AbstractTree
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-3112
>                 URL: https://issues.apache.org/jira/browse/WICKET-3112
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 1.4.11, 1.4.12
>         Environment: any wicket 1.4 app
>            Reporter: Korbinian Bachl
>            Assignee: Martin Grigorov
>             Fix For: 1.4.13, 1.5-M3
>
>         Attachments: WICKET-3112.patch, WICKET-3112.patch, WICKET-3122-fix.patch
>
>
> AbstratTree was originally written againt pure interfaces and not relies on a special Class, namely the javax.swing.tree.TreeNode. This breaks all custom tree's out there like e.g. the one in the brix project. 
> A workaround to this problem I tried was unsuccessful as the problem is that many parts of AbstratTree are final and can't be easily overwritten and that many other projects epen on Abstrattree like the inmethod grid stuff and much more. This means that any special Nodes for trees can't be implemented anymore, making this a ultimate stopper for all projects rlying on some special nodes. IMHO 2886 should be reverted and then looked upon a differnet patch for this solution that doesn't break everything out there. 
> Example from default Brxix 1.2.3-SNAPSHOT:
> java.lang.ClassCastException: brix.plugin.menu.editor.MenuTreeNode
> cannot be cast to javax.swing.tree.TreeNode
>         at
> org.apache.wicket.markup.html.tree.AbstractTree.treeNodesInserted(AbstractTree.java:
> 823)
>         at
> brix.web.tree.AbstractTreeModel.nodeInserted(AbstractTreeModel.java:
> 138)
>         at brix.plugin.menu.editor.MenuEditor$5.onClick(MenuEditor.java:194)
>         at org.apache.wicket.ajax.markup.html.AjaxLink
> $1.onEvent(AjaxLink.java:68)
>         at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
> 177)
>         at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:
> 300)
>         at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:
> 119) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3112) Fix of issue 2886 breaks all individual implementations of any AbstractTree

Posted by "Mike Hefner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922080#action_12922080 ] 

Mike Hefner commented on WICKET-3112:
-------------------------------------

Korbinian,
I created the patch against AbstractTree.java revision 1023567, the latest in /branches/wicket-1.4.x. 

In my patched AbstractTree.java file, line 810 is in #markTheLastButOneChildDirty(), not one of the modified methods. Are you saying that when you apply the patch, the resulting file fails during compilation? Or is there an error when you run it?

If the error is during execution, can you give me the steps to reproduce it? I tested the patch against the latest wicket-1.4.x and the latest in brix trunk (1.2.3-SNAPSHOT).

Thanks

> Fix of issue 2886 breaks all individual implementations of any AbstractTree
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-3112
>                 URL: https://issues.apache.org/jira/browse/WICKET-3112
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 1.4.11, 1.4.12
>         Environment: any wicket 1.4 app
>            Reporter: Korbinian Bachl
>            Assignee: Martin Grigorov
>            Priority: Blocker
>         Attachments: WICKET-3112.patch, WICKET-3112.patch, WICKET-3122-fix.patch
>
>
> AbstratTree was originally written againt pure interfaces and not relies on a special Class, namely the javax.swing.tree.TreeNode. This breaks all custom tree's out there like e.g. the one in the brix project. 
> A workaround to this problem I tried was unsuccessful as the problem is that many parts of AbstratTree are final and can't be easily overwritten and that many other projects epen on Abstrattree like the inmethod grid stuff and much more. This means that any special Nodes for trees can't be implemented anymore, making this a ultimate stopper for all projects rlying on some special nodes. IMHO 2886 should be reverted and then looked upon a differnet patch for this solution that doesn't break everything out there. 
> Example from default Brxix 1.2.3-SNAPSHOT:
> java.lang.ClassCastException: brix.plugin.menu.editor.MenuTreeNode
> cannot be cast to javax.swing.tree.TreeNode
>         at
> org.apache.wicket.markup.html.tree.AbstractTree.treeNodesInserted(AbstractTree.java:
> 823)
>         at
> brix.web.tree.AbstractTreeModel.nodeInserted(AbstractTreeModel.java:
> 138)
>         at brix.plugin.menu.editor.MenuEditor$5.onClick(MenuEditor.java:194)
>         at org.apache.wicket.ajax.markup.html.AjaxLink
> $1.onEvent(AjaxLink.java:68)
>         at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
> 177)
>         at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:
> 300)
>         at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:
> 119) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3112) Fix of issue 2886 breaks all individual implementations of any AbstractTree

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg updated WICKET-3112:
----------------------------------

    Priority: Major  (was: Blocker)

> Fix of issue 2886 breaks all individual implementations of any AbstractTree
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-3112
>                 URL: https://issues.apache.org/jira/browse/WICKET-3112
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 1.4.11, 1.4.12
>         Environment: any wicket 1.4 app
>            Reporter: Korbinian Bachl
>            Assignee: Martin Grigorov
>         Attachments: WICKET-3112.patch, WICKET-3112.patch, WICKET-3122-fix.patch
>
>
> AbstratTree was originally written againt pure interfaces and not relies on a special Class, namely the javax.swing.tree.TreeNode. This breaks all custom tree's out there like e.g. the one in the brix project. 
> A workaround to this problem I tried was unsuccessful as the problem is that many parts of AbstratTree are final and can't be easily overwritten and that many other projects epen on Abstrattree like the inmethod grid stuff and much more. This means that any special Nodes for trees can't be implemented anymore, making this a ultimate stopper for all projects rlying on some special nodes. IMHO 2886 should be reverted and then looked upon a differnet patch for this solution that doesn't break everything out there. 
> Example from default Brxix 1.2.3-SNAPSHOT:
> java.lang.ClassCastException: brix.plugin.menu.editor.MenuTreeNode
> cannot be cast to javax.swing.tree.TreeNode
>         at
> org.apache.wicket.markup.html.tree.AbstractTree.treeNodesInserted(AbstractTree.java:
> 823)
>         at
> brix.web.tree.AbstractTreeModel.nodeInserted(AbstractTreeModel.java:
> 138)
>         at brix.plugin.menu.editor.MenuEditor$5.onClick(MenuEditor.java:194)
>         at org.apache.wicket.ajax.markup.html.AjaxLink
> $1.onEvent(AjaxLink.java:68)
>         at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
> 177)
>         at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:
> 300)
>         at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:
> 119) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-3112) Fix of issue 2886 breaks all individual implementations of any AbstractTree

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-3112.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5-M3
                   1.4.13

Mike's patch with minor improvements is applied in both 1.4.x and 1.5.x.
Please test your applications.

> Fix of issue 2886 breaks all individual implementations of any AbstractTree
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-3112
>                 URL: https://issues.apache.org/jira/browse/WICKET-3112
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 1.4.11, 1.4.12
>         Environment: any wicket 1.4 app
>            Reporter: Korbinian Bachl
>            Assignee: Martin Grigorov
>             Fix For: 1.4.13, 1.5-M3
>
>         Attachments: WICKET-3112.patch, WICKET-3112.patch, WICKET-3122-fix.patch
>
>
> AbstratTree was originally written againt pure interfaces and not relies on a special Class, namely the javax.swing.tree.TreeNode. This breaks all custom tree's out there like e.g. the one in the brix project. 
> A workaround to this problem I tried was unsuccessful as the problem is that many parts of AbstratTree are final and can't be easily overwritten and that many other projects epen on Abstrattree like the inmethod grid stuff and much more. This means that any special Nodes for trees can't be implemented anymore, making this a ultimate stopper for all projects rlying on some special nodes. IMHO 2886 should be reverted and then looked upon a differnet patch for this solution that doesn't break everything out there. 
> Example from default Brxix 1.2.3-SNAPSHOT:
> java.lang.ClassCastException: brix.plugin.menu.editor.MenuTreeNode
> cannot be cast to javax.swing.tree.TreeNode
>         at
> org.apache.wicket.markup.html.tree.AbstractTree.treeNodesInserted(AbstractTree.java:
> 823)
>         at
> brix.web.tree.AbstractTreeModel.nodeInserted(AbstractTreeModel.java:
> 138)
>         at brix.plugin.menu.editor.MenuEditor$5.onClick(MenuEditor.java:194)
>         at org.apache.wicket.ajax.markup.html.AjaxLink
> $1.onEvent(AjaxLink.java:68)
>         at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
> 177)
>         at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:
> 300)
>         at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:
> 119) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3112) Fix of issue 2886 breaks all individual implementations of any AbstractTree

Posted by "Korbinian Bachl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12921828#action_12921828 ] 

Korbinian Bachl commented on WICKET-3112:
-----------------------------------------

Im currently on the go, will have a look at it later when back at home. Thx for your work so far :) 

Ps: movement of nodes also work? 

Von meinem iPhone gesendet





> Fix of issue 2886 breaks all individual implementations of any AbstractTree
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-3112
>                 URL: https://issues.apache.org/jira/browse/WICKET-3112
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 1.4.11, 1.4.12
>         Environment: any wicket 1.4 app
>            Reporter: Korbinian Bachl
>            Priority: Blocker
>         Attachments: WICKET-3112.patch
>
>
> AbstratTree was originally written againt pure interfaces and not relies on a special Class, namely the javax.swing.tree.TreeNode. This breaks all custom tree's out there like e.g. the one in the brix project. 
> A workaround to this problem I tried was unsuccessful as the problem is that many parts of AbstratTree are final and can't be easily overwritten and that many other projects epen on Abstrattree like the inmethod grid stuff and much more. This means that any special Nodes for trees can't be implemented anymore, making this a ultimate stopper for all projects rlying on some special nodes. IMHO 2886 should be reverted and then looked upon a differnet patch for this solution that doesn't break everything out there. 
> Example from default Brxix 1.2.3-SNAPSHOT:
> java.lang.ClassCastException: brix.plugin.menu.editor.MenuTreeNode
> cannot be cast to javax.swing.tree.TreeNode
>         at
> org.apache.wicket.markup.html.tree.AbstractTree.treeNodesInserted(AbstractTree.java:
> 823)
>         at
> brix.web.tree.AbstractTreeModel.nodeInserted(AbstractTreeModel.java:
> 138)
>         at brix.plugin.menu.editor.MenuEditor$5.onClick(MenuEditor.java:194)
>         at org.apache.wicket.ajax.markup.html.AjaxLink
> $1.onEvent(AjaxLink.java:68)
>         at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
> 177)
>         at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:
> 300)
>         at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:
> 119) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3112) Fix of issue 2886 breaks all individual implementations of any AbstractTree

Posted by "Korbinian Bachl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922165#action_12922165 ] 

Korbinian Bachl commented on WICKET-3112:
-----------------------------------------

@Mike:

dont know what happens here, just rechecked it:

svn co http://svn.apache.org/repos/asf/wicket/branches/wicket-1.4.x wicket-1.4.x

then open in IDEA and apply patch (IDEA grabs correct revision by itself from SVN)

then patch is applied, all well, but lines 801 - 807 want a parentItem that is never defined, see here (whole function):

(start-lini is: 772)

public final void treeNodesChanged(TreeModelEvent e)
	{
		if (dirtyAll)
		{
			return;
		}
		// has root node changed?
		if (e.getChildren() == null)
		{
			if (rootItem != null)
			{
				invalidateNode(rootItem.getModelObject(), true);
			}
		}
		else
		{
			// go through all changed nodes
			Object[] children = e.getChildren();
			if (children != null)
			{
				for (Object node : children)
				{
					if (isNodeVisible(node))
					{
						// if the nodes is visible invalidate it
						invalidateNode(node, true);
					}
				}
			}

			if (!parentItem.hasChildTreeItems())
			{
				// rebuild parent's icon to show it no longer has children
				invalidateNode(parentNode, true);
			}

		}
	}

> Fix of issue 2886 breaks all individual implementations of any AbstractTree
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-3112
>                 URL: https://issues.apache.org/jira/browse/WICKET-3112
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 1.4.11, 1.4.12
>         Environment: any wicket 1.4 app
>            Reporter: Korbinian Bachl
>            Assignee: Martin Grigorov
>            Priority: Blocker
>         Attachments: WICKET-3112.patch, WICKET-3112.patch, WICKET-3122-fix.patch
>
>
> AbstratTree was originally written againt pure interfaces and not relies on a special Class, namely the javax.swing.tree.TreeNode. This breaks all custom tree's out there like e.g. the one in the brix project. 
> A workaround to this problem I tried was unsuccessful as the problem is that many parts of AbstratTree are final and can't be easily overwritten and that many other projects epen on Abstrattree like the inmethod grid stuff and much more. This means that any special Nodes for trees can't be implemented anymore, making this a ultimate stopper for all projects rlying on some special nodes. IMHO 2886 should be reverted and then looked upon a differnet patch for this solution that doesn't break everything out there. 
> Example from default Brxix 1.2.3-SNAPSHOT:
> java.lang.ClassCastException: brix.plugin.menu.editor.MenuTreeNode
> cannot be cast to javax.swing.tree.TreeNode
>         at
> org.apache.wicket.markup.html.tree.AbstractTree.treeNodesInserted(AbstractTree.java:
> 823)
>         at
> brix.web.tree.AbstractTreeModel.nodeInserted(AbstractTreeModel.java:
> 138)
>         at brix.plugin.menu.editor.MenuEditor$5.onClick(MenuEditor.java:194)
>         at org.apache.wicket.ajax.markup.html.AjaxLink
> $1.onEvent(AjaxLink.java:68)
>         at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
> 177)
>         at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:
> 300)
>         at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:
> 119) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3112) Fix of issue 2886 breaks all individual implementations of any AbstractTree

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12921821#action_12921821 ] 

Martin Grigorov commented on WICKET-3112:
-----------------------------------------

Brix uses Wicket 1.4.1.
I just set brix-demo/pom.xml to use 1,4-SNAPSHOT and the demo app works ok. As far as I can tell it uses MenuPlugin.

How this problem can be reproduced ?

> Fix of issue 2886 breaks all individual implementations of any AbstractTree
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-3112
>                 URL: https://issues.apache.org/jira/browse/WICKET-3112
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 1.4.11, 1.4.12
>         Environment: any wicket 1.4 app
>            Reporter: Korbinian Bachl
>            Priority: Blocker
>
> AbstratTree was originally written againt pure interfaces and not relies on a special Class, namely the javax.swing.tree.TreeNode. This breaks all custom tree's out there like e.g. the one in the brix project. 
> A workaround to this problem I tried was unsuccessful as the problem is that many parts of AbstratTree are final and can't be easily overwritten and that many other projects epen on Abstrattree like the inmethod grid stuff and much more. This means that any special Nodes for trees can't be implemented anymore, making this a ultimate stopper for all projects rlying on some special nodes. IMHO 2886 should be reverted and then looked upon a differnet patch for this solution that doesn't break everything out there. 
> Example from default Brxix 1.2.3-SNAPSHOT:
> java.lang.ClassCastException: brix.plugin.menu.editor.MenuTreeNode
> cannot be cast to javax.swing.tree.TreeNode
>         at
> org.apache.wicket.markup.html.tree.AbstractTree.treeNodesInserted(AbstractTree.java:
> 823)
>         at
> brix.web.tree.AbstractTreeModel.nodeInserted(AbstractTreeModel.java:
> 138)
>         at brix.plugin.menu.editor.MenuEditor$5.onClick(MenuEditor.java:194)
>         at org.apache.wicket.ajax.markup.html.AjaxLink
> $1.onEvent(AjaxLink.java:68)
>         at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
> 177)
>         at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:
> 300)
>         at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:
> 119) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3112) Fix of issue 2886 breaks all individual implementations of any AbstractTree

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922803#action_12922803 ] 

Hudson commented on WICKET-3112:
--------------------------------

Integrated in Apache Wicket 1.5.x #424 (See [https://hudson.apache.org/hudson/job/Apache%20Wicket%201.5.x/424/])
    

> Fix of issue 2886 breaks all individual implementations of any AbstractTree
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-3112
>                 URL: https://issues.apache.org/jira/browse/WICKET-3112
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 1.4.11, 1.4.12
>         Environment: any wicket 1.4 app
>            Reporter: Korbinian Bachl
>            Assignee: Martin Grigorov
>             Fix For: 1.4.13, 1.5-M3
>
>         Attachments: WICKET-3112.patch, WICKET-3112.patch, WICKET-3122-fix.patch
>
>
> AbstratTree was originally written againt pure interfaces and not relies on a special Class, namely the javax.swing.tree.TreeNode. This breaks all custom tree's out there like e.g. the one in the brix project. 
> A workaround to this problem I tried was unsuccessful as the problem is that many parts of AbstratTree are final and can't be easily overwritten and that many other projects epen on Abstrattree like the inmethod grid stuff and much more. This means that any special Nodes for trees can't be implemented anymore, making this a ultimate stopper for all projects rlying on some special nodes. IMHO 2886 should be reverted and then looked upon a differnet patch for this solution that doesn't break everything out there. 
> Example from default Brxix 1.2.3-SNAPSHOT:
> java.lang.ClassCastException: brix.plugin.menu.editor.MenuTreeNode
> cannot be cast to javax.swing.tree.TreeNode
>         at
> org.apache.wicket.markup.html.tree.AbstractTree.treeNodesInserted(AbstractTree.java:
> 823)
>         at
> brix.web.tree.AbstractTreeModel.nodeInserted(AbstractTreeModel.java:
> 138)
>         at brix.plugin.menu.editor.MenuEditor$5.onClick(MenuEditor.java:194)
>         at org.apache.wicket.ajax.markup.html.AjaxLink
> $1.onEvent(AjaxLink.java:68)
>         at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
> 177)
>         at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:
> 300)
>         at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:
> 119) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3112) Fix of issue 2886 breaks all individual implementations of any AbstractTree

Posted by "Mike Hefner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12921905#action_12921905 ] 

Mike Hefner commented on WICKET-3112:
-------------------------------------

I'm testing your patch and I've run into a NullPointerException when adding a node to the child of a collapsed node. 

I'm working on a fix to your patch now.

> Fix of issue 2886 breaks all individual implementations of any AbstractTree
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-3112
>                 URL: https://issues.apache.org/jira/browse/WICKET-3112
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 1.4.11, 1.4.12
>         Environment: any wicket 1.4 app
>            Reporter: Korbinian Bachl
>            Assignee: Martin Grigorov
>            Priority: Blocker
>         Attachments: WICKET-3112.patch, WICKET-3112.patch
>
>
> AbstratTree was originally written againt pure interfaces and not relies on a special Class, namely the javax.swing.tree.TreeNode. This breaks all custom tree's out there like e.g. the one in the brix project. 
> A workaround to this problem I tried was unsuccessful as the problem is that many parts of AbstratTree are final and can't be easily overwritten and that many other projects epen on Abstrattree like the inmethod grid stuff and much more. This means that any special Nodes for trees can't be implemented anymore, making this a ultimate stopper for all projects rlying on some special nodes. IMHO 2886 should be reverted and then looked upon a differnet patch for this solution that doesn't break everything out there. 
> Example from default Brxix 1.2.3-SNAPSHOT:
> java.lang.ClassCastException: brix.plugin.menu.editor.MenuTreeNode
> cannot be cast to javax.swing.tree.TreeNode
>         at
> org.apache.wicket.markup.html.tree.AbstractTree.treeNodesInserted(AbstractTree.java:
> 823)
>         at
> brix.web.tree.AbstractTreeModel.nodeInserted(AbstractTreeModel.java:
> 138)
>         at brix.plugin.menu.editor.MenuEditor$5.onClick(MenuEditor.java:194)
>         at org.apache.wicket.ajax.markup.html.AjaxLink
> $1.onEvent(AjaxLink.java:68)
>         at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
> 177)
>         at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:
> 300)
>         at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:
> 119) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3112) Fix of issue 2886 breaks all individual implementations of any AbstractTree

Posted by "Brian Topping (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12921918#action_12921918 ] 

Brian Topping commented on WICKET-3112:
---------------------------------------

Hey guys, thanks a bunch for working on this!  It will be great to get Brix up to the latest version of Wicket! :-)

> Fix of issue 2886 breaks all individual implementations of any AbstractTree
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-3112
>                 URL: https://issues.apache.org/jira/browse/WICKET-3112
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 1.4.11, 1.4.12
>         Environment: any wicket 1.4 app
>            Reporter: Korbinian Bachl
>            Assignee: Martin Grigorov
>            Priority: Blocker
>         Attachments: WICKET-3112.patch, WICKET-3112.patch
>
>
> AbstratTree was originally written againt pure interfaces and not relies on a special Class, namely the javax.swing.tree.TreeNode. This breaks all custom tree's out there like e.g. the one in the brix project. 
> A workaround to this problem I tried was unsuccessful as the problem is that many parts of AbstratTree are final and can't be easily overwritten and that many other projects epen on Abstrattree like the inmethod grid stuff and much more. This means that any special Nodes for trees can't be implemented anymore, making this a ultimate stopper for all projects rlying on some special nodes. IMHO 2886 should be reverted and then looked upon a differnet patch for this solution that doesn't break everything out there. 
> Example from default Brxix 1.2.3-SNAPSHOT:
> java.lang.ClassCastException: brix.plugin.menu.editor.MenuTreeNode
> cannot be cast to javax.swing.tree.TreeNode
>         at
> org.apache.wicket.markup.html.tree.AbstractTree.treeNodesInserted(AbstractTree.java:
> 823)
>         at
> brix.web.tree.AbstractTreeModel.nodeInserted(AbstractTreeModel.java:
> 138)
>         at brix.plugin.menu.editor.MenuEditor$5.onClick(MenuEditor.java:194)
>         at org.apache.wicket.ajax.markup.html.AjaxLink
> $1.onEvent(AjaxLink.java:68)
>         at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
> 177)
>         at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:
> 300)
>         at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:
> 119) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3112) Fix of issue 2886 breaks all individual implementations of any AbstractTree

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922649#action_12922649 ] 

Martin Grigorov commented on WICKET-3112:
-----------------------------------------

The patch is applying without problems.
Brix-demo works fine.
I'll make a review of the code and commit it soon.

> Fix of issue 2886 breaks all individual implementations of any AbstractTree
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-3112
>                 URL: https://issues.apache.org/jira/browse/WICKET-3112
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 1.4.11, 1.4.12
>         Environment: any wicket 1.4 app
>            Reporter: Korbinian Bachl
>            Assignee: Martin Grigorov
>         Attachments: WICKET-3112.patch, WICKET-3112.patch, WICKET-3122-fix.patch
>
>
> AbstratTree was originally written againt pure interfaces and not relies on a special Class, namely the javax.swing.tree.TreeNode. This breaks all custom tree's out there like e.g. the one in the brix project. 
> A workaround to this problem I tried was unsuccessful as the problem is that many parts of AbstratTree are final and can't be easily overwritten and that many other projects epen on Abstrattree like the inmethod grid stuff and much more. This means that any special Nodes for trees can't be implemented anymore, making this a ultimate stopper for all projects rlying on some special nodes. IMHO 2886 should be reverted and then looked upon a differnet patch for this solution that doesn't break everything out there. 
> Example from default Brxix 1.2.3-SNAPSHOT:
> java.lang.ClassCastException: brix.plugin.menu.editor.MenuTreeNode
> cannot be cast to javax.swing.tree.TreeNode
>         at
> org.apache.wicket.markup.html.tree.AbstractTree.treeNodesInserted(AbstractTree.java:
> 823)
>         at
> brix.web.tree.AbstractTreeModel.nodeInserted(AbstractTreeModel.java:
> 138)
>         at brix.plugin.menu.editor.MenuEditor$5.onClick(MenuEditor.java:194)
>         at org.apache.wicket.ajax.markup.html.AjaxLink
> $1.onEvent(AjaxLink.java:68)
>         at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
> 177)
>         at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:
> 300)
>         at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:
> 119) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3112) Fix of issue 2886 breaks all individual implementations of any AbstractTree

Posted by "Sergey Plevko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922071#action_12922071 ] 

Sergey Plevko commented on WICKET-3112:
---------------------------------------

Martin,

>>Thanks for the feedback!
>>May I ask you which patch did you use when testing ? There are two - one by me and one by Mike.
>>Please comment directly in WICKET-3112.

I tested on Wicket 1.4.x #211

> Fix of issue 2886 breaks all individual implementations of any AbstractTree
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-3112
>                 URL: https://issues.apache.org/jira/browse/WICKET-3112
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 1.4.11, 1.4.12
>         Environment: any wicket 1.4 app
>            Reporter: Korbinian Bachl
>            Assignee: Martin Grigorov
>            Priority: Blocker
>         Attachments: WICKET-3112.patch, WICKET-3112.patch, WICKET-3122-fix.patch
>
>
> AbstratTree was originally written againt pure interfaces and not relies on a special Class, namely the javax.swing.tree.TreeNode. This breaks all custom tree's out there like e.g. the one in the brix project. 
> A workaround to this problem I tried was unsuccessful as the problem is that many parts of AbstratTree are final and can't be easily overwritten and that many other projects epen on Abstrattree like the inmethod grid stuff and much more. This means that any special Nodes for trees can't be implemented anymore, making this a ultimate stopper for all projects rlying on some special nodes. IMHO 2886 should be reverted and then looked upon a differnet patch for this solution that doesn't break everything out there. 
> Example from default Brxix 1.2.3-SNAPSHOT:
> java.lang.ClassCastException: brix.plugin.menu.editor.MenuTreeNode
> cannot be cast to javax.swing.tree.TreeNode
>         at
> org.apache.wicket.markup.html.tree.AbstractTree.treeNodesInserted(AbstractTree.java:
> 823)
>         at
> brix.web.tree.AbstractTreeModel.nodeInserted(AbstractTreeModel.java:
> 138)
>         at brix.plugin.menu.editor.MenuEditor$5.onClick(MenuEditor.java:194)
>         at org.apache.wicket.ajax.markup.html.AjaxLink
> $1.onEvent(AjaxLink.java:68)
>         at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
> 177)
>         at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:
> 300)
>         at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:
> 119) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (WICKET-3112) Fix of issue 2886 breaks all individual implementations of any AbstractTree

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov reassigned WICKET-3112:
---------------------------------------

    Assignee: Martin Grigorov

> Fix of issue 2886 breaks all individual implementations of any AbstractTree
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-3112
>                 URL: https://issues.apache.org/jira/browse/WICKET-3112
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 1.4.11, 1.4.12
>         Environment: any wicket 1.4 app
>            Reporter: Korbinian Bachl
>            Assignee: Martin Grigorov
>            Priority: Blocker
>         Attachments: WICKET-3112.patch, WICKET-3112.patch
>
>
> AbstratTree was originally written againt pure interfaces and not relies on a special Class, namely the javax.swing.tree.TreeNode. This breaks all custom tree's out there like e.g. the one in the brix project. 
> A workaround to this problem I tried was unsuccessful as the problem is that many parts of AbstratTree are final and can't be easily overwritten and that many other projects epen on Abstrattree like the inmethod grid stuff and much more. This means that any special Nodes for trees can't be implemented anymore, making this a ultimate stopper for all projects rlying on some special nodes. IMHO 2886 should be reverted and then looked upon a differnet patch for this solution that doesn't break everything out there. 
> Example from default Brxix 1.2.3-SNAPSHOT:
> java.lang.ClassCastException: brix.plugin.menu.editor.MenuTreeNode
> cannot be cast to javax.swing.tree.TreeNode
>         at
> org.apache.wicket.markup.html.tree.AbstractTree.treeNodesInserted(AbstractTree.java:
> 823)
>         at
> brix.web.tree.AbstractTreeModel.nodeInserted(AbstractTreeModel.java:
> 138)
>         at brix.plugin.menu.editor.MenuEditor$5.onClick(MenuEditor.java:194)
>         at org.apache.wicket.ajax.markup.html.AjaxLink
> $1.onEvent(AjaxLink.java:68)
>         at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
> 177)
>         at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:
> 300)
>         at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:
> 119) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3112) Fix of issue 2886 breaks all individual implementations of any AbstractTree

Posted by "Mike Hefner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922085#action_12922085 ] 

Mike Hefner commented on WICKET-3112:
-------------------------------------

My patch for WICKET-3112 does cause a minor change in the behavior that Sergey noted in his comment on WICKET-2886 -

Case 1 - When adding the first child to a node, it is expanded and the child node is displayed. This behavior hasn't changed.

Case 2 - If you collapse a node that has already has children, then add another child, the parent node is expanded and all the children are displayed. This is a change; previously the parent node did not expand.

The reason for the change is that it's difficult to distinguish between case 1 and case 2 with only the information in AbstractTree's internal tree of TreeItems. My original patch for WICKET-2886 relied on casting the parent item in the insertion event to TreeNode and then using its child list to distinguish between the cases. But that's what broke Brix and any other projects that don't use TreeNodes.

IMHO, this is a fairly minor change in behavior and it seems more important to get the fix for WICKET-3112 out. I can open another JIRA issue and take the time to figure out how to distinguish between the two cases without relying on TreeNode.

> Fix of issue 2886 breaks all individual implementations of any AbstractTree
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-3112
>                 URL: https://issues.apache.org/jira/browse/WICKET-3112
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 1.4.11, 1.4.12
>         Environment: any wicket 1.4 app
>            Reporter: Korbinian Bachl
>            Assignee: Martin Grigorov
>            Priority: Blocker
>         Attachments: WICKET-3112.patch, WICKET-3112.patch, WICKET-3122-fix.patch
>
>
> AbstratTree was originally written againt pure interfaces and not relies on a special Class, namely the javax.swing.tree.TreeNode. This breaks all custom tree's out there like e.g. the one in the brix project. 
> A workaround to this problem I tried was unsuccessful as the problem is that many parts of AbstratTree are final and can't be easily overwritten and that many other projects epen on Abstrattree like the inmethod grid stuff and much more. This means that any special Nodes for trees can't be implemented anymore, making this a ultimate stopper for all projects rlying on some special nodes. IMHO 2886 should be reverted and then looked upon a differnet patch for this solution that doesn't break everything out there. 
> Example from default Brxix 1.2.3-SNAPSHOT:
> java.lang.ClassCastException: brix.plugin.menu.editor.MenuTreeNode
> cannot be cast to javax.swing.tree.TreeNode
>         at
> org.apache.wicket.markup.html.tree.AbstractTree.treeNodesInserted(AbstractTree.java:
> 823)
>         at
> brix.web.tree.AbstractTreeModel.nodeInserted(AbstractTreeModel.java:
> 138)
>         at brix.plugin.menu.editor.MenuEditor$5.onClick(MenuEditor.java:194)
>         at org.apache.wicket.ajax.markup.html.AjaxLink
> $1.onEvent(AjaxLink.java:68)
>         at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
> 177)
>         at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:
> 300)
>         at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:
> 119) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3112) Fix of issue 2886 breaks all individual implementations of any AbstractTree

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922678#action_12922678 ] 

Hudson commented on WICKET-3112:
--------------------------------

Integrated in Apache Wicket 1.4.x #214 (See [https://hudson.apache.org/hudson/job/Apache%20Wicket%201.4.x/214/])
    WICKET-3112 Format the code

For some reason Eclipse didn't format it the previous time.
No functional change
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


> Fix of issue 2886 breaks all individual implementations of any AbstractTree
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-3112
>                 URL: https://issues.apache.org/jira/browse/WICKET-3112
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 1.4.11, 1.4.12
>         Environment: any wicket 1.4 app
>            Reporter: Korbinian Bachl
>            Assignee: Martin Grigorov
>             Fix For: 1.4.13, 1.5-M3
>
>         Attachments: WICKET-3112.patch, WICKET-3112.patch, WICKET-3122-fix.patch
>
>
> AbstratTree was originally written againt pure interfaces and not relies on a special Class, namely the javax.swing.tree.TreeNode. This breaks all custom tree's out there like e.g. the one in the brix project. 
> A workaround to this problem I tried was unsuccessful as the problem is that many parts of AbstratTree are final and can't be easily overwritten and that many other projects epen on Abstrattree like the inmethod grid stuff and much more. This means that any special Nodes for trees can't be implemented anymore, making this a ultimate stopper for all projects rlying on some special nodes. IMHO 2886 should be reverted and then looked upon a differnet patch for this solution that doesn't break everything out there. 
> Example from default Brxix 1.2.3-SNAPSHOT:
> java.lang.ClassCastException: brix.plugin.menu.editor.MenuTreeNode
> cannot be cast to javax.swing.tree.TreeNode
>         at
> org.apache.wicket.markup.html.tree.AbstractTree.treeNodesInserted(AbstractTree.java:
> 823)
>         at
> brix.web.tree.AbstractTreeModel.nodeInserted(AbstractTreeModel.java:
> 138)
>         at brix.plugin.menu.editor.MenuEditor$5.onClick(MenuEditor.java:194)
>         at org.apache.wicket.ajax.markup.html.AjaxLink
> $1.onEvent(AjaxLink.java:68)
>         at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
> 177)
>         at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:
> 300)
>         at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:
> 119) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3112) Fix of issue 2886 breaks all individual implementations of any AbstractTree

Posted by "Korbinian Bachl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12923359#action_12923359 ] 

Korbinian Bachl commented on WICKET-3112:
-----------------------------------------

@Mike: retried it several times, allways fails me - no clue whats on here; On another machine it worked... really puzzles me but your job was good, thank you.

@ALL: thank you for fast fixing and closing this!

> Fix of issue 2886 breaks all individual implementations of any AbstractTree
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-3112
>                 URL: https://issues.apache.org/jira/browse/WICKET-3112
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 1.4.11, 1.4.12
>         Environment: any wicket 1.4 app
>            Reporter: Korbinian Bachl
>            Assignee: Martin Grigorov
>             Fix For: 1.4.13, 1.5-M3
>
>         Attachments: WICKET-3112.patch, WICKET-3112.patch, WICKET-3122-fix.patch
>
>
> AbstratTree was originally written againt pure interfaces and not relies on a special Class, namely the javax.swing.tree.TreeNode. This breaks all custom tree's out there like e.g. the one in the brix project. 
> A workaround to this problem I tried was unsuccessful as the problem is that many parts of AbstratTree are final and can't be easily overwritten and that many other projects epen on Abstrattree like the inmethod grid stuff and much more. This means that any special Nodes for trees can't be implemented anymore, making this a ultimate stopper for all projects rlying on some special nodes. IMHO 2886 should be reverted and then looked upon a differnet patch for this solution that doesn't break everything out there. 
> Example from default Brxix 1.2.3-SNAPSHOT:
> java.lang.ClassCastException: brix.plugin.menu.editor.MenuTreeNode
> cannot be cast to javax.swing.tree.TreeNode
>         at
> org.apache.wicket.markup.html.tree.AbstractTree.treeNodesInserted(AbstractTree.java:
> 823)
>         at
> brix.web.tree.AbstractTreeModel.nodeInserted(AbstractTreeModel.java:
> 138)
>         at brix.plugin.menu.editor.MenuEditor$5.onClick(MenuEditor.java:194)
>         at org.apache.wicket.ajax.markup.html.AjaxLink
> $1.onEvent(AjaxLink.java:68)
>         at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
> 177)
>         at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:
> 300)
>         at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:
> 119) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (WICKET-3112) Fix of issue 2886 breaks all individual implementations of any AbstractTree

Posted by "Korbinian Bachl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922019#action_12922019 ] 

Korbinian Bachl edited comment on WICKET-3112 at 10/18/10 5:01 AM:
-------------------------------------------------------------------

Martin, your 2nd patch seems to work. I also looked at Mike's patch and the null pointer but I can't get that one to work here. I allways end up on line ~810 with a check to a parentItem that is invalid as there is no parentItem around... 
@Mike: at what version did you do this patch against? I tried it against latest in branch-trunk as well as latest official one but both failed

PS: Big thank you for fixing it :)

      was (Author: korbinian):
    Martin, your 2nd patch seems to work. I also looked at Mike's patch and the null pointer but I can't get that one to work here. I allways end up on line ~810 with a check to a parentItem that is invalid as there is no parentItem around... 
@Mike: at what version did you do this patch against? I tried it against latest in branch-trunk as well as latest official one but both failed
  
> Fix of issue 2886 breaks all individual implementations of any AbstractTree
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-3112
>                 URL: https://issues.apache.org/jira/browse/WICKET-3112
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 1.4.11, 1.4.12
>         Environment: any wicket 1.4 app
>            Reporter: Korbinian Bachl
>            Assignee: Martin Grigorov
>            Priority: Blocker
>         Attachments: WICKET-3112.patch, WICKET-3112.patch, WICKET-3122-fix.patch
>
>
> AbstratTree was originally written againt pure interfaces and not relies on a special Class, namely the javax.swing.tree.TreeNode. This breaks all custom tree's out there like e.g. the one in the brix project. 
> A workaround to this problem I tried was unsuccessful as the problem is that many parts of AbstratTree are final and can't be easily overwritten and that many other projects epen on Abstrattree like the inmethod grid stuff and much more. This means that any special Nodes for trees can't be implemented anymore, making this a ultimate stopper for all projects rlying on some special nodes. IMHO 2886 should be reverted and then looked upon a differnet patch for this solution that doesn't break everything out there. 
> Example from default Brxix 1.2.3-SNAPSHOT:
> java.lang.ClassCastException: brix.plugin.menu.editor.MenuTreeNode
> cannot be cast to javax.swing.tree.TreeNode
>         at
> org.apache.wicket.markup.html.tree.AbstractTree.treeNodesInserted(AbstractTree.java:
> 823)
>         at
> brix.web.tree.AbstractTreeModel.nodeInserted(AbstractTreeModel.java:
> 138)
>         at brix.plugin.menu.editor.MenuEditor$5.onClick(MenuEditor.java:194)
>         at org.apache.wicket.ajax.markup.html.AjaxLink
> $1.onEvent(AjaxLink.java:68)
>         at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
> 177)
>         at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:
> 300)
>         at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:
> 119) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3112) Fix of issue 2886 breaks all individual implementations of any AbstractTree

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12921822#action_12921822 ] 

Martin Grigorov commented on WICKET-3112:
-----------------------------------------

Ok, I found it. I need to use the admin panel.

> Fix of issue 2886 breaks all individual implementations of any AbstractTree
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-3112
>                 URL: https://issues.apache.org/jira/browse/WICKET-3112
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 1.4.11, 1.4.12
>         Environment: any wicket 1.4 app
>            Reporter: Korbinian Bachl
>            Priority: Blocker
>
> AbstratTree was originally written againt pure interfaces and not relies on a special Class, namely the javax.swing.tree.TreeNode. This breaks all custom tree's out there like e.g. the one in the brix project. 
> A workaround to this problem I tried was unsuccessful as the problem is that many parts of AbstratTree are final and can't be easily overwritten and that many other projects epen on Abstrattree like the inmethod grid stuff and much more. This means that any special Nodes for trees can't be implemented anymore, making this a ultimate stopper for all projects rlying on some special nodes. IMHO 2886 should be reverted and then looked upon a differnet patch for this solution that doesn't break everything out there. 
> Example from default Brxix 1.2.3-SNAPSHOT:
> java.lang.ClassCastException: brix.plugin.menu.editor.MenuTreeNode
> cannot be cast to javax.swing.tree.TreeNode
>         at
> org.apache.wicket.markup.html.tree.AbstractTree.treeNodesInserted(AbstractTree.java:
> 823)
>         at
> brix.web.tree.AbstractTreeModel.nodeInserted(AbstractTreeModel.java:
> 138)
>         at brix.plugin.menu.editor.MenuEditor$5.onClick(MenuEditor.java:194)
>         at org.apache.wicket.ajax.markup.html.AjaxLink
> $1.onEvent(AjaxLink.java:68)
>         at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
> 177)
>         at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:
> 300)
>         at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:
> 119) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (WICKET-3112) Fix of issue 2886 breaks all individual implementations of any AbstractTree

Posted by "Mike Hefner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922085#action_12922085 ] 

Mike Hefner edited comment on WICKET-3112 at 10/18/10 10:55 AM:
----------------------------------------------------------------

My patch for WICKET-3112 does cause a minor change in the behavior that Sergey noted in his comment on WICKET-2886 -

Case 1 - When adding the first child to a node, it is expanded and the child node is displayed. This behavior hasn't changed.

Case 2 - If you collapse a node that has already has children, then add another child, the parent node is expanded and all the children are displayed. This is a change; previously the parent node did not expand.

The reason for the change is that it's difficult to distinguish between case 1 and case 2 with only the information in AbstractTree's internal tree of TreeItems. My original patch for WICKET-2886 relied on casting the parent item in the insertion event to TreeNode and then using its child list to distinguish between the cases. But that's what broke Brix and any other projects that don't use TreeNodes.

IMHO, this is a fairly minor change in behavior and it seems more important to get the fix for WICKET-3112 out. I can open another JIRA issue and take the time to figure out how to distinguish between the two cases without relying on TreeNode.

Another option is not to expand the parent node in either case 1 or case 2. When I fixed WICKET-2886, I made the assumption that when you added the first child to a node, you would want the parent node to be expanded and the child visible. It would be a simple change to update the parent node's JunctionLink to indicate that it now has a child, but not to expand it. The user would have to click on the JunctionLink to see the child they just added.


      was (Author: mikehefner):
    My patch for WICKET-3112 does cause a minor change in the behavior that Sergey noted in his comment on WICKET-2886 -

Case 1 - When adding the first child to a node, it is expanded and the child node is displayed. This behavior hasn't changed.

Case 2 - If you collapse a node that has already has children, then add another child, the parent node is expanded and all the children are displayed. This is a change; previously the parent node did not expand.

The reason for the change is that it's difficult to distinguish between case 1 and case 2 with only the information in AbstractTree's internal tree of TreeItems. My original patch for WICKET-2886 relied on casting the parent item in the insertion event to TreeNode and then using its child list to distinguish between the cases. But that's what broke Brix and any other projects that don't use TreeNodes.

IMHO, this is a fairly minor change in behavior and it seems more important to get the fix for WICKET-3112 out. I can open another JIRA issue and take the time to figure out how to distinguish between the two cases without relying on TreeNode.
  
> Fix of issue 2886 breaks all individual implementations of any AbstractTree
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-3112
>                 URL: https://issues.apache.org/jira/browse/WICKET-3112
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 1.4.11, 1.4.12
>         Environment: any wicket 1.4 app
>            Reporter: Korbinian Bachl
>            Assignee: Martin Grigorov
>            Priority: Blocker
>         Attachments: WICKET-3112.patch, WICKET-3112.patch, WICKET-3122-fix.patch
>
>
> AbstratTree was originally written againt pure interfaces and not relies on a special Class, namely the javax.swing.tree.TreeNode. This breaks all custom tree's out there like e.g. the one in the brix project. 
> A workaround to this problem I tried was unsuccessful as the problem is that many parts of AbstratTree are final and can't be easily overwritten and that many other projects epen on Abstrattree like the inmethod grid stuff and much more. This means that any special Nodes for trees can't be implemented anymore, making this a ultimate stopper for all projects rlying on some special nodes. IMHO 2886 should be reverted and then looked upon a differnet patch for this solution that doesn't break everything out there. 
> Example from default Brxix 1.2.3-SNAPSHOT:
> java.lang.ClassCastException: brix.plugin.menu.editor.MenuTreeNode
> cannot be cast to javax.swing.tree.TreeNode
>         at
> org.apache.wicket.markup.html.tree.AbstractTree.treeNodesInserted(AbstractTree.java:
> 823)
>         at
> brix.web.tree.AbstractTreeModel.nodeInserted(AbstractTreeModel.java:
> 138)
>         at brix.plugin.menu.editor.MenuEditor$5.onClick(MenuEditor.java:194)
>         at org.apache.wicket.ajax.markup.html.AjaxLink
> $1.onEvent(AjaxLink.java:68)
>         at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
> 177)
>         at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:
> 300)
>         at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:
> 119) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3112) Fix of issue 2886 breaks all individual implementations of any AbstractTree

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov updated WICKET-3112:
------------------------------------

    Attachment: WICKET-3112.patch

Attach second version of the patch that has no noise of formatting.

Please test it and let us know whether all your apps with usage of Tree component work as expected.
Thanks! 

> Fix of issue 2886 breaks all individual implementations of any AbstractTree
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-3112
>                 URL: https://issues.apache.org/jira/browse/WICKET-3112
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 1.4.11, 1.4.12
>         Environment: any wicket 1.4 app
>            Reporter: Korbinian Bachl
>            Priority: Blocker
>         Attachments: WICKET-3112.patch, WICKET-3112.patch
>
>
> AbstratTree was originally written againt pure interfaces and not relies on a special Class, namely the javax.swing.tree.TreeNode. This breaks all custom tree's out there like e.g. the one in the brix project. 
> A workaround to this problem I tried was unsuccessful as the problem is that many parts of AbstratTree are final and can't be easily overwritten and that many other projects epen on Abstrattree like the inmethod grid stuff and much more. This means that any special Nodes for trees can't be implemented anymore, making this a ultimate stopper for all projects rlying on some special nodes. IMHO 2886 should be reverted and then looked upon a differnet patch for this solution that doesn't break everything out there. 
> Example from default Brxix 1.2.3-SNAPSHOT:
> java.lang.ClassCastException: brix.plugin.menu.editor.MenuTreeNode
> cannot be cast to javax.swing.tree.TreeNode
>         at
> org.apache.wicket.markup.html.tree.AbstractTree.treeNodesInserted(AbstractTree.java:
> 823)
>         at
> brix.web.tree.AbstractTreeModel.nodeInserted(AbstractTreeModel.java:
> 138)
>         at brix.plugin.menu.editor.MenuEditor$5.onClick(MenuEditor.java:194)
>         at org.apache.wicket.ajax.markup.html.AjaxLink
> $1.onEvent(AjaxLink.java:68)
>         at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
> 177)
>         at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:
> 300)
>         at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:
> 119) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3112) Fix of issue 2886 breaks all individual implementations of any AbstractTree

Posted by "Mike Hefner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922225#action_12922225 ] 

Mike Hefner commented on WICKET-3112:
-------------------------------------

Korbinian,
I'm not sure what's going wrong. The problem code that you have at lines 801-807 should be at lines 938-944 in #treeNodesRemoved().

In Eclipse, I've just tried reverting my local copy of AbstractTree.java to rev 1023567, confirmed that it's the old version that uses TreeNode, then re-applied my patch with no problem.   I'm not familiar with IDEA, but is there some way to grab a specific revision of a file from the svn repository so you can make sure it's the right one?

Has anyone else been able to apply my patch successfully?


> Fix of issue 2886 breaks all individual implementations of any AbstractTree
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-3112
>                 URL: https://issues.apache.org/jira/browse/WICKET-3112
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 1.4.11, 1.4.12
>         Environment: any wicket 1.4 app
>            Reporter: Korbinian Bachl
>            Assignee: Martin Grigorov
>            Priority: Blocker
>         Attachments: WICKET-3112.patch, WICKET-3112.patch, WICKET-3122-fix.patch
>
>
> AbstratTree was originally written againt pure interfaces and not relies on a special Class, namely the javax.swing.tree.TreeNode. This breaks all custom tree's out there like e.g. the one in the brix project. 
> A workaround to this problem I tried was unsuccessful as the problem is that many parts of AbstratTree are final and can't be easily overwritten and that many other projects epen on Abstrattree like the inmethod grid stuff and much more. This means that any special Nodes for trees can't be implemented anymore, making this a ultimate stopper for all projects rlying on some special nodes. IMHO 2886 should be reverted and then looked upon a differnet patch for this solution that doesn't break everything out there. 
> Example from default Brxix 1.2.3-SNAPSHOT:
> java.lang.ClassCastException: brix.plugin.menu.editor.MenuTreeNode
> cannot be cast to javax.swing.tree.TreeNode
>         at
> org.apache.wicket.markup.html.tree.AbstractTree.treeNodesInserted(AbstractTree.java:
> 823)
>         at
> brix.web.tree.AbstractTreeModel.nodeInserted(AbstractTreeModel.java:
> 138)
>         at brix.plugin.menu.editor.MenuEditor$5.onClick(MenuEditor.java:194)
>         at org.apache.wicket.ajax.markup.html.AjaxLink
> $1.onEvent(AjaxLink.java:68)
>         at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
> 177)
>         at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:
> 300)
>         at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:
> 119) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3112) Fix of issue 2886 breaks all individual implementations of any AbstractTree

Posted by "Korbinian Bachl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12922019#action_12922019 ] 

Korbinian Bachl commented on WICKET-3112:
-----------------------------------------

Martin, your 2nd patch seems to work. I also looked at Mike's patch and the null pointer but I can't get that one to work here. I allways end up on line ~810 with a check to a parentItem that is invalid as there is no parentItem around... 
@Mike: at what version did you do this patch against? I tried it against latest in branch-trunk as well as latest official one but both failed

> Fix of issue 2886 breaks all individual implementations of any AbstractTree
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-3112
>                 URL: https://issues.apache.org/jira/browse/WICKET-3112
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 1.4.11, 1.4.12
>         Environment: any wicket 1.4 app
>            Reporter: Korbinian Bachl
>            Assignee: Martin Grigorov
>            Priority: Blocker
>         Attachments: WICKET-3112.patch, WICKET-3112.patch, WICKET-3122-fix.patch
>
>
> AbstratTree was originally written againt pure interfaces and not relies on a special Class, namely the javax.swing.tree.TreeNode. This breaks all custom tree's out there like e.g. the one in the brix project. 
> A workaround to this problem I tried was unsuccessful as the problem is that many parts of AbstratTree are final and can't be easily overwritten and that many other projects epen on Abstrattree like the inmethod grid stuff and much more. This means that any special Nodes for trees can't be implemented anymore, making this a ultimate stopper for all projects rlying on some special nodes. IMHO 2886 should be reverted and then looked upon a differnet patch for this solution that doesn't break everything out there. 
> Example from default Brxix 1.2.3-SNAPSHOT:
> java.lang.ClassCastException: brix.plugin.menu.editor.MenuTreeNode
> cannot be cast to javax.swing.tree.TreeNode
>         at
> org.apache.wicket.markup.html.tree.AbstractTree.treeNodesInserted(AbstractTree.java:
> 823)
>         at
> brix.web.tree.AbstractTreeModel.nodeInserted(AbstractTreeModel.java:
> 138)
>         at brix.plugin.menu.editor.MenuEditor$5.onClick(MenuEditor.java:194)
>         at org.apache.wicket.ajax.markup.html.AjaxLink
> $1.onEvent(AjaxLink.java:68)
>         at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
> 177)
>         at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:
> 300)
>         at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:
> 119) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3112) Fix of issue 2886 breaks all individual implementations of any AbstractTree

Posted by "Mike Hefner (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mike Hefner updated WICKET-3112:
--------------------------------

    Attachment: WICKET-3122-fix.patch

Attached patch.

I tested it successfully against WICKET-2886, WICKET-3057, and wicket-examples. On the brix-demo admin page, Menus tab, I was able to add, delete, and move items with no problems. 

Please test against any other pages that were broken by WICKET-2886. Thanks.

> Fix of issue 2886 breaks all individual implementations of any AbstractTree
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-3112
>                 URL: https://issues.apache.org/jira/browse/WICKET-3112
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 1.4.11, 1.4.12
>         Environment: any wicket 1.4 app
>            Reporter: Korbinian Bachl
>            Assignee: Martin Grigorov
>            Priority: Blocker
>         Attachments: WICKET-3112.patch, WICKET-3112.patch, WICKET-3122-fix.patch
>
>
> AbstratTree was originally written againt pure interfaces and not relies on a special Class, namely the javax.swing.tree.TreeNode. This breaks all custom tree's out there like e.g. the one in the brix project. 
> A workaround to this problem I tried was unsuccessful as the problem is that many parts of AbstratTree are final and can't be easily overwritten and that many other projects epen on Abstrattree like the inmethod grid stuff and much more. This means that any special Nodes for trees can't be implemented anymore, making this a ultimate stopper for all projects rlying on some special nodes. IMHO 2886 should be reverted and then looked upon a differnet patch for this solution that doesn't break everything out there. 
> Example from default Brxix 1.2.3-SNAPSHOT:
> java.lang.ClassCastException: brix.plugin.menu.editor.MenuTreeNode
> cannot be cast to javax.swing.tree.TreeNode
>         at
> org.apache.wicket.markup.html.tree.AbstractTree.treeNodesInserted(AbstractTree.java:
> 823)
>         at
> brix.web.tree.AbstractTreeModel.nodeInserted(AbstractTreeModel.java:
> 138)
>         at brix.plugin.menu.editor.MenuEditor$5.onClick(MenuEditor.java:194)
>         at org.apache.wicket.ajax.markup.html.AjaxLink
> $1.onEvent(AjaxLink.java:68)
>         at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
> 177)
>         at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:
> 300)
>         at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:
> 119) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-3112) Fix of issue 2886 breaks all individual implementations of any AbstractTree

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3112?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov updated WICKET-3112:
------------------------------------

    Attachment: WICKET-3112.patch

A patch that seems to solves the problem with minimal changes.
All unit tests pass, wicket-examples seems to work OK, brix-demo/admin panel adds and removes nodes without problems.

> Fix of issue 2886 breaks all individual implementations of any AbstractTree
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-3112
>                 URL: https://issues.apache.org/jira/browse/WICKET-3112
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 1.4.11, 1.4.12
>         Environment: any wicket 1.4 app
>            Reporter: Korbinian Bachl
>            Priority: Blocker
>         Attachments: WICKET-3112.patch
>
>
> AbstratTree was originally written againt pure interfaces and not relies on a special Class, namely the javax.swing.tree.TreeNode. This breaks all custom tree's out there like e.g. the one in the brix project. 
> A workaround to this problem I tried was unsuccessful as the problem is that many parts of AbstratTree are final and can't be easily overwritten and that many other projects epen on Abstrattree like the inmethod grid stuff and much more. This means that any special Nodes for trees can't be implemented anymore, making this a ultimate stopper for all projects rlying on some special nodes. IMHO 2886 should be reverted and then looked upon a differnet patch for this solution that doesn't break everything out there. 
> Example from default Brxix 1.2.3-SNAPSHOT:
> java.lang.ClassCastException: brix.plugin.menu.editor.MenuTreeNode
> cannot be cast to javax.swing.tree.TreeNode
>         at
> org.apache.wicket.markup.html.tree.AbstractTree.treeNodesInserted(AbstractTree.java:
> 823)
>         at
> brix.web.tree.AbstractTreeModel.nodeInserted(AbstractTreeModel.java:
> 138)
>         at brix.plugin.menu.editor.MenuEditor$5.onClick(MenuEditor.java:194)
>         at org.apache.wicket.ajax.markup.html.AjaxLink
> $1.onEvent(AjaxLink.java:68)
>         at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
> 177)
>         at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:
> 300)
>         at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:
> 119) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-3112) Fix of issue 2886 breaks all individual implementations of any AbstractTree

Posted by "Korbinian Bachl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12921827#action_12921827 ] 

Korbinian Bachl commented on WICKET-3112:
-----------------------------------------

Its reproduced by using wicket 1.4.11 and upwards. It hinders us from upgrading it and causes Trouble for others as well. It also breaks one of my own inhouse apps as custom nodes wont work. 

Von meinem iPhone gesendet





> Fix of issue 2886 breaks all individual implementations of any AbstractTree
> ---------------------------------------------------------------------------
>
>                 Key: WICKET-3112
>                 URL: https://issues.apache.org/jira/browse/WICKET-3112
>             Project: Wicket
>          Issue Type: Sub-task
>          Components: wicket
>    Affects Versions: 1.4.11, 1.4.12
>         Environment: any wicket 1.4 app
>            Reporter: Korbinian Bachl
>            Priority: Blocker
>         Attachments: WICKET-3112.patch
>
>
> AbstratTree was originally written againt pure interfaces and not relies on a special Class, namely the javax.swing.tree.TreeNode. This breaks all custom tree's out there like e.g. the one in the brix project. 
> A workaround to this problem I tried was unsuccessful as the problem is that many parts of AbstratTree are final and can't be easily overwritten and that many other projects epen on Abstrattree like the inmethod grid stuff and much more. This means that any special Nodes for trees can't be implemented anymore, making this a ultimate stopper for all projects rlying on some special nodes. IMHO 2886 should be reverted and then looked upon a differnet patch for this solution that doesn't break everything out there. 
> Example from default Brxix 1.2.3-SNAPSHOT:
> java.lang.ClassCastException: brix.plugin.menu.editor.MenuTreeNode
> cannot be cast to javax.swing.tree.TreeNode
>         at
> org.apache.wicket.markup.html.tree.AbstractTree.treeNodesInserted(AbstractTree.java:
> 823)
>         at
> brix.web.tree.AbstractTreeModel.nodeInserted(AbstractTreeModel.java:
> 138)
>         at brix.plugin.menu.editor.MenuEditor$5.onClick(MenuEditor.java:194)
>         at org.apache.wicket.ajax.markup.html.AjaxLink
> $1.onEvent(AjaxLink.java:68)
>         at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:
> 177)
>         at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:
> 300)
>         at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:
> 119) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.