on 11-07-2008 11:53 AM
Hello Experts,
How can i create a tree like
parant node as project
child node as the subproject
Thanks,
Shaik Shadulla
closed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shaik,
1. you need to create a node as a root node
2. create a node as a parent node again into root node,
3. create two attribute into parent node name and value for your tree,
4. create an item node into parent node.
5. and create again two attribute name and value into item node for your tree items.
root
->parent
-name
-value
->item
-name
-value
6. now create a tree element into your layout levela and assign root node to datasource of tree element.
7. create an element type of 'TreeNodeType' under tree and assign parent node to datasource of this element.
8. create an element type of 'TreeItemType' under tree and assign item node to datasource of this element.
9. now fill tree with suply functions of nodes.
codes of suply function of parent node as below,
data: kinds type wdr_name_value_list.
data: kind type wdr_name_value.
kind-name = 'K01'.
kind-value = 'motor türü 1'.
append kind to kinds.
kind-name = 'K02'.
kind-value = 'motor türü 2'.
append kind to kinds.
node->bind_table( kinds ).
codes of suply function of item node as below,
data: motor_types type wdr_name_value_list,
kind type string.
parent_element->get_attribute( exporting name = 'NAME' importing value
= kind ).
data: motor_type type wdr_name_value.
case KIND.
when 'K01'.
motor_type-name = 'T11'.
motor_type-value = 'tür 1 tip 1'.
append motor_type to motor_types.
motor_type-name = 'T12'.
motor_type-value = 'tür 1 tip 2'.
append motor_type to motor_types.
when 'K02'.
motor_type-name = 'T21'.
motor_type-value = 'tür 2 tip 1'.
append motor_type to motor_types.
motor_type-name = 'T22'.
motor_type-value = 'tür 2 tip 2'.
append motor_type to motor_types.
motor_type-name = 'T23'.
motor_type-value = 'tür 2 tip 3'.
append motor_type to motor_types.
endcase.
node->bind_table( motor_types ).
i wish i helped you.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.