Announcement

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

    Bug when printing an empty ListGrid

    Smartgwt 3.0p NIGHTLY-2012-04-07

    When printing ListGrids with no data the printout is incorrect. Can be reproduced with following simple code:

    Code:
            VLayout viewport = new VLayout();
            viewport.setWidth100();
            viewport.setHeight100();
    
            final ListGrid grid = new ListGrid();
            grid.setSize("300", "200");
            ListGridField field1 = new ListGridField("test1");
            ListGridField field2 = new ListGridField("test2");
            grid.setFields(field1, field2);
            viewport.addMember(grid);
    
            Button b = new Button("print");
            b.addClickHandler(new ClickHandler() {
                @Override
                public void onClick(ClickEvent event) {
                    Canvas.printComponents(new Object[] { grid });
                }
            });
    
            viewport.addMember(b);
            viewport.draw();
    Please see the attachment for result. An extra "undefined" is printed in in addition to not all fields printing out correctly.

    --
    Marko
    Attached Files

    #2
    It was fixed in the latest builds.

    Comment


      #3
      Ok, nice.

      Still fails on latest 3.0p nightly (2012-04-18) though so it's only in 3.1d branch ?

      Marko

      Comment


        #4
        These changes are available in nightly builds:
        * 2012-04-18 for 3.1d
        * 2012-04-19 for 3.0p

        Comment

        Working...
        X