Java Doc for XMLTreeLoader.java in  » Ajax » gwtext-2.01 » com » gwtext » client » widgets » tree » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Ajax » gwtext 2.01 » com.gwtext.client.widgets.tree 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.gwtext.client.widgets.tree.TreeLoader
   com.gwtext.client.widgets.tree.XMLTreeLoader

XMLTreeLoader
public class XMLTreeLoader extends TreeLoader (Code)
Provides the abilty to a TreePanel using remote XML data.This TreeLoader can be configured to load tree data from XML returned from a remote URL.

Sample code for loading a TreePanel using AsyncTreeNode and XmltreeLoader :

 
 final TreePanel treePanel = new TreePanel() {
 {
 setAnimate(true);
 setEnableDD(true);
 setContainerScroll(true);
 setRootVisible(true);
 }
 };
 final XMLTreeLoader loader = new XMLTreeLoader() {
 {
 setDataUrl("countries-cb.xml");
 setMethod("get");
 setRootTag("countries");
 setFolderIdMapping("@id");
 setLeafIdMapping("@id");
 setFolderTitleMapping("@title");
 setFolderTag("team");
 setLeafTitleMapping("@title");
 setLeafTag("country");
 setQtipMapping("@qtip");
 setDisabledMapping("@disabled");
 setCheckedMapping("@checked");
 setIconMapping("@icon");
 setAttributeMappings(new String[]{"@rank"});
 }
 };
 AsyncTreeNode root = new AsyncTreeNode("Countries", loader);
 treePanel.setRootNode(root);
 treePanel.render();
 root.expand();
 treePanel.expandAll();
 
 
The above code loads a Tree using the following XML data - countries-cb.xml
 
 <countries>
 <team id="team-a" title="Team A" icon="images/silk/flag_yellow.gif" checked="true">
 <country title="Brazil" qtip="Rank 2" rank="2"  checked="false"/>
 <country title="Canada" qtip="Rank 3" rank="3" checked="false"/>
 <country title="China" qtip="Rank 4" rank="4" checked="false"/>
 </team>
 <team title="Team B" icon="images/silk/flag_blue.gif">
 <country title="Germany" qtip="Captain" checked="true" rank="1"/>
 <country title="France" qtip="Rank 2" rank="2" checked="false"/>
 <country title="Canada" qtip="Rank 3" rank="3" checked="false"/>
 <country title="India" qtip="Rank 4" rank="4" checked="false"/>
 <country title="Seychelles" qtip="Rank 5" rank="5" checked="false"/>
 </team>
 <team title="Team C" icon="images/silk/flag_green.gif">
 <country title="United States" qtip="Captain - Rank 1" checked="true" rank="1"/>
 <country title="Japan" qtip="Rank 2" rank="2" checked="false"/>
 <country title="Italy" qtip="Rank 3" rank="3" checked="false"/>
 <country title="Finland" qtip="Rank 4" rank="4" checked="false"/>
 </team>
 </countries>
 
 

See Also:   com.gwtext.client.widgets.tree.TreePanel
See Also:   com.gwtext.client.widgets.tree.TreeLoader
See Also:   com.gwtext.client.widgets.tree.AsyncTreeNode



Constructor Summary
public  XMLTreeLoader()
     Construct a new XMLTreeLoader.
public  XMLTreeLoader(String url, String rootTag, String folderTag)
     Construct a new XMLTreeLoader.

Method Summary
native protected  JavaScriptObjectcreate(JavaScriptObject configJS)
    
public  StringgetAllowDragMapping()
     Return the node's "allow drag" mapping.
public  StringgetAllowDropMapping()
     Return the node's "allow drop" mapping.
public  String[]getAttributeMappings()
     Return the node's attribute name(s) mapping.
public  StringgetCheckedMapping()
     Return the checkbox state value mapping.
public  StringgetDisabledMapping()
     Return the mapping for the disabled state value.
public  StringgetExpandedMapping()
     Return the mapping for the node's expanded state value.
public  StringgetFolderIdMapping()
     Return the folder ID value mapping.
public  StringgetFolderTag()
     Return the folder tag name.
public  StringgetFolderTitleMapping()
     Return the folder title mapping.
public  StringgetHrefMapping()
    
public  StringgetHrefTargetMapping()
     Return the node's href target value mapping.
public  StringgetIconClsMapping()
     Return the icon class mapping.
public  StringgetIconMapping()
     Return the icon mapping.
public  StringgetLeafIdMapping()
     Return the leaf ID value mapping.
