Tree from database
There exist typical operation of looking database table, refering to own primary key:
records, refering to "clicked" record, are demonstrated in browser as enclosed into "clicked" record,
others - still not required from database.
We enter html-element dialogue, displaying records of database table with signs
(that database table is demonstrated especially so,
instead of representation as table or cube,
property type must be equal tree).
In attribute roll, we specify name of database table
<dialogue roll="A"/>
dialogue {
type: record;
}
or SQL-request
<dialogue roll="select * from A where a15=100"/>
dialogue {
type: record;
}
and in properties
- address - domain name or IP-address of DBMS
(by default it's the same address, from which html-document is obtained)
- type=tree
Connection with database occurs via separate TCP-port by protocal SQL5.
When browser meets this html-element during loading document, it:
- reads scheme of table A from system tables of database by SQL-requests, finds refering field and
second field (will be displayed as name of node of tree)
- reads primary key and second field of records of table A, not refering to other records of the same table
select * from A where ref_fld is null;
User can append and remove nodes, rename nodes, open and close nodes
(see enclosed nodes), drag-and-drop and copy nodes
(including between different dialogue - it's only necessary, that these dialogue
work with the same database table).
|
folder_name1 |
|
folder_name2 |
|
|
folder_name3 |
|
|
folder_name4 |
|
folder_name5 |
|
|
folder_name6 |
Displaying of columns
There is ambiguity at presence of several refering fields,
to solve which there is a need to specify necessary refering field in property ref.
Graphic properties
Property image specifies graphic file,
which should be used as marker of node.
Property newstring specifies,
whether nodes of one level of hierarchy should be located in one line or each in a new line.
folder |
|
folder |
|
folder3 |
| | newstring=yes (by default) |
|
folder |
|
folder
folder3 |
|
| folder |
folder |
|
folder3 |
| newstring=no |
Property sideward specifies,
where enclosed nodes should be located concerning parent node ("folder3") tag.
folder3 |
|
folder |
|
folder |
|
folder3 |
|
folder
folder |
| sideward=right (by default) |
|
| folder3 |
folder |
|
folder |
|
|
| folder3 |
folder
folder |
|
| sideward=left |
|
folder3 |
|
folder |
folder |
|
| folder3 |
folder |
|
folder |
| sideward=center |
Property wholenes specifies way to represent nodes.
Brief means,
that enclosed nodes of all parent nodes are not shown,
and that only such enclosed nodes are shown, which are on the directly next level of hierarchy.
folder1 |
|
folder2 |
|
|
folder3 |
|
|
|
folder41 |
|
|
|
|
folder5_41 |
|
|
|
folder42 |
|
|
|
|
folder5_42 |
|
| wholenes=full (default value) |
|
| folder1/folder2/folder3 |
|
folder41 |
|
folder42 |
|
| folder1/folder2/folder3 |
|
folder41
folder42 |
| wholenes=brief |
P.S.
dialogue with any value of property type
(equal to record, tree, or cube)
can be master html-element for
dialogue with any value of property type.
Html-document itself, requests from all dialogue, containing in it,
answers to request go sequentially via the same TCP-connection
(answers are separated from each other and from html-document by bament
<?new/?>,
answers come after end of accepting html-document).
Dmitry Turin