I have a tree control that I have setup a right click menu on to simulate a user adding items to the tree control.  When they right click they get an option to add a new folder / item to the tree.  I pop up a dialog box where they can type in the name they want to give it.  I can’t find a way to dynamically add what they type as an item in the tree.  So I am wondering what the advice would be on how to handle this.  Should I jump to a new page with a different tree that has a hardcoded item just to simulate what happens?  I tried adding blank values into the tree and then setting their names dynamically but having the tree expanded ahead of time with blank items doesn’t really simulate what the user would be doing.  

I think what needs to happen is some more granular action options need to be added for the tree control.  We should be able to add elements with an action where we want them added and then expand the tree with an action to show that element.  In the meantime I could use some advice on what you would do to simulate this.



2 answers

Staff September 28, 2016

Hi Bill, you are right that ForeUI still lacks of an action to add new item into the tree control.

As for the possible ways to simulate this behavior, jumping to a new page with another tree control is of course an option. You can let the new page to use the original page as master page, and only overlap the new tree control on it. That can save a lot of time.

Also you can consider using the Reference element as the holder of different tree controls. Thanks to the newly added action to dynamically set target element, you can now store your tree controls in an inaccessible page, and dynamically set the reference target to different tree control.

I think both two approaches will work. The second one seems better if you want to “add” more items into the tree control.


The reference item worked great!  It is still a lot of work for what seems like a pretty easy change in the software to accommodate actions on tree controls for adding elements and expanding collapsing.  But this will get the job done in the meantime.  




Please login or Register to Submit Answer