Actually I was over complicating it. The following work better:

    @Override
    protected void onJunctionLinkClicked(AjaxRequestTarget target, TreeNode
node) {
        
        // expand the next level of the model
        modelChanging();
        if (isNodeExpanded(node)) { // node has already been (un)expanded
for this cycle
            m_dataProvider.expand((DefaultMutableTreeNode)node, 1);
        } else {
            // otherwise delete the children and replace with our marker
node
            m_dataProvider.expand((DefaultMutableTreeNode)node, 0);
        }
                
        // trigger redraw of clicked node
        treeNodesChanged(new TreeModelEvent(this, new
TreePath(node.getParent()), new int[]{0}, new TreeNode[]{node} ));
        
        modelChanged();
        
        super.onJunctionLinkClicked(target, node);
    }

-- 
View this message in context: 
http://www.nabble.com/LinkTree-lazy-loading-possible--tf4493231.html#a12923108
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to