Judging by my searches I pretty sure I know the answer to this, but thought I'd ask anyway

I have a requirement to show users an expanded tree of parts needed to build an item, so for instance if say I have a car it would show which parts attach to which parts. The user has the ability to search for parts and then to highlight those parts in the tree.

At the moment I don't think FS can show an expanded tree???

Has anyone had any success using 3rd party javascript plugin??

Cheers Simon

asked 25 May '16, 06:00

apacheuk's gravatar image

apacheuk
1391223
accept rate: 0%


Hi Simon,

Doesn't api_treenode API's package have the procedures you need?

link

answered 25 May '16, 06:30

Yalim's gravatar image

Yalim ♦♦
2.8k5
accept rate: 21%

what I need is the tree to be expanded and show all nodes when the tree first displays.... is that possible?

link

answered 25 May '16, 08:48

apacheuk's gravatar image

apacheuk
1391223
accept rate: 0%

1

Yes, I think so. There isn't a single API to do this but I think it can be done using a combination of API's in the api_treenode package.

Basically, you have to add/create the child nodes of every node in the tree (the populateChildren API) and then expand each node in the tree (expand API).

The trick is as you populate the tree with children of parent nodes, there will be new nodes which themselves might be parent nodes. So you need to do this recursively. :-)

If you are driving the tree with a datasource (or datasources) you might need to set the bind variables correctly each time you are trying to produce new nodes from your datasource.

You might expand the nodes immediately after you add the child nodes or you might want to go over the list of nodes currently in the tree and expand them one by one. (T_BDF_TREEINS table). The second option is a hack but it's an innocent hack. :-)

Kind Regards,
Yalim

(25 May '16, 10:12) Yalim ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×11
×1

Asked: 25 May '16, 06:00

Seen: 467 times

Last updated: 25 May '16, 10:31


© Copyright Gerger 2017