pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David McNelis" <Dmcne...@sharedmarketing.com>
Subject TreeViewListener question
Date Fri, 05 Mar 2010 14:13:13 GMT
Morning,

 

With the TreeViewListener, I'm not seeing an event triggered with my
first selection in my multi-select tree.  Here is an example of my
implementation:

treeview.setTreeData(etNodes);

treeview.setSelectMode(TreeView.SelectMode.MULTI);

 

treeview.getTreeViewSelectionListeners().add(new
TreeViewSelectionListener(){

 

@Override

public void selectedPathAdded(TreeView arg0, Path arg1) {

ExtendedTreeNode etNode =
(ExtendedTreeNode)Tree.get(treeview.getTreeData(), arg1);

System.out.println(etNode.getValue());

}

@Override

public void selectedPathRemoved(TreeView arg0, Path arg1) {

                        

}

@Override

public void selectedPathsChanged(TreeView arg0, Sequence<Path> paths) { 

etNode = new java.util.ArrayList<BigDecimal>();

for(int i=0, n=paths.getLength(); i < n; i++){

                              

ExtendedTreeNode etNode =
(ExtendedTreeNode)Tree.get(treeview.getTreeData(), paths.get(i));

System.out.println(etNode.getValue());                      

}

}

});

 

The first click produces no output or errors.  If I click the same
element a second time, then the etNode.getValue() produces the expected
result.  I looked at the other treeview based listener classes and
didn't see anything that I thought I should be implementing as well.  If
its as simple as that, what class should I be looking toward?


Mime
View raw message