getData: ->
nodes = []
if @multiSelect is true
nodes = @tree.getCheckedNodes()
else
node = @tree.getSelectedNode()
nodes.push node if node
ids = []
texts = []
levels = []
i = 0
l = nodes.length
while i < l
node_get = nodes
if @leafOnly is true
if @tree.isLeaf(node_get) is true
ids.push node_get.id
texts.push node_get.text
levels.push @tree.getLevel(node_get)
i++
else
ids.push node_get.id
texts.push node_get.text
levels.push @tree.getLevel(node_get)
i++
data = {}
data.id = ids.join(",")
data.text = texts.join(",")
data.level= levels.join(",")
data