pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Todd Volkert <tvolk...@gmail.com>
Subject Re: dynamic treeview example
Date Wed, 17 Feb 2010 11:37:43 GMT
Hi Steven,

First, I'd move your wtkxSerializer.readObject() call to be right below the
serializer instantiation, and I'd follow it with a wtkxSerializer.bind(this)
call to apply the @WTKX bindings.  Then you should remove the 'treeView =
new TreeView()' line, because it'll cause you to blow away the tree view
that's defined in WTKX.

Hope that helps,
-T

On Tue, Feb 16, 2010 at 11:46 PM, Pivot-Steven Dahlin <
pivot.sdahlin@gmail.com> wrote:

> I cannot get the tree view to work.  I have a wtkx file with the following
> for the treeview:
> <view>
>   <TreeView wtkx:id="treeView">
>     <nodeRenderer>
>       <content:TreeViewNodeRenderer showIcon="false"/>
>     </nodeRenderer>
>   </TreeView>
> </view>
>
> In my java code I have the following:
>
>     private Window window = null;
>     @WTKX private TreeView treeView = null;
>     @WTKX private TreeBranch treeBranch = null;
>
>     @Override
>     public void startup( Display display,
>                          Map<String,
>                          String> properties )
>       throws Exception
>     {
>         Resources resources = new Resources(getClass().getName(), "UTF-8");
>         WTKXSerializer wtkxSerializer = new WTKXSerializer(resources);
>
>         treeView = new TreeView();
>
>         treeBranch = new TreeBranch();
>
>         TreeNode node = new TreeNode();
>         node.setText( "node1" );
>         treeBranch.add(node);
>
>         node = new TreeNode();
>         node.setText( "node2" );
>         treeBranch.add(node);
>
>         node = new TreeNode();
>         node.setText( "node3" );
>         treeBranch.add(node);
>
>         treeView.setTreeData( treeBranch );
>
>         window = (Window) wtkxSerializer.readObject( this,
>                                                      "PassTracker.wtkx");
>         window.open(display);
>     }
>
> Just a simple test but the treeview does not appear.  Does anyone have any
> suggestions as to what I am doing wrong?
>
> Thanks
>

Mime
View raw message