Foren

Lazy Treeview with filtering

liferay liferay, geändert vor 10 Jahren.

Lazy Treeview with filtering

New Member Beiträge: 22 Beitrittsdatum: 19.12.13 Neueste Beiträge
Background:

wanna create a lazy treeview with io. when expand node, the tree need to get the filtering criteria from the form and pass to the server side and get the children. Then append to the tree node

Facing Difficults:

How to add the event handler before expand tree node and add the filtering criteria to the request. Then will can get the filtering criteria from server side?

Or any other way to create lazy treeview with filtering criteria?

Please help and appreciated if example code provided. Thanks!



var children = [
		{
			label: 'ROOT',
			id: 'root',
			children: [
				{
					type: 'task',
					checkName: 'customSelectName',
					label: 'TaskNodeRoot',
					leaf: false,
					checked: true,
					io: 'http://localhost:8080/web/guest/home',
					on: {
						append: function(event){//how can i get the node attr here, ie, the io url}
					},
					after: {
						append: function(event){//how can i get the node attr here ie, io url}
					}
				}
			]
		}
	];
	
var tree = new A.TreeView({
		boundingBox: '#myTreeview'
		children: children
		]
	}).render();