public  StringgetLeafTag()
     Return the leaf tag name.
public  StringgetLeafTitleMapping()
     Return the leaf title mapping.
public  StringgetQtipMapping()
     Return the quick tip value mapping.
public  StringgetRootTag()
     Return the root tag name.
public  voidsetAllowDragMapping(String allowDragMapping)
     Set the node's "allow drag" mapping.
public  voidsetAllowDropMapping(String allowDropMapping)
     Set the node's "allow drop" mapping.
public  voidsetAttributeMappings(String[] attributeMappings)
     Set the node's attribute name(s) mapping.
public  voidsetCheckedMapping(String checkedMapping)
     Set the checkbox state value mapping.
public  voidsetDisabledMapping(String disabledMapping)
     Set the mapping for the disabled state value.
public  voidsetExpandedMapping(String expandedMapping)
     Set the mapping for the node's expanded state value.
public  voidsetFolderIdMapping(String folderIdMapping)
     Set the folder ID mapping relative to the folder tag.
public  voidsetFolderTag(String folderTag)
     The folder tag name in the XML data.
public  voidsetFolderTitleMapping(String folderTitleMapping)
     Mapping corresponding to the title of the folder relative to the folder tag.
public  voidsetHrefMapping(String hrefMapping)
     Set the node's href value mapping.
public  voidsetHrefTargetMapping(String hrefTargetMapping)
     Return the node's href target value mapping.
public  voidsetIconClsMapping(String iconClsMapping)
     Set the icon class mapping.
public  voidsetIconMapping(String iconMapping)
     Set the icon mapping.
public  voidsetLeafIdMapping(String leafIdMapping)
     Set the leaf ID mapping relative to the leaf tag.
public  voidsetLeafTag(String leafTag)
     The leaf tag name in the XML data.
public  voidsetLeafTitleMapping(String leafTitleMapping)
     Mapping corresponding to the title of the leaf relative to the leaf tag.
public  voidsetQtipMapping(String qtipMapping)
     Set the quick tip value mapping.
public  voidsetRootTag(String rootTag)
     The root tag name in the XML data.


Constructor Detail
XMLTreeLoader
public XMLTreeLoader()(Code)
Construct a new XMLTreeLoader.



XMLTreeLoader
public XMLTreeLoader(String url, String rootTag, String folderTag)(Code)
Construct a new XMLTreeLoader.
Parameters:
  url - the data url
Parameters:
  rootTag - the root tag
Parameters:
  folderTag - the folder tag




Method Detail
create
native protected JavaScriptObject create(JavaScriptObject configJS)(Code)



getAllowDragMapping
public String getAllowDragMapping()(Code)
Return the node's "allow drag" mapping. the allow drag mapping



getAllowDropMapping
public String getAllowDropMapping()(Code)
Return the node's "allow drop" mapping. the allow drop mapping



getAttributeMappings
public String[] getAttributeMappings()(Code)
Return the node's attribute name(s) mapping. the attribute name mapping



getCheckedMapping
public String getCheckedMapping()(Code)
Return the checkbox state value mapping. the checked mapping



getDisabledMapping
public String getDisabledMapping()(Code)
Return the mapping for the disabled state value. the disabled mapping



getExpandedMapping
public String getExpandedMapping()(Code)
Return the mapping for the node's expanded state value. the expanded mapping



getFolderIdMapping
public String getFolderIdMapping()(Code)
Return the folder ID value mapping. the folder ID value mapping



getFolderTag
public String getFolderTag()(Code)
Return the folder tag name. the folder tag



getFolderTitleMapping
public String getFolderTitleMapping()(Code)
Return the folder title mapping. folder title mapping



getHrefMapping
public String getHrefMapping()(Code)
Return the node's href value mapping the href mapping



getHrefTargetMapping
public String getHrefTargetMapping()(Code)
Return the node's href target value mapping. the href target mapping



getIconClsMapping
public String getIconClsMapping()(Code)
Return the icon class mapping. the icon class mapping



getIconMapping
public String getIconMapping()(Code)
Return the icon mapping. the icon mapping



getLeafIdMapping
public String getLeafIdMapping()(Code)
Return the leaf ID value mapping. the leaf ID value mapping



getLeafTag
public String getLeafTag()(Code)
Return the leaf tag name. the leaf tag



getLeafTitleMapping
public String getLeafTitleMapping()(Code)
Return the leaf title mapping. the leaftitle mapping



getQtipMapping
public String getQtipMapping()(Code)
Return the quick tip value mapping. the quick tip mapping



getRootTag
public String getRootTag()(Code)
Return the root tag name. the root tag



setAllowDragMapping
public void setAllowDragMapping(String allowDragMapping)(Code)
Set the node's "allow drag" mapping.
Parameters:
  allowDragMapping - the allow drag mapping



setAllowDropMapping
public void setAllowDropMapping(String allowDropMapping)(Code)
Set the node's "allow drop" mapping.
Parameters:
  allowDropMapping - the allow drop mapping



setAttributeMappings
public void setAttributeMappings(String[] attributeMappings)(Code)
Set the node's attribute name(s) mapping.
Parameters:
  attributeMappings - attribute name mapping



setCheckedMapping
public void setCheckedMapping(String checkedMapping)(Code)
Set the checkbox state value mapping.
Parameters:
  checkedMapping - the checked mapping



setDisabledMapping
public void setDisabledMapping(String disabledMapping)(Code)
Set the mapping for the disabled state value.
Parameters:
  disabledMapping - the disabled mapping



setExpandedMapping
public void setExpandedMapping(String expandedMapping)(Code)
Set the mapping for the node's expanded state value.
Parameters:
  expandedMapping - the expanded mapping



setFolderIdMapping
public void setFolderIdMapping(String folderIdMapping)(Code)
Set the folder ID mapping relative to the folder tag.
Parameters:
  folderIdMapping - the folder ID mapping



setFolderTag
public void setFolderTag(String folderTag)(Code)
The folder tag name in the XML data.
Parameters:
  folderTag - the folder tag name



setFolderTitleMapping
public void setFolderTitleMapping(String folderTitleMapping)(Code)
Mapping corresponding to the title of the folder relative to the folder tag.
Parameters:
  folderTitleMapping - the folder title mapping



setHrefMapping
public void setHrefMapping(String hrefMapping)(Code)
Set the node's href value mapping.
Parameters:
  hrefMapping - the href mapping



setHrefTargetMapping
public void setHrefTargetMapping(String hrefTargetMapping)(Code)
Return the node's href target value mapping.
Parameters:
  hrefTargetMapping - the href target mapping



setIconClsMapping
public void setIconClsMapping(String iconClsMapping)(Code)
Set the icon class mapping.
Parameters:
  iconClsMapping - the icon class mapping



setIconMapping
public void setIconMapping(String iconMapping)(Code)
Set the icon mapping.
Parameters:
  iconMapping - the icon mapping



setLeafIdMapping
public void setLeafIdMapping(String leafIdMapping)(Code)
Set the leaf ID mapping relative to the leaf tag.
Parameters:
  leafIdMapping - the leaf ID mapping



setLeafTag
public void setLeafTag(String leafTag)(Code)
The leaf tag name in the XML data.
Parameters:
  leafTag - the leaf tag name



setLeafTitleMapping
public void setLeafTitleMapping(String leafTitleMapping)(Code)
Mapping corresponding to the title of the leaf relative to the leaf tag.
Parameters:
  leafTitleMapping - the leaf title mapping



setQtipMapping
public void setQtipMapping(String qtipMapping)(Code)
Set the quick tip value mapping.
Parameters:
  qtipMapping - the quick tip mapping



setRootTag
public void setRootTag(String rootTag)(Code)
The root tag name in the XML data.
Parameters:
  rootTag - the root tag name



Fields inherited from com.gwtext.client.widgets.tree.TreeLoader
protected JavaScriptObject configJS(Code)(Java Doc)

Methods inherited from com.gwtext.client.widgets.tree.TreeLoader
native public void addListener(TreeLoaderListener listener)(Code)(Java Doc)
native protected JavaScriptObject create(JavaScriptObject config)(Code)(Java Doc)
public JavaScriptObject getJsObj()(Code)(Java Doc)
public static TreeLoader instance(JavaScriptObject jsObj)(Code)(Java Doc)
native public void load()(Code)(Java Doc)
native public void load(Function callback)(Code)(Java Doc)
public void setBaseAttrs(UrlParam[] params)(Code)(Java Doc)
public void setBaseParams(UrlParam[] params)(Code)(Java Doc)
public void setClearOnLoad(boolean clearOnLoad)(Code)(Java Doc)
public void setDataUrl(String dataUrl)(Code)(Java Doc)
public void setMethod(Connection.Method method)(Code)(Java Doc)
public void setMethod(String method)(Code)(Java Doc)
public void setPreloadChildren(boolean preloadChildren)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.