You may work on this assignment as a group.
If anything does not work as described here,
notify the instructor immediately.
Each student must complete at least one task.
cd ~/public_html/ms_apps_cs440/framework_v3 cvs up -d cd ~/public_html/ms_apps_cs440/web_gen cvs up -d cd ~/public_html/ms_apps_cs440/treeview cvs up -d cd ~/public_html/ms_apps_cs440/mantis cvs up -d
xxxx
at the top level of the treeview,
you need to generate configuration files
xxxx_tree.mconfig and xxxx_tree.config
and then generate treeview script xxxx_tree.phtml
with the following commands:
treemconfgen -f xxxx treeconfgen -f xxxx treegen_v2 xxxx_treeExecute these commands in a subdirectory of
forms_mysql
where scripts for table xxxx are stored.
treemconfgen retrieves the tables
that can be recursively reached by one-many links from
table xxxx.
Table names retrieved from the database metadata are
listed as an array in file xxxx_tree.mconfig generated.
You may edit xxxx_tree.mconfig,
keeping only those tables whose data are displayed in the treeview.
treeconfgen generates
configuration file xxxx_tree.config
from xxxx_tree.mconfig.
File xxxx_tree.config provides for each treeview layer
such information as
the name of the table, the primary key, the parent key,
the image associated with a treeview node,
and the links for the actions.
treegen_v2 generates a treeview script
xxxx_tree.phtml from xxxx_tree.config.
forms_mysql/data_admin2/images with command
cp -r ../data_admin2/images .
mantis_project_table_tree_v2.php
in ~/public_html/ms_apps_cs440/mantis/forms_mysql/treeview_ajax
by opening it with URL
http://~your-login-name/ms_apps_cs440/mantis/forms_mysql/treeview_ajax/
mantis_project_table_tree_v2.php
Then study the following scripts:
zdata_admin_tree.html
-- test script showing how to access nodes and attributes and
how to display and hide nodes.
mantis_project_table_tree_v2.php
-- main application script executed on the server
mantis_project_table_tree_node_v2.php
-- server-side script that generates HTML elements for children nodes
scripts_v2.js -- creates AJAX requests for the application
ajax.js -- handles AJAX requests and responses
select count(*) from ... to
mantis_project_table_tree_node_v2.php.
this_node_type
and pkey of each node expanded.
The attributes of each treeview node is stored as
<div this_node_type = MANTIS_PROJECT_FILE_TABLE pkey = 10
text = Mantis_bugnote_table level = 2>
You can obtain the value of attribute this_node_type
with DOM method call
obj.getAttribute("this_node_type")
last_node as
<div this_node_type = MANTIS_PROJECT_FILE_TABLE pkey = 10
text = Mantis_bugnote_table level = 2 last_node=true>
You can obtain the value of this attribute with DOM method call
obj.getAttribute("last_node")
levels_ended
which is a string of 0s and 1s.
For example, levels_ended="1010" for
a fourth-level node indicates that vertical bars are needed only
for levels 1 and 3, implying that the additional nodes of these levels
are drawn below the current node.
You can set a value of attribute levels_ended with DOM method call
obj.setAttribute("levels_ended", "bb...b").
levels_ended=bb...b,
the levels_ended for the new node should be
bb...b0 if the new node is not the last node at the current level.
Otherwise, it should be bb...b1.
yyyy_ajax under forms_mysql,
where yyyy is an old category name.
xxxx_tree.config
for table xxxx as described earlier.
mantis_project_table_tree_v2.php to
xxxx_tree_v2.php and edit it.
xxxx_tree_node_v2.php
with command treegen_ajax xxxx.