Announcement

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

    Mixing SmartGWT (Pro) and SmartGWT.Mobile

    The SmartGWT.Mobile UI is nice for phones etc. but when it comes to tablets (iPad etc.), it does not offer enough (no usefull tables etc. for the better resolution). Therefore I thought - it'll be great to have the ability to mix SmartGWT and SmartGWT.Mobile widgets (e.g. TreeGrid's or ListGrids for data displayand the mobile widgets for navigation, value entering etc.

    To do so I tried some ways: added SmartGWT.Mobile classes via <inherits> to a SmartGWT project and vice versa, tried to use iFrame inside SmartGWT.Mobile for the SmartGWT Pro Grid, tried to use elements from SmartGWT.Mobile for the SmartGWT Pro UI.

    No mather what I tried, the most that I got working is that in DevMode it somehow is possible to have both elements on the screen (while the Mobile elements were Z-ordered behind the Pro ones, so I had to modify the Z-Order of the Pro widgets).

    But - even though I got some success doing so, this will not compile.

    If in the *.gwt.xml file there are both frameworks mentioned, then the Compile will crash with a Java-Heap-Overflow:

    *.gwt.xml:
    Code:
    ...
    <module rename-to="GAToTabletDemo">
    	<inherits name="com.smartgwtpro.SmartGwtPro" />
    	<inherits name="com.smartgwt.mobile.SmartGwtMobile"/>
    Lets the compiler crash with a Java Heap Overflow sooner or later.

    So I thought I am smart and I tried to bring an iframe into the SmartGWT.Mobile UI and have both parts completely separated and only communicating via the URL the iFrame-inner Part is called. But that also does not work, as the SmartGWT Pro generated Javascript uses some access to top.isc to work. And inside the iframe, calling top.isc will be the SmartGWT.Mobile isc object from the outer frame.

    So here is my question - is it possible somehow to create a Mobile UI with some SmartGWT Pro parts (including DataSource access, Translation etc.) or vice versa? After some comments in the documentation it sounded possible and even the plan to go.

    Any tipps will be great.

    #2
    At a technical level, you can mix these components to the same extent that you can mix other GWT components with SmartGWT - as the FAQ covers, only certain combinations make sense.

    We have no idea how you could get a stack overflow. That doesn't happen for us and we're not involved in the compiler in such a way that we could realistically cause it.

    Overall, we would recommend instead just using entirely SmartGWT widgets on your iPad interface - the Mobile skin makes the widgets look a lot more like native iOS widgets, and further skinning can get closer if you like.

    Comment


      #3
      Is there any example available that shows a mixing of SmartGWT+SmartGWT.Mobile components?

      If I jump to SmartGWT (Pro) entirely - (what I am currently doing actually) - is there a plan to also support the input elements (SelectItem, DateItem etc.) of the iPhone/iPad there? That'll be exaclty what we need to have a nicely to navigate UI for the tablet.

      Comment


        #4
        No, there's no sample because we don't generally create samples of strategies we don't recommend...

        About your heap overflow - the GWT compiler can sometimes soak up a lot of memory during compilation, without this being an indication of a problem in your app. You can increase the heap size by passing -Xmx1G to the JVM. In Eclipse this is under "Advanced" in the GWT Compile dialog (VM arguments text area).

        Comment


          #5
          Hello isomorphic,

          with SmartGWT.Mobile it seems not to be possible to show lists with (lets say) 4-5 colums with data (http://smartgwt-mobile.smartclient.com/#Widgets/TableViews).

          If you do not recommend to use the SmartGWT/SmartGWT.Mobile combination, what is your approach to show business data with SmartGWT.Mobile?


          Thank you for supporting us.

          Comment


            #6
            Take a look at the FAQ and also the user_guide for SmartGWT-mobile - there's an in-depth discussion of which technology to use in what circumstance. 4-5 columns basically don't fit width-wise on a phone; in the tablet form factor, with such requirements and the further requirements strongly implied by wanting such a view, use SmartGWT and not SmartGWT.mobile.

            Comment

            Working...
            X