27
Views
2
Comments
Solved
Creating group with zTree
Question

Hello guys!

I am implementing a film tree and for each film there is its genre. So I'm interested in using the zTree component that exists in Forge.

The component allows me to have Drag and Drop, OnClick and Dynamically Save the changes I made to the tree.

I made the implementations as there is in the example. I can already choose by ID, which movie will be listed in my details.


What I don't have experience to implement using the component is:

1. When loading the tree, separate my films by genre in the tree structure. As I have the columns in the table.

2. When using Drag and Drop on the tree, click on the button to save that change I made to the nodes.



I am forwarding the OML, to get a better understanding and help of ideas for implementation.


Thank you!

ZTreeDanilo.oml

Rank: #1103
Solution

Hi Danilo Vilarinho ,


The configuration in your case is incorrect the Jquery used in the component receives a combined list values parent -> leaf synchronously.  The data needs to be inserted in a list variable first for parent i.e Genre in your case then related movies then the second genre and so on.

Also you need to change the Entity structure to make genre static.

Please check the attachment for your 1st problem and find the solution for the second yourself by comparing it with the component demo.


Regards

ZTreeDanilo1.oml