Ok, i'll try, give me acouple of minutes.
Regards, _____________________ Ing. Gabriel Gutiérrez Monterrey, México On Fri, Apr 10, 2009 at 12:24 PM, Mohamad Nasreddinne < [email protected]> wrote: > > My code is the same as the code in the demo > the problem is that i have one folder in each tree but the content of the > xml is not displayed . > > so if you can test it and tell me if it works . > thank you > > > 1. /* > 2. * GWT-Ext Widget Library > 3. > * Copyright 2007 - 2008, GWT-Ext LLC., and individual contributors as > indicated > > 4. > * by the @authors tag. See the copyright.txt in the distribution for a > > 5. * full listing of individual contributors. > 6. * > 7. * This is free software; you can redistribute it and/or modify it > 8. * under the terms of the GNU Lesser General Public License as > 9. * published by the Free Software Foundation; either version 3 of > 10. * the License, or (at your option) any later version. > 11. * > 12. * This software is distributed in the hope that it will be useful, > > 13. * but WITHOUT ANY WARRANTY; without even the implied warranty of > 14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > > 15. * Lesser General Public License for more details. > 16. * > 17. * You should have received a copy of the GNU Lesser General Public > > 18. * License along with this software; if not, write to the Free > 19. > * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA > 20. * 02110-1301 USA, or see the FSF site: http://www.fsf.org. > 21. */ > 22. > 23. > 24. import com.google.gwt.core.client.EntryPoint; > 25. import com.google.gwt.user.client.ui.RootPanel; > 26. import com.gwtext.client.core.Connection; > 27. import com.gwtext.client.data.Node; > 28. import com.gwtext.client.dd.DragData; > 29. import com.gwtext.client.dd.DragDrop; > 30. import com.gwtext.client.widgets.Component; > 31. import com.gwtext.client.widgets.Panel; > 32. import com.gwtext.client.widgets.form.FieldSet; > 33. import com.gwtext.client.widgets.form.FormPanel; > 34. import com.gwtext.client.widgets.form.Radio; > 35. import com.gwtext.client.widgets.layout.HorizontalLayout; > 36. import com.gwtext.client.widgets.layout.VerticalLayout; > 37. import com.gwtext.client.widgets.tree.*; > 38. import > com.gwtext.client.widgets.tree.event.TreePanelListenerAdapter; > 39. > 40. public class TwoTreesSample implements EntryPoint { > 41. > 42. public void onModuleLoad() { > 43. Panel panel = new Panel(); > 44. panel.setBorder(false); > 45. panel.setPaddings(15); > 46. > 47. //create form for nody drop style > 48. FormPanel formPanel = new FormPanel(); > 49. formPanel.setBorder(false); > 50. formPanel.setHideLabels(true); > 51. > 52. FieldSet fieldSet = new FieldSet("Drop style"); > 53. fieldSet.setWidth(420); > 54. formPanel.add(fieldSet); > 55. > 56. final Radio moveRadio = new Radio(); > 57. moveRadio.setName("dropstyle"); > 58. moveRadio.setBoxLabel("Move"); > 59. moveRadio.setChecked(true); > 60. fieldSet.add(moveRadio); > 61. > 62. final Radio copyRadio = new Radio(); > 63. copyRadio.setName("dropstyle"); > 64. copyRadio.setBoxLabel("Copy"); > 65. fieldSet.add(copyRadio); > 66. > 67. //create source countries tree > 68. final TreePanel treePanel = new TreePanel(); > 69. treePanel.setTitle("Countries"); > 70. treePanel.setAnimate(true); > 71. treePanel.setEnableDD(true); > 72. treePanel.setContainerScroll(true); > 73. treePanel.setRootVisible(true); > 74. treePanel.setWidth(200); > 75. treePanel.setHeight(400); > 76. treePanel.setSelectionModel(new MultiSelectionModel()); > 77. > 78. final XMLTreeLoader loader = new XMLTreeLoader(); > 79. loader.setDataUrl("data/countries-grouped.xml"); > 80. loader.setMethod(Connection.GET); > 81. loader.setRootTag("countries"); > 82. loader.setFolderTitleMapping("@title"); > 83. loader.setFolderTag("continent"); > 84. loader.setLeafTitleMapping("@title"); > 85. loader.setLeafTag("country"); > 86. loader.setQtipMapping("@qtip"); > 87. loader.setIconMapping("@icon"); > 88. > 89. AsyncTreeNode root = new AsyncTreeNode("Countries" > , loader); > 90. treePanel.setRootNode(root); > 91. root.expand(); > 92. treePanel.expandAll(); > 93. > 94. //create target vacation tree > 95. final TreePanel tripTreePanel = new TreePanel(); > 96. tripTreePanel.setTitle("Trip Planner"); > 97. tripTreePanel.setAnimate(true); > 98. tripTreePanel.setEnableDD(true); > 99. tripTreePanel.setContainerScroll(true); > 100. tripTreePanel.setRootVisible(true); > 101. tripTreePanel.setWidth(200); > 102. tripTreePanel.setHeight(400); > 103. > 104. final XMLTreeLoader tripLoader = new XMLTreeLoader(); > 105. tripLoader.setDataUrl("data/trip.xml"); > 106. tripLoader.setMethod(Connection.GET); > 107. tripLoader.setRootTag("vacations"); > 108. tripLoader.setFolderIdMapping("@title"); > 109. tripLoader.setFolderTag("trip"); > 110. tripLoader.setQtipMapping("@qtip"); > 111. tripLoader.setIconMapping("@icon"); > 112. tripLoader.setAttributeMappings(new String[]{"@trip"}); > 113. > 114. final AsyncTreeNode tripRoot = new AsyncTreeNode( > "Places to Visit", tripLoader); > 115. > 116. tripTreePanel.setRootNode(tripRoot); > 117. > 118. //add trip tree listener that handles move / copy logic > 119. tripTreePanel.addListener(new > TreePanelListenerAdapter() { > 120. public void onRender(Component component) { > 121. tripRoot.expand(); > 122. tripTreePanel.expandAll(); > 123. } > 124. > 125. public boolean > doBeforeNodeDrop(TreePanel treePanel, TreeNode target, DragData dragData, > 126. > String point, DragDrop source, > TreeNode dropNode, > 127. > DropNodeCallback > dropDropNodeCallback) { > 128. if ("true".equals(target.getAttribute("trip" > ))) { > 129. if (copyRadio.getValue()) { > 130. > TreeNode copyNode = dropNode.cloneNode(); > 131. > Node[] children = copyNode.getChildNodes(); > 132. for (int i = 0 > ; i < children.length; i++) { > 133. Node child = children[i]; > 134. copyNode.removeChild(child); > 135. } > 136. > dropDropNodeCallback.setDropNode(copyNode); > 137. } > 138. } > 139. return true; > 140. } > 141. }); > 142. > 143. Panel horizontalPanel = new Panel(); > 144. horizontalPanel.setLayout(new HorizontalLayout(20)); > 145. horizontalPanel.add(treePanel); > 146. horizontalPanel.add(tripTreePanel); > 147. > 148. Panel verticalPanel = new Panel(); > 149. verticalPanel.setLayout(new VerticalLayout(15)); > 150. > 151. verticalPanel.add(formPanel); > 152. verticalPanel.add(horizontalPanel); > 153. > 154. panel.add(verticalPanel); > 155. > 156. RootPanel.get().add(panel); > 157. } > 158. } > > > > ------------------------------ > Date: Fri, 10 Apr 2009 19:18:53 +0200 > Subject: Re: mixing SmartGMt code and GWT Ext code > From: [email protected] > To: [email protected] > > at least you'll meet the problems reported as issues :D... > and others unknown ;) .... > > bye patrizio > > 2009/4/10 Neo <[email protected]> > > > Oh !! > I did not know that. > So are you saying that it will be a risk using Smart GWT in my > application ? > And if that is so then what kind of problems can I run into ? > > On Apr 9, 7:07 pm, James <[email protected]> wrote: > > but its still beta, not recommended for production code, see the issues: > http://code.google.com/p/smartgwt/issues/list > > > > 2009/4/7 Gabriel Ernesto Gutierrez Añez <[email protected]> > > > > > > > > > sweet! > > > _____________________ > > > Ing. Gabriel Gutiérrez > > > Celular: +52 1 81 1071 7213 > > > Oficina: +52 81 8153 2415 > > > Monterrey, México > > > > > On Tue, Apr 7, 2009 at 1:29 AM, Neo <[email protected]> wrote: > > > > >>http://code.google.com/p/smartgwt/ > > > > >> On Apr 3, 7:07 pm, Gabriel Ernesto Gutierrez Añez > > >> <[email protected]> wrote: > > >> > What is the SmartGWT, btw? > > > > >> > Regards, > > >> > _____________________ > > >> > Ing. Gabriel Gutiérrez > > >> > Celular: +52 1 81 1071 7213 > > >> > Oficina: +52 81 8153 2415 > > >> > Monterrey, México > > > > >> > On Fri, Apr 3, 2009 at 7:29 AM, Gabriel Ernesto Gutierrez Añez < > > >> gutierrez.ge > > > > >> > @gmail.com> wrote: > > >> > > could you add the exception and part of the code? > > > > >> > > and oding an example to see if it works. > > > > >> > > regards, > > >> > > _____________________ > > >> > > Ing. Gabriel Gutiérrez > > >> > > Celular: +52 1 81 1071 7213 > > >> > > Oficina: +52 81 8153 2415 > > >> > > Monterrey, México > > > > >> > > On Fri, Apr 3, 2009 at 6:11 AM, Neo <[email protected]> > wrote: > > > > >> > >> Hi, > > >> > >> I have created a GWT-Ext application. I want to use a ColumnTree > so > > >> > >> tried using extjs to create the control. But got some exception > which > > >> > >> I could not resolve. Even help from forums was not sufficient :(. > > >> > >> However after searching a bit found an easy way of creating the > > >> > >> control through SmartGWT. > > > > >> > >> My question is that if I create ColumnTree control using > SmartGWT, > > >> can > > >> > >> I add the control to my GWT Ext panel ? > > > > >> > >> Basically I would be mixing SmartGMt code and GWT Ext code. Is > this a > > >> > >> correct way of doing things ?- Hide quoted text - > > > > >> > - Show quoted text -- Hide quoted text - > > > > - Show quoted text - > > > > > > ------------------------------ > check out the rest of the Windows Live™. More than mail–Windows Live™ goes > way beyond your inbox. More than > messages<http://www.microsoft.com/windows/windowslive/> > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "GWT-Ext Developer Forum" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/gwt-ext?hl=en -~----------~----~----~----~------~----~------~--~---
