Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Integration of GWT widget and smartGWT Canvas

    I try to integrate a GWT widget into a smartGWT GUI. This widget includes a GTW Tree, and it supports
    some events such as DragsStart, DragOver, Drop, Focus and Blur.

    NavigatorTree tree = new NavigatorTree();

    com.smartgwt.client.widgets.layout.HLayout hl=new com.smartgwt.client.widgets.layout.HLayout();
    com.smartgwt.client.widgets.Canvas can=new com.smartgwt.client.widgets.Canvas();
    can.setSize("300px", "300px");
    can.addChild(tree.tree);
    hl.addChild(can);
    /*
    com.google.gwt.user.client.ui.HorizontalPanel hl=new com.google.gwt.user.client.ui.HorizontalPanel();
    hl.add(tree.tree);
    */
    RootPanel.get("main").add(hl);

    When a include the Tree into a GWT HorizontalPanel and I include it in the RootPanel everything is OK.
    When I include it in a samrtGWT HLayout and a Canvas, they represent the Tree and I can navigate over the tree,
    and I recognise the Focus and Blur but some events such as DragStart are not recognised.

    How can I support Drag&Drop events in GWT widgets that are included in smartgwt GUIs?

    Thans,

    Miguel

    #2
    We're not sure why this is happening, but supporting two different drag and drop systems from separate GUI systems on the same page is a very hard problem. We'd strongly recommend against embedding a non-SmartGWT tree component into a SmartGWT UI for this reason, and for the other reasons given in the FAQ. Just use the TreeGrid component from SmartGWT instead. It's going to be much, much less work than trying to embed this other component.

    Comment


      #3
      I started using TreeGrid and DataSource but my trees are very large (more than 500/1000 elements), with dynamic loads, and I got performance problems.
      I could rewrite my GUI using GWT Tree widgets but I can't solve the D&D problems. You can see this at:

      http://modeleditor.erma-assets.org/ModelEditorBase.html (execute it on Chrome, some other navigators are not tested).

      Execute on the GUI File->Open UML Model/Diagram->Model.umlmo
      You will get the tree and you can see the Drag problems. Drag Start events aren't fired, when we start the drag.

      I isolated the problem in the simple example that I submitted. But I can't find solution.

      Comment


        #4
        That's considered a fairly small dataset, much smaller than some datasets shown in the Showcase, so if you had performance problems with that, something was misconfigured. Again, return to TreeGrid / DataSource, as your current approach is a dead end for reasons previously explained.

        Comment

        Working...
        X