Announcement

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

    integration with gwt

    <narrative>
    the data management aspects of smartgwt seemed nice enough to take a look. we hacked together some datasources with listgrids and a custom rest-based servlet. it worked well enough to proceed cautiously.

    then i added a button, and the label was displayed in a completely different panel. then i added an accordian, but although following the relatively simple examples in the showcase, just can't get it to paint correctly (it only shows one section, but when clicked repeatedly will show the actual items... but in an unusable way). ok, i thought, it's probably because i'm adding the accordian widget to a gwt panel control... not a smartgwt-native layout thingy. so i proceed to rip out all my panels and replace them with layouts, but to no avail. ultimately, i dug far enough down to realize that smartgwt doesn't even use the rootPanel concept, but rather a .draw method to plug in the juice and make things paint.
    </narrative>

    so my question is, how do you recommend that i truly integrate smartgwt with vanilla gwt? must i rip it all apart and use layouts from the start with the .draw mechanism? can i only have gwt widgets on a smartgwt foundation, but not vice-versa? what are the subtleties behind addChild versus addMember? I find one place where it explains managed versus unmanaged, but what is that specifically? am i rolling the dice to try to use one-off smartgwt controls in my gwt app? why don't these toolkits play better together? what am i missing? what should i read to get educated?

    thanks in advance for any guidance.

    #2
    Hi Tomg,

    With SmartGWT we're shooting for good interoperability, and if you've found specific cases that you expected to work, creating a standalone test case would be greatly appreciated.

    However, bear in mind that there are limits to the maximum degree that two Ajax widget kits (including GWT) can interoperate - there are no standards that allow interoperability in the areas of management of tab order, layered modality, or pixel-perfect layout. You could read literature from the OpenAjax Alliance (Isomorphic is a member) to better understand the state of Ajax interop, but in a nutshell, you'll simply find that none of the areas mentioned above are covered.

    Therefore when building new screens it's best to stick to just one widget kit at a time. The interop functionality is mostly intended to allow incremental migration of old apps; freely intermixing components in new screens never makes sense with any two Ajax widget kits.

    Comment


      #3
      understood. moving forward i intend to use SmartGWT for data-bound components only, so as i see more issues, i will do just as you ask and try to present the specific problems in code.

      thanks for your clear response.

      Comment


        #4
        still unclear about original post

        Iso's answer might be clear about interop but tomg's original post had additional questions about how smart gwt operates under the covers that were not addressed. It would be very helpful to developers if there was *any* documentation about how smart gwt does layout, differences between addChild and addMember, inner workings of draw, markForRedraw, etc.

        I find that sifting through java doc and just plain trial and error programming becomes a liability, specially when Iso's answer seems to indicate that smart gwt and gwt are mutually exclusive.

        Comment


          #5
          Your questions are answered in various appropriate places in the docs. If you're looking for a special presentation on just these questions tailored to you, purchase training.

          Comment


            #6
            SmartGWT doesn't have a RootPanel concept, but it works perfectly fine using the regular GWT RootPanel. All of my applications use
            Code:
            		RootPanel.get("divName").add(layout);
            And it works just fine with the layout being a SmartGWT layout. I've even gotten it to work where SmartGWT components contain regular GWT or GWTExt components, but not the other way around.

            Comment


              #7
              Hi Tomg,
              I would like to know if you find a way to containts smartgwt widgets inside gwt panels. I would like to include a Smartgwt calendar into gwt panel. Thanks

              Comment


                #8
                Not that perfect, there is a bug which does not allow a ButtonItem to be rendered when using rootpanel

                http://code.google.com/p/smartgwt/issues/detail?id=77
                http://forums.smartclient.com/showthread.php?p=29691

                Originally posted by mhulsman
                SmartGWT doesn't have a RootPanel concept, but it works perfectly fine using the regular GWT RootPanel. All of my applications use
                Code:
                		RootPanel.get("divName").add(layout);
                And it works just fine with the layout being a SmartGWT layout. I've even gotten it to work where SmartGWT components contain regular GWT or GWTExt components, but not the other way around.

                Comment


                  #9
                  Thats weird because I've only used RootPanel for my pages and all of my ButtonItems are showing up just fine.

                  Comment


                    #10
                    Are you sure? IsnŽt it a IButton instead of a ButtonItem?

                    I quickly made a test here and the buttonItem still does not appear neither in hosted mode nor in web mode. Please try the sample below and youŽll see just the textarea

                    Code:
                    		DynamicForm f = new DynamicForm();
                    		f.setAutoHeight();
                    		f.setAutoWidth();
                    		
                    		TextAreaItem tai = new TextAreaItem("tai", "tai");
                    		ButtonItem bi = new ButtonItem("bi", "bi");
                    		f.setFields(tai,bi);
                    		
                    		RootPanel.get("mydiv").add(f);
                    [],
                    Matheus


                    Originally posted by mhulsman
                    Thats weird because I've only used RootPanel for my pages and all of my ButtonItems are showing up just fine.

                    Comment


                      #11
                      Ah, I don't have any forms added directly to divs. All of mine are in layouts and windows or tabs so I guess thats the difference.

                      Comment


                        #12
                        Originally posted by Isomorphic
                        Your questions are answered in various appropriate places in the docs. If you're looking for a special presentation on just these questions tailored to you, purchase training.
                        Coming from another GWT environment I can say that SmartGWT seriously lacks proper documentation. Prospective buyers (of pro version or something) need to see the properly designed software and well-structured documentation first.
                        You gotta do something really soon or will be pushed aside.

                        Comment

                        Working...
                        X