Radicore Forum - RDF feed
https://forum.radicore.org/index.php
Tree structure
https://forum.radicore.org/index.phpindex.php?t=rview&goto=4323&th=1197#msg_4323
I worked through the tutorials and trough the article 'A Flexible Tree Structure' to implement my own tree structure. It is very interesting to see how you can build such flexible structures.
Now my question: Is it possible to build a tree structure and a tree view with other (existing) tables with cascading primary keys? I would like to show a hirarchy where I can use the occurances of existing tables. If I insert the levels and nodes in the three tables x_tree_type, x_tree_level and x_tree_node I would have to do twice.]]>htManager2014-07-05T10:17:06-00:00Re: Tree structure
https://forum.radicore.org/index.phpindex.php?t=rview&goto=4325&th=1197#msg_4325
AJM2014-07-06T08:40:21-00:00Re: Tree structure
https://forum.radicore.org/index.phpindex.php?t=rview&goto=4327&th=1197#msg_4327
Thank you very much.]]>htManager2014-07-07T09:52:09-00:00Re: Tree structure
https://forum.radicore.org/index.phpindex.php?t=rview&goto=4645&th=1197#msg_4645
I now have the problem that I don't see the + and - signs for expanding and collapsing my structure.
I have a primary key with three coloumns and changed the code the specified class files but with no success.
I have three levels. Under each level I inserted a node. Isn't it that level two should be expandable/collapsable in the tree structure? If not, which section of the tutorial should I read once again?]]>htManager2015-02-11T16:05:10-00:00Re: Tree structure
https://forum.radicore.org/index.phpindex.php?t=rview&goto=4647&th=1197#msg_4647
AJM2015-02-12T09:34:00-00:00Re: Tree structure
https://forum.radicore.org/index.phpindex.php?t=rview&goto=4649&th=1197#msg_4649
htManager2015-02-12T13:31:50-00:00Re: Tree structure
https://forum.radicore.org/index.phpindex.php?t=rview&goto=4650&th=1197#msg_4650
AJM2015-02-13T10:10:38-00:00Re: Tree structure
https://forum.radicore.org/index.phpindex.php?t=rview&goto=4652&th=1197#msg_4652
it's me again. I have a new problem. I see the tree structure twice. One time with the collapsed entry node and then underneath all (the same) nodes which belong to that tree.
I have checked the queries in the _cm_getNodeData() function but I don't see my fault. The difference to your sample application is that I work here with a primary key, consisting of three colomns. Can this be the problem?
If I expand the tree I can see the correct structure but always twice.
Where do I have to search for my fault?]]>htManager2015-02-26T14:12:24-00:00Re: Tree structure
https://forum.radicore.org/index.phpindex.php?t=rview&goto=4656&th=1197#msg_4656
AJM2015-02-28T11:20:30-00:00Re: Tree structure
https://forum.radicore.org/index.phpindex.php?t=rview&goto=4657&th=1197#msg_4657
$this->sql_select = 'hallen_plaetze_nodes.node_id, '
. 'hallen_plaetze_nodes.hallen_plaetze_node_desc, '
. 'hallen_plaetze_nodes.hallen_plaetze_nodes_logo_fname, '
. 'hallen_plaetze_level.hallen_plaetze_level_seq, '
. 'COUNT(child.node_id) AS child_count';
$this->sql_from = 'hallen_plaetze_nodes '
. 'LEFT JOIN hallen_plaetze_level ON '
. '(hallen_plaetze_level.verbaende_art_id=hallen_plaetze_nodes .verbaende_art_id AND '
. 'hallen_plaetze_level.verbaende_kuerzel=hallen_plaetze_nodes .verbaende_kuerzel AND '
. 'hallen_plaetze_level.halle_no=hallen_plaetze_nodes.halle_no AND '
. 'hallen_plaetze_level.hallen_plaetze_level_id=hallen_plaetze _nodes.hallen_plaetze_level_id) '
. 'LEFT JOIN hallen_plaetze_nodes AS child ON (hallen_plaetze_nodes.node_id=child.node_id_snr) ';
$this->sql_where = '';
$this->sql_groupby = 'hallen_plaetze_nodes.node_id, '
. 'hallen_plaetze_nodes.hallen_plaetze_node_desc, '
. 'hallen_plaetze_nodes.hallen_plaetze_level_id, '
. 'hallen_plaetze_level.hallen_plaetze_level_seq';
$this->sql_having = '';
$this->sql_orderby = 'hallen_plaetze_nodes.hallen_plaetze_level_id,'
. 'hallen_plaetze_nodes.node_id';
]]>htManager2015-02-28T13:31:20-00:00Re: Tree structure
https://forum.radicore.org/index.phpindex.php?t=rview&goto=4658&th=1197#msg_4658
You really should learn more about SQL and writing queries as without this knowledge you will find it difficult to extend the framework. You need to play with your queries outside of the framewor until you find the right query, then get the framewor to generate that query.]]>AJM2015-03-01T09:23:13-00:00Re: Tree structure
https://forum.radicore.org/index.phpindex.php?t=rview&goto=4660&th=1197#msg_4660
Thank you.]]>htManager2015-03-02T09:44:17-00:00Re: Tree structure
https://forum.radicore.org/index.phpindex.php?t=rview&goto=4697&th=1197#msg_4697
Can you tell me where I have to look for if I made the correct selection? Is it in a class or in a relationship?]]>htManager2015-04-23T15:49:17-00:00Re: Tree structure
https://forum.radicore.org/index.phpindex.php?t=rview&goto=4707&th=1197#msg_4707
For your information I have successfully implemented tree views in my enterprise application using tables which do not include column names such as TREE_TYPE, TREE_LEVEL or TREE_NODE, and which have compound primary keys, so I know that it is definitely possible to do so. My most recent usage was to display a Bill of Materials (BOM) in my PRODUCT database which uses a single table which contains the product hierarchy, as shown below:
CREATE TABLE `product_component` (
`product_id_snr` VARCHAR(40) NOT NULL,
`product_id_jnr` VARCHAR(40) NOT NULL',
`seq_no` SMALLINT(5) UNSIGNED NOT NULL,
`revision_id_snr` VARCHAR(16) NULL DEFAULT NULL,
`revision_id_jnr` VARCHAR(16) NULL DEFAULT NULL,
`quantity` DECIMAL(15,6) UNSIGNED NOT NULL DEFAULT '1.000000',
`start_date` DATE NOT NULL DEFAULT '2000-01-01',
`end_date` DATE NULL DEFAULT '9999-12-31',
PRIMARY KEY (`product_id_snr`, `product_id_jnr`, `seq_no`)
);
]]>AJM2015-04-24T08:07:29-00:00Re: Tree structure
https://forum.radicore.org/index.phpindex.php?t=rview&goto=4713&th=1197#msg_4713
Thank you very much once again for your advice.]]>htManager2015-05-04T15:48:12-00:00Re: Tree structure
https://forum.radicore.org/index.phpindex.php?t=rview&goto=4714&th=1197#msg_4714
AJM2015-05-05T08:30:30-00:00Re: Tree structure
https://forum.radicore.org/index.phpindex.php?t=rview&goto=4757&th=1197#msg_4757
I have a table where I can show with tree2 pattern the structure and above all the seats of a sportstadiom. Now I want insert all the (300-400) seats of the stadiom into a table where I want to print tickets for the games.
Both tables have composed primary keys. The primary key of the 'nodes' table is part of the primary key of the 'ticket' table. But the primary key of the 'ticket' table exists also of three more coloums. If I want to generate a popup (list2 or tree2) I get an error message that the tables are not related. I think this is because of the additional primary key components of the 'ticket' table.
Have you an idea and can you give me a hint which transaction pattern I can use?]]>htManager2015-06-01T15:32:46-00:00Re: Tree structure
https://forum.radicore.org/index.phpindex.php?t=rview&goto=4758&th=1197#msg_4758
ADD3 pattern.]]>AJM2015-06-02T09:12:31-00:00Re: Tree structure
https://forum.radicore.org/index.phpindex.php?t=rview&goto=4759&th=1197#msg_4759
htManager2015-06-02T14:46:07-00:00Re: Tree structure
https://forum.radicore.org/index.phpindex.php?t=rview&goto=4760&th=1197#msg_4760
AJM2015-06-02T17:05:26-00:00