留言板

Lazy Treeview with filtering

liferay liferay,修改在10 年前。

Lazy Treeview with filtering

New Member 帖子: 22 加入日期: 13-12-19 最近的帖子
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();