Welcome, Guest. Please login or register.
Did you miss your activation email?
02/08/12, 13:57
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  General
| |-+  V2 Components (Flash MX 2004 - Flash 8) (Moderators: vesa kortelainen, Ronald Wernecke, Jorge Solis, ..:: Mazhar Hasan ::.., papachan)
| | |-+  v2 Tree populated from query
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: v2 Tree populated from query  (Read 1299 times)
alex campbell
Server what's that
*
Posts: 43


Hair was made to be torn out!


View Profile WWW Email
« on: 08/17/04, 07:34 »

 ::)I need  to create & identify nodes within the v2 Tree component using a unique ID data field as part of the node name.

This means I can create a parent/child tree directly from a Flash Remoting query (instead of XML). This is do-able, as the query record has its own ID field as well as its related ParentID field (and worked well in v1 - see below)

In the V1 Tree View component I could generate new node instances with node names that could be used to generate further parent/child nodes based on content (see below):

this["node"+ result.items.CategoryID]=new FTreeNode(result.items.CategoryName, result.items.CategoryID);
this["node"+ result.items.ParentCategoryID].addNode(this["node"+ result.items.CategoryID]);

Can anyone please show how I can do this with the new V2 tree component?

Regards, Alex
Logged
Ronald Wernecke
Administrator
Systems Administrator
*****
Posts: 6162


View Profile WWW Email
« Reply #1 on: 08/17/04, 08:15 »

Hi Alex,
a tree allways means, it is not a single table.
How would you provide a multitable in a recordset Huh

The easyest way to provide a structure for the tree component is XML.
But, if you use remoting, you can trensfer the xml object via AMF.
Logged

happy flashing
Cool
Ronald
alex campbell
Server what's that
*
Posts: 43


Hair was made to be torn out!


View Profile WWW Email
« Reply #2 on: 08/17/04, 13:50 »

Thanks for the response - but I think you misunderstand my requirement,

You can use v1:TreeView for remoting queries which could be from one or more tables - that is not the issue. Even with v2:Tree, I can populate a tree with direct ouput from a SQLServer query via Flash remoting/ColdFusion. All I do is build a simple loop that processes each of the returned query records, and places them into the tree (each with a label & data field).

My problem  here is in trying to address individual tree nodes so that I can build some logic into how parent and child nodes are setup based on the parent/child relationship that is in each query data record. This was possible - and very fast in v1:TreeView,with very little code required (just a loop construct around the 2 lines of code shown)

Regards,Alex
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
anything