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

html:tree: problem with expand all button

Hi there,

I'm usind a htmlb:tree element in one of my sites to display a hierarchy. The table used for the data (of type TVIEW2) is stored within my modelclass. Everything ok so far.

I now wanted to add two buttons allowing the user to expand the whole tree with one click and closing all nodes with one click.

The event gets caught within 'DO_HANDLE_EVENT' and another method is called within the controller.

This method alters the table in that way, that all lines with the attribut status = 'closed' are changed to status = 'open'.

But this has no effect on the rendering of the tree on my page. The nodes that were closed before pressing the button are still closed. On pressing the little icon in front of the node it gets opened.

Generally the change of parameters within my TVIEW2 table works. I tried with changing the text for all nodes, worked fine...

Anyone an idea for my little problem?



Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 02, 2005 at 08:59 AM


    The tree view control can exist in two states, one is where it re-generates the state of it's nodes from the earlier request, i.e. if you could see them in an open state before the page was submitted u'll be able to see them in the same state i.e. open when the page is displayed after the event processing.

    The key to updating the tree nodes i.e. to change the status of the nodes from within the event processing block, it is necessary to prevent the table control from restoring the previous state.

    This can be achieved by setting the tree view tag attribute restoreViewState = "FALSE".


    <htmlb:tree id="myTree4" table2="<%=tab%>" restoreViewState="FALSE"/>

    Let me know if this helps.


    Aniruddha Gargya

    Add a comment
    10|10000 characters needed characters exceeded

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.