Home > Contents > Index >
TREEMANAGER.addchildren
Adds multiple nodes to a tree table.
Syntax
<TREEMANAGER> <ARGUMENT NAME="ftcmd" VALUE="addchildren"/> <ARGUMENT NAME="treename" VALUE="name"/> <ARGUMENT NAME="parentnodeN" VALUE="node_id"/> [<ARGUMENT NAME="otypeN" VALUE="object table"/>] [<ARGUMENT NAME="oidN" VALUE="row number"/>] [<ARGUMENT NAME="oversionN" VALUE="object version"/>] [<ARGUMENT NAME="ncodeN" VALUE="some string"/>] [<ARGUMENT NAME="nrankN" VALUE="node rank"/>] </TREEMANAGER>Parameters
ftcmd (required)
- Value must be set to
addchildren
.
treename (required)
- Name of the tree.
parentnodeN (required)
nid
of the parent node. The value N corresponds to the row number to be added starting from0
(zero). Top level nodes are identified by a zero value. Must be an integer. Unlike theaddchild
command,nparentidN
must be provided and cannot be leftNULL
.
otypeN (optional)
- Name of an object table. The value N corresponds to the row number to be added starting from 0 (zero).
oidN (optional)
- Identifies the current object on this node. The
oid
should correspond to a value in the object table'sid
column. The value ofN
corresponds to the row number to be added starting from0
(zero).
oversionN (optional)
- A numeric value that specifies the version of the object. This parameter is not supported for this release of Sites, and is reserved for use in later versions.
ncodeN (optional)
- A 16-character string value that can be used by an application. The value of
N
corresponds to the row number to be added starting from0
(zero).
nrankN (optional)
- A numeric value of the rank to assign this node. The value of
N
corresponds to the row number to be added starting from0
(zero).
errno
The possible values of
errno
include:
Value Description -3 No access privileges to table. -103 No table. -105 Database error. -106 Missing or invalid parameter. -110 Invalid tree name.Example
The following example adds two nodes to the tree table and then browses the list to retrieve the two nodes'
nid
values for future use.<TREEMANAGER> <ARGUMENT NAME="ftcmd" VALUE="addchildren" /> <ARGUMENT NAME="treename" VALUE="TreeMgrCatalog" /> <ARGUMENT NAME="nparentid0" VALUE="0" /> <ARGUMENT NAME="otype0" VALUE="TreeObjectCatalog" /> <ARGUMENT NAME="oid0" VALUE="Variables.myfirstobjID" /> <ARGUMENT NAME="oversion0" VALUE="Variables.empty" /> <ARGUMENT NAME="nrank0" VALUE="101" /> <ARGUMENT NAME="ncode0" VALUE="top level node" /> <ARGUMENT NAME="nparentid1" VALUE="parent.nid" /> <ARGUMENT NAME="otype1" VALUE="TreeObjectCatalog" /> <ARGUMENT NAME="oid1" VALUE="Variables.mysecondobjID" /> <ARGUMENT NAME="oversion1" VALUE="Variables.empty" /> <ARGUMENT NAME="nrank1" VALUE="202" /> <ARGUMENT NAME="ncode1" VALUE="second level node" /> </TREEMANAGER> <IF COND="IsError.Variables.errno !=true"> <THEN> <LOOP LIST="Variables.treename"> <IF COND="Variables.treename.nrank=101"> <THEN> <SETVAR NAME="topid" VALUE="Variables.treename.nid"/> </THEN> </IF> <IF COND="Variables.treename.nrank=202"> <THEN> <SETVAR NAME="topid" VALUE="Variables.treename.nid"/> </THEN> </IF> </LOOP> </THEN> <ELSE> <!-- add error handling logic here --> </ELSE> </IF>See Also
Home > Contents > Index > ![]()
Oracle XML Tag Reference
Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.