inputEx-library

inputEx  0.7.1

inputEx-library > inputEx > inputEx.widget.JsonTreeInspector
Search:
 
Filters

Class inputEx.widget.JsonTreeInspector

Create a treeview to inspect a javascript object

Constructor

inputEx.widget.JsonTreeInspector ( parentEl , object , jsonPath )
Parameters:
parentEl <String|HTMLElement> where to append the tree
object <Object> the object to inspect
jsonPath <String> JSON Path string (optional) (http://code.google.com/p/jsonpath/wiki/Javascript)

Properties

el - object

Main div element

hash - object

Hash to contain the values indexed by li ids

Methods

addItem

void addItem ( item )
Add an item to the list
Parameters:
item <String|Object> Either a string with the given value or an object with "label" and "value" attributes

buildBranch

void buildBranch ( )
Build the sub-branch for obj

destroy

void destroy ( )
Destroy the widget

expandAll

void expandAll ( maxLevel )
Expand the root node
Parameters:
maxLevel <Integer>

expandBranch

void expandBranch ( li , maxLevel )
Expand a branch given a li element
Parameters:
li <HTMLElement>
maxLevel <Integer>

expandElement

void expandElement ( )
expand the node given the li element

jsonPath

void jsonPath ( )
JSONPath 0.8.0 - XPath for JSON http://code.google.com/p/jsonpath/ http://code.google.com/p/jsonpath/wiki/Javascript Copyright (c) 2007 Stefan Goessner (goessner.net) Licensed under the MIT (MIT-LICENSE.txt) licence.

onItemClick

void onItemClick ( )
When the user click on a node


Copyright © 2011 Eric Abouaf All rights reserved.