[Flashcoders] Tree.selectedItem and data mapping

2006-07-18 Thread Merrill, Jason
I'm pretty good at using XML data and also have no problem making a Tree
component which renders nodes/folders based on a dataprovider XML.

With that said, how do you all who use the Tree component usually map
the desired data to be displayed (say, text paragraphs that display in a
text field nearby) to what was selected in the tree (a tree rendered
from the dataprovider XML)?  

Meaning, if for example, you are using the Tree component for the
navigation of an  online help manual, when an item is selected in the
tree component, how do you normally get enough information about where
it is in the tree to map it to your array or XML nodes which containing
the bulk of the text content?  It would be easy with a combo box as it
is a single list, but a tree is inherently more complex.  I can create
an Object/Array or XML which recreates the structure of the tree to
contain my content so it maps directly to the tree, but that's really
kludge and then if the data changes, that mapping between tree and
display content is broken.

Using selectedItem, selectedNode, getTreeNodeAt doesn't give you enough
information (at least, it didn't seem to) on the node to map to content
in another custom array, object or XML containing your content data (I
can get single numbers, but not enough information about where it is in
the tree), and you can't put large paragraphs inside the Tree
dataprovider XML file which renders the tree, as it will mess up the
tree when it renders.  I couldn't find any methods of the Tree class
that would remedy this.

Or, is it instead preferred to not use a Tree dataprovider XML file and
add the Tree nodes individually with a composition class which composes
the tree with methods like Tree.addTreeNodeAt() based on the
content.xml, which also contains the content, thus preserving the
mapping when the data changes.

I hope that makes sense,  

Jason Merrill
Bank of America 
Learning  Organization Effectiveness - Technology Solutions 
 
 
 
 
 
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Tree.selectedItem and data mapping

2006-07-18 Thread André Goliath
Why does selectedItem not give you enough information?
It gives you access to whatever is in the node, including all properties.
You just have to store a kind of unique ID or whatever in each node and map
that to a text 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: Tuesday, July 18, 2006 10:18 PM
To: Flashcoders mailing list
Subject: [Flashcoders] Tree.selectedItem and data mapping

I'm pretty good at using XML data and also have no problem making a Tree
component which renders nodes/folders based on a dataprovider XML.

With that said, how do you all who use the Tree component usually map
the desired data to be displayed (say, text paragraphs that display in a
text field nearby) to what was selected in the tree (a tree rendered
from the dataprovider XML)?  

Meaning, if for example, you are using the Tree component for the
navigation of an  online help manual, when an item is selected in the
tree component, how do you normally get enough information about where
it is in the tree to map it to your array or XML nodes which containing
the bulk of the text content?  It would be easy with a combo box as it
is a single list, but a tree is inherently more complex.  I can create
an Object/Array or XML which recreates the structure of the tree to
contain my content so it maps directly to the tree, but that's really
kludge and then if the data changes, that mapping between tree and
display content is broken.

Using selectedItem, selectedNode, getTreeNodeAt doesn't give you enough
information (at least, it didn't seem to) on the node to map to content
in another custom array, object or XML containing your content data (I
can get single numbers, but not enough information about where it is in
the tree), and you can't put large paragraphs inside the Tree
dataprovider XML file which renders the tree, as it will mess up the
tree when it renders.  I couldn't find any methods of the Tree class
that would remedy this.

Or, is it instead preferred to not use a Tree dataprovider XML file and
add the Tree nodes individually with a composition class which composes
the tree with methods like Tree.addTreeNodeAt() based on the
content.xml, which also contains the content, thus preserving the
mapping when the data changes.

I hope that makes sense,  

Jason Merrill
Bank of America 
Learning  Organization Effectiveness - Technology Solutions 
 
 
 
 
 
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] Tree.selectedItem and data mapping

2006-07-18 Thread Merrill, Jason
Why does selectedItem not give you enough information?
It gives you access to whatever is in the node, including all properties.

Because the node you refer to is from the dataprovider XML - and since you 
can't stick large paragraphs inside that 'special dataprovider XML without 
messing up the Tree, it seems you have to map to another data source.  

Jason Merrill
Bank of America 
Learning  Organization Effectiveness - Technology Solutions 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of André Goliath
Sent: Tuesday, July 18, 2006 4:31 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] Tree.selectedItem and data mapping

Why does selectedItem not give you enough information?
It gives you access to whatever is in the node, including all properties.
You just have to store a kind of unique ID or whatever in each node and map
that to a text

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill,
Jason
Sent: Tuesday, July 18, 2006 10:18 PM
To: Flashcoders mailing list
Subject: [Flashcoders] Tree.selectedItem and data mapping

I'm pretty good at using XML data and also have no problem making a Tree
component which renders nodes/folders based on a dataprovider XML.

With that said, how do you all who use the Tree component usually map
the desired data to be displayed (say, text paragraphs that display in a
text field nearby) to what was selected in the tree (a tree rendered
from the dataprovider XML)?

Meaning, if for example, you are using the Tree component for the
navigation of an  online help manual, when an item is selected in the
tree component, how do you normally get enough information about where
it is in the tree to map it to your array or XML nodes which containing
the bulk of the text content?  It would be easy with a combo box as it
is a single list, but a tree is inherently more complex.  I can create
an Object/Array or XML which recreates the structure of the tree to
contain my content so it maps directly to the tree, but that's really
kludge and then if the data changes, that mapping between tree and
display content is broken.

Using selectedItem, selectedNode, getTreeNodeAt doesn't give you enough
information (at least, it didn't seem to) on the node to map to content
in another custom array, object or XML containing your content data (I
can get single numbers, but not enough information about where it is in
the tree), and you can't put large paragraphs inside the Tree
dataprovider XML file which renders the tree, as it will mess up the
tree when it renders.  I couldn't find any methods of the Tree class
that would remedy this.

Or, is it instead preferred to not use a Tree dataprovider XML file and
add the Tree nodes individually with a composition class which composes
the tree with methods like Tree.addTreeNodeAt() based on the
content.xml, which also contains the content, thus preserving the
mapping when the data changes.

I hope that makes sense,

Jason Merrill
Bank of America
Learning  Organization Effectiveness - Technology Solutions





___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com