Return-Path: Delivered-To: apmail-pivot-user-archive@www.apache.org Received: (qmail 36954 invoked from network); 17 Feb 2010 11:38:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Feb 2010 11:38:12 -0000 Received: (qmail 23275 invoked by uid 500); 17 Feb 2010 11:38:12 -0000 Delivered-To: apmail-pivot-user-archive@pivot.apache.org Received: (qmail 23236 invoked by uid 500); 17 Feb 2010 11:38:11 -0000 Mailing-List: contact user-help@pivot.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@pivot.apache.org Delivered-To: mailing list user@pivot.apache.org Received: (qmail 23227 invoked by uid 99); 17 Feb 2010 11:38:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Feb 2010 11:38:11 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of tvolkert@gmail.com designates 209.85.210.198 as permitted sender) Received: from [209.85.210.198] (HELO mail-yx0-f198.google.com) (209.85.210.198) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Feb 2010 11:38:04 +0000 Received: by yxe36 with SMTP id 36so4269504yxe.13 for ; Wed, 17 Feb 2010 03:37:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=3z9VlSoNojlJCo5HXWqniG1vlFi1zfGJFvVO3V3xbUs=; b=GIizMH2f7oTuWbigMlx0dV030n9qgJZYXwJRO36+pfQ4YJpZG7nxNzVQ+EJdvAnWIu KPoJ7QH3shPPXG/FoOCkwaeir19T3EcDeQB00D/5qrZ0hCcZU2A0Ml01Z1YFMwWLYA55 b+pO93oe9otmHA48tZyQGePBJygMSsPmgrldo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=reqtsi+yj8rxH1mIqJe5fdVp1sKGYs7zKq1zmrlWB2jeX2gHnURSRvx03F60r02GfN 0J5f03GliILOmqUf71eGyarIzrVw9mhbHWgLO3rfCCwUXPnufE1ztkRHyPg+Lzvo5NXD vTZ5fu/oIOYavN9SGxHH0vEQFbtFsNIZO+GCU= MIME-Version: 1.0 Received: by 10.101.7.19 with SMTP id k19mr6445261ani.123.1266406663776; Wed, 17 Feb 2010 03:37:43 -0800 (PST) In-Reply-To: <5ca415e1002162046k1c012032p4b5afa6cccca12b7@mail.gmail.com> References: <5ca415e1002142135x6b2c36dehcee0571daa58cb87@mail.gmail.com> <06F88705-2917-4508-89A0-E32B7ACAFE15@mac.com> <68dcbc7a1002150537i2d4121ebrfcaaec9b491c0bb9@mail.gmail.com> <168ef9ac1002150732k5c1cffc9vc5381bbcfa86de67@mail.gmail.com> <68dcbc7a1002150757r4effb4f9p562883443d2ba661@mail.gmail.com> <168ef9ac1002150812k232a7ddepfb622780234a770@mail.gmail.com> <5ca415e1002162046k1c012032p4b5afa6cccca12b7@mail.gmail.com> Date: Wed, 17 Feb 2010 06:37:43 -0500 Message-ID: <168ef9ac1002170337l6723d0f2k241d1bf48cd62b6e@mail.gmail.com> Subject: Re: dynamic treeview example From: Todd Volkert To: user@pivot.apache.org Content-Type: multipart/alternative; boundary=001636c9285e55ead6047fca4796 --001636c9285e55ead6047fca4796 Content-Type: text/plain; charset=ISO-8859-1 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: > > > > > > > > > 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> 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 > --001636c9285e55ead6047fca4796 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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.=A0 Then you = should remove the 'treeView =3D new TreeView()' line, because it= 9;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.=A0 I have a wtkx file with the following for the treevie= w:
<view>
=A0 <TreeView wtkx:id=3D"treeView">
=A0= =A0=A0 <nodeRenderer>
=A0=A0=A0=A0=A0 <content:TreeViewNodeRend= erer showIcon=3D"false"/>
=A0=A0=A0 </nodeRenderer>
=A0 </TreeView>
</view>
In my java code I have the following:

=A0=A0=A0 private Window= window =3D null;
=A0=A0=A0 @WTKX private TreeView treeView =3D null;=A0=A0=A0 @WTKX private TreeBranch treeBranch =3D null;

=A0=A0=A0 @Override
=A0=A0=A0 public void startup( Display display,<= br>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= Map<String,
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 String> properties )
=A0=A0=A0=A0=A0 throws Except= ion
=A0=A0=A0 {
=A0=A0=A0=A0=A0=A0=A0 Resources resources =3D new Res= ources(getClass().getName(), "UTF-8");
=A0=A0=A0=A0=A0=A0=A0 WTKXSerializer wtkxSerializer =3D new WTKXSerializer(= resources);

=A0=A0=A0=A0=A0=A0=A0 treeView =3D new TreeView();
= =A0=A0=A0=A0=A0=A0=A0
=A0=A0=A0=A0=A0=A0=A0 treeBranch =3D new TreeBran= ch();
=A0=A0=A0=A0=A0=A0=A0
=A0=A0=A0=A0=A0=A0=A0 TreeNode node =3D = new TreeNode();
=A0=A0=A0=A0=A0=A0=A0 node.setText( "node1" );
=A0=A0=A0=A0=A0= =A0=A0 treeBranch.add(node);

=A0=A0=A0=A0=A0=A0=A0 node =3D new Tree= Node();
=A0=A0=A0=A0=A0=A0=A0 node.setText( "node2" );
=A0= =A0=A0=A0=A0=A0=A0 treeBranch.add(node);

=A0=A0=A0=A0=A0=A0=A0 node = =3D new TreeNode();
=A0=A0=A0=A0=A0=A0=A0 node.setText( "node3" );
=A0=A0=A0=A0=A0= =A0=A0 treeBranch.add(node);
=A0=A0=A0=A0=A0=A0=A0
=A0=A0=A0=A0=A0= =A0=A0 treeView.setTreeData( treeBranch );

=A0=A0=A0=A0=A0=A0=A0 win= dow =3D (Window) wtkxSerializer.readObject( this,
=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 "PassTrac= ker.wtkx");
=A0=A0=A0=A0=A0=A0=A0 window.open(display);
=A0=A0=A0 }

Just a si= mple test but the treeview does not appear.=A0 Does anyone have any suggest= ions as to what I am doing wrong?

Thanks

--001636c9285e55ead6047fca4796--