Announcement

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

    Layout component support for row and column spanning

    Good day all,

    I have been looking at GWT 2.1.1 and Smart GWT 2.4, assessing whether Smart GWT would be a good candidate for a rewrite of our renderer.

    One thing i cannot find support for in SmartGwt is a layout component that mirrors the grid / row spanning functionality of HTML tables for layout purposes.

    My research
    ------------
    I have read about the pure GWT FlexTable and its cell formatter support for row and column spanning. The problem here is that intermixing of GWT / SmartGwt widgets in containment hierarchies is discouraged strenuously, to the point where no support will be offered should this cause issues. Unfortunately our platform allows a GUI configurer to construct a screen by nesting layout components to any degree they wish, so this approach is not possible if guidelines are to be adhered to.

    I looked at DynamicForm and assessed the possibility of using this with managed CanvasItems that display arbitrary Canvas's purely so i could take advantage of the FormItem row and column spanning. I abandoned this approach as it was simply too much of a hack.
    -------

    I am trying to avoid having to write my own row/col spanning grid layout component using nested VLayout/VStack/HLayout/HStack components. Is there any other way of achieving this?

    This seems such an obvious piece of layout functionality to miss so i have a feeling i am being dumb! Any help would be greatly appreciated.

    Thanks

    manny31

    #2
    If it helps, i have also been checking out Vaadin. We have decided to go for client side rendering so Vaadin is not an option, however it does have a GridLayout component that supports row and column spanning natively.

    The link to the JavaDoc is here:

    http://vaadin.com/api/com/vaadin/ui/GridLayout.html#addComponent%28com.vaadin.ui.Component,%20int,%20int,%20int,%20int%29

    There is also a demo example here:

    http://demo.vaadin.com/sampler#GridLayoutBasic

    I am looking for a SmartGwt equivalent of the Vaadin GridLayout component or the best way to replicate this layout behaviour in SmartGwt.

    Any help is greatly appreciated,

    Thanks

    manny31

    Comment


      #3
      Take a look at:

      1. the combination of HLayout and VLayout with nesting

      OR

      2. CanvasItems within a DynamicForm: colSpans, rowSpans, column widths and item heights can be specified, etc. If whatever you are trying to lay out is mostly form controls this is the most convenient. Even if you're not trying to lay out mostly form controls this is no reason to regard this as a hack.

      OR

      3. ListGrid with recordComponents for very large, incrementally rendered grid-like layouts of components.

      If one of these three is not convenient, please point specifically the layout characteristics you are trying to achieve. Most people who post something similar to what you did simply have a misconception about the capabilities of one or more of the layout mechanisms above.

      Comment


        #4
        Thanks for the reply. I will continue investigating the possibilities with regard to DynamicForm and CanvasItems, at least i know i was on the right track now....and thanks for the GridList suggestion, i will give this a whirl too.

        Comment

        Working...
        X