cancel
Showing results for 
Search instead for 
Did you mean: 

How to populate the master column in a table

arjun_thakur
Active Contributor
0 Kudos

Hi Experts,

I am trying to implement a hierarchy structure in a table. For that I have inserted a master column of TreeByNestingTableColumn type. The value which are getting displayed in a table are hard coded by me, but I am not able to understand how should I populate the values so that when the table initially appears, it should contain some data (which I hard code) and when I click the master column, it should expand and display value according the master column selected(which I again hard code).

Please help me in achieving it.

Regards

Arjun

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Go throgh the tutorial "Creating a Tree Structure in a Table" in the blow link.

[original link is broken]

In these example only the souce of data changes as per your requriement. In the examples they are reading data from java class.

1. First you need to create a value node with (Parent Id, Boolean Type: isLeaf, Expanded, ChildernLoaded), attributes.

2. Then you have to create one recursive node under that Value node by selecting that node as reference.

3. As given in the example create one method called addChildern(Node, ParentId).

4. Now in the wdDoInit method call this method by passing the Value node and "ROOT" as parent Ids

5. In addChildern method if parentId is ''ROOT" then populate all the root elements in the parent node.

6. Now root elements will be populated.

7. When user clicks on any of the root element then invoke the action loadChildern(this should be binded to Master column) and pass recursive node of that parent element and the parenId (as given in the exmaple).

8. Based on this parentId now populate the chids in addChildern method.

See this thread: Helpful:

Regards,

Charan

Regards,

Charan

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Arjun,

Below link will help u to achieve this:

/docs/DOC-8061#31 [original link is broken]

Sandy