|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gwtext.client.core.JsObject
com.gwtext.client.widgets.tree.TreeLoader
public class TreeLoader
A TreeLoader provides for lazy loading of an TreeNode
's child nodes from a specified URL.
The response must be a Json array definition who's elements are node definition objects. eg:
[{ 'id': 1, 'text': 'A folder Node', 'leaf': false },
{ 'id': 2, 'text': 'A leaf Node', 'leaf': true }]
A server request is sent, and child nodes are loaded only when a node is expanded. The loading node's
id is passed to the server under the parameter name "node" to enable the server to produce the correct
child nodes.
Field Summary | |
---|---|
protected com.google.gwt.core.client.JavaScriptObject |
configJS
|
Fields inherited from class com.gwtext.client.core.JsObject |
---|
jsObj |
Constructor Summary | |
---|---|
TreeLoader()
Create a new TreeLoader. |
|
TreeLoader(com.google.gwt.core.client.JavaScriptObject jsObj)
|
Method Summary | |
---|---|
void |
addListener(TreeLoaderListener listener)
Add a TreeLoader listener. |
protected com.google.gwt.core.client.JavaScriptObject |
create(com.google.gwt.core.client.JavaScriptObject config)
|
com.google.gwt.core.client.JavaScriptObject |
getJsObj()
|
static TreeLoader |
instance(com.google.gwt.core.client.JavaScriptObject jsObj)
|
void |
load()
Load a TreeNode from the URL specified in the TreeLoader configuration. |
void |
load(Function callback)
Load a TreeNode from the URL specified in the TreeLoader configuration. |
void |
setBaseAttrs(UrlParam[] params)
The request parameters to be added to all nodes created by this loader. |
void |
setBaseParams(UrlParam[] params)
Request properties which specify HTTP parameters to be passed to each request for child nodes. |
void |
setClearOnLoad(boolean clearOnLoad)
Default to true. |
void |
setDataUrl(java.lang.String dataUrl)
The URL from which to request a Json string which specifies an array of node definition object representing the child nodes to be loaded. |
void |
setMethod(Connection.Method method)
The request method (GET OR POST). |
void |
setMethod(java.lang.String method)
Deprecated. Use setMethod(com.gwtext.client.core.Connection.Method) |
void |
setPreloadChildren(boolean preloadChildren)
|
void |
setUiProviders(com.google.gwt.core.client.JavaScriptObject uiProvider)
Sets a new TreeNodeUI |
Methods inherited from class com.gwtext.client.core.JsObject |
---|
getProperties, isCreated, setJsObj |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected com.google.gwt.core.client.JavaScriptObject configJS
Constructor Detail |
---|
public TreeLoader(com.google.gwt.core.client.JavaScriptObject jsObj)
public TreeLoader()
Method Detail |
---|
public com.google.gwt.core.client.JavaScriptObject getJsObj()
getJsObj
in class JsObject
protected com.google.gwt.core.client.JavaScriptObject create(com.google.gwt.core.client.JavaScriptObject config)
public static TreeLoader instance(com.google.gwt.core.client.JavaScriptObject jsObj)
public void load()
public void load(Function callback)
callback
- the callback to execute on loadpublic void addListener(TreeLoaderListener listener)
listener
- the listenerpublic void setBaseAttrs(UrlParam[] params)
params
- the url paramspublic void setDataUrl(java.lang.String dataUrl)
dataUrl
- the data URLpublic void setPreloadChildren(boolean preloadChildren)
public void setMethod(Connection.Method method)
method
- the request methodConnection.GET
,
Connection.POST
public void setMethod(java.lang.String method)
setMethod(com.gwtext.client.core.Connection.Method)
method
- the request methodpublic void setBaseParams(UrlParam[] params)
params
- the request paramspublic void setClearOnLoad(boolean clearOnLoad)
clearOnLoad
- true to clear on loadpublic void setUiProviders(com.google.gwt.core.client.JavaScriptObject uiProvider)
uiProvider
- the new UI Provider
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |