dev@woodstock.java.net

Re: [nbusers] VWP How to set the turner icon on the the Woodstock tree component.]

From: Cathy Mucci <Catherine.Mucci_at_Sun.COM>
Date: Tue, 10 Jun 2008 08:26:17 -0400

Oddvard,

Thanks for the code tree turner code snipit. I've used it to create a
Woodstock FAQ entry:
http://wiki.java.net/bin/view/Projects/WoodstockFaq -- Entry #9

>
>
> -------- Original Message --------
> Subject: RE: [nbusers] VWP How to set the turner icon on the the
> Woodstock tree component.
> Date: Mon, 09 Jun 2008 20:52:04 +0200
> From: Oddvard Myrnes <oddvardm_at_doremitechno.com>
> Reply-To: nbusers_at_netbeans.org
> To: nbusers_at_netbeans.org
>
>
>
> Hi Billy,
>
> This piece of code can be used as a template:
>
> List innerchildren = tree.getChildren();
> if(!innerchildren.isEmpty())
> {
> // The tree has its "clientside" property set
> which means that expand and collapse
> // events are handled in the browser. We need to
> clear the list for every paint
> // so that we donn't add simular nodes to the list
> causing a server failiure
> innerchildren.clear();
> }
> for(int i = 0; i < itemList.size(); i++) // itemList
> is some objct list
> {
> TreeNode siNode = new TreeNode();
> siNode.setId("sysint" + i);
> someItem ci = itemList.get(i);
> Hyperlink hyp_si = new Hyperlink();
> hyp_si.setUrl("/faces/someJspPage.jsp;
> hyp_si.setTarget("someName"); // Sets
> the target of the linked page
> hyp_si.setText(siNode.getid().toString());
> siNode.getFacets().put(TreeNode.CONTENT_FACET_KEY,
> hyp_si);
> ImageHyperlink img = new ImageHyperlink();
> img.setImageURL("resources/someImage.gif");
> siNode.getFacets().put(TreeNode.IMAGE_FACET_KEY, img);
> innerchildren.add(siNode);
> }
>
> Hope it helps
> Oddvard
>
> -----Original Message-----
> *From:* Billy Draper [mailto:netbeansbilly_at_gmail.com]
> *Sent:* Monday, June 09, 2008 3:00 PM
> *To:* nbusers_at_netbeans.org
> *Subject:* [nbusers] VWP How to set the turner icon on the the
> Woodstock tree component.
>
> Hello everybody!
>
> Could I get those of you who are familiar with the Woodstock tree
> component to point me to a good tutorial or provide hints on how
> to set the turner icon for dynamically created tree nodes.
> Unfortunately, the tutorial on the site does not provide guidance
> on that aspect. I have searched the net for 2 days with nothing to
> show for. I would really appreciate any code samples or guidance
> the community members could offer.
>
> Thanks!
>
> Billy
>