Skip to Content
author's profile photo Former Member
Former Member

Reading and modifying data in a recursive node

Hi All,

I am using a TreeByNesting column in a table UI element of my component.

For this purpose I have created a node in the context - ('TREE') which contains a recursive node - ('RECURSIVE_TREE').

What would be the simplest way to read the data from this node ? And how do I go about changing a single line of information

within the node ?

Thanks,

Fathima

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Oct 12, 2010 at 11:55 AM

    What would be the simplest way to read the data from this node?

    Reading data from a recursive node is no different to reading any normal node. It's just that you have a very simple way of holding the same structure.

    Once you have a reference to the element of a node (a single line of data), then updating it is no different to updating a line of a table.

    More issues are associated with making and setting lead selections for an element (all parent elements also need to be lead selected and no child elements). Searching through the hierarchy, etc.

    Where I have used this functionality I have often set up search tables with the key data that I want to search in a flat table and a reference to the corresponding element - much easier to search then - without having to resort to recursive coding!

    Could you elaborate a little on what exactly you are having an issue with?

    Cheers,

    Chris

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      For one, the node that I have implemented might have up to a maximum of 5 sub-node levels.

      So the user may open the tree at different levels and I want to see all the expanded nodes in an internal table.

      I just tried a simple 'get_child_node ' implementation , but I find that if 2 or more nodes are expanded, on the same sub-node level, only one of them is read.

      I have also tried using the 'get_child_nodes' method.

      How do I extract a single node from the list of child nodes ? Particularly when they are of different data types.

      Is there a way to sort of go through the entire tree, line by line and read the info ?

      " Where I have used this functionality I have often set up search tables with the key data that I want to search in a flat table and a reference to the corresponding element - much easier to search then - without having to resort to recursive coding! "

      This sounds like a really good option. I think I should try to implement something like this. It would make the reading the data part much easier.

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.