Foros de discusión

Lazy Treeview with filtering

liferay liferay, modificado hace 10 años.

Lazy Treeview with filtering

New Member Mensajes: 22 Fecha de incorporación: 19/12/13 Mensajes recientes
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();