Announcement

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

    Problem with editable ListGrids in 4.1?

    Hi,

    Version 4.1 Build 2014-04-05.

    I have editable ListGrids that we add data to using grid.editNewRecord(Record initialValues).

    After upgrading to 4.1 the newly added record disappears immediately after the user has tabbed through all editable fields for the newly added record.

    If I add another record, the previously added record is visible again.

    Here is a small test case that has this problem:

    Code:
    		final ListGrid grid = new ListGrid();
            ListGridField field1 = new ListGridField("name");
            ListGridField field2 = new ListGridField("phone");
    		grid.setFields(field1, field2);
    		grid.setWidth100();
    		grid.setHeight100();
            grid.setCanEdit(true);
            grid.setCanRemoveRecords(true);
            grid.setAutoSaveEdits(false);
    	IButton n = new IButton("Create", new ClickHandler() {
                
                @Override
                public void onClick(ClickEvent event) {
                    Record r = new Record();
                    r.setAttribute("name", "John Doe");
                    grid.startEditingNew(r);
                }
            });
    When I click on Create, I get a new editable record with a correct initial name. When tabbing through the name and phone fields, the entire row disappears.

    When I click on Create a second time, the first row becomes visible, while the second row disappears.

    I get a number of errors in the SMARTGWT console also:
    Code:
    14:36:00.170:FCS7:WARN:GridBody:isc_ListGrid_0_body:setRowStyle: bad rowNum: -1
    14:36:09.866:TMR4:WARN:GridBody:isc_ListGrid_0_body:row heights not yet available; returning all zeroes
    14:36:09.868:TMR4:WARN:GridBody:isc_ListGrid_0_body:setRowStyle: bad rowNum: -1
    14:36:09.882:TMR6:WARN:GridBody:isc_ListGrid_0_body:row heights not yet available; returning all zeroes
    14:36:09.899:TMR8:WARN:GridBody:isc_ListGrid_0_body:row heights not yet available; returning all zeroes
    14:36:09.916:TMR0:WARN:GridBody:isc_ListGrid_0_body:row heights not yet available; returning all zeroes
    Regards
    Rolf

    #2
    Hi Rolf
    We can't reproduce this issue by dropping your test case code into an EntryPoint class and running it against the latest 4.1 nightly.
    If you'd like us to take another look, we'd recommend you put together the code into a full entry point class that we can run without modification (There may be some other app code causing this issue which we don't have), and also let us know whether this is specific to any particular environment (Browser / OS) and whether you're seeing it in compile mode vs development mode, etc.

    Regards
    Isomorphic Software

    Comment


      #3
      Hi,

      thanks for the prompt reply. Below is more details about the issue.

      Attached is a entry point class, TestGrid.java that has this issue.
      The other files in the project is also attached. I use maven to build the project.

      This issue seems to be for development mode only. When I deploy this in a separate web application server, Glassfish, it works fine.

      I use java 1.7 SE, GWT 2.5.1, smartgwt 4.1-p20140405. The issue is there both on firefox 23.0.1 and chrome 33.0.1750.152.
      I´m using Eclipse STS 3.4 on a Mac osx 10.9.2

      Regards
      Rolf
      Attached Files

      Comment


        #4
        Ok we see the problem and will be fixing it in the near future.

        Since this isn't occurring outside of development/hosted mode, this should not impact any deployed apps (no customer visible impact). However it is a pain for development. You can workaround it for now by explicitly overriding the "getRowHeight()" method in your grid to simply return the result of "getCellHeight()" for the grid.

        Regards
        Isomorphic Software

        Comment


          #5
          Great :-)

          Thanks for the workaround.

          You will inform us when the issue is fixed so that I can remove the workaround?

          Thanks a lot.
          Regards
          Rolf

          Comment


            #6
            Hi Isomorphic,

            out of curiosity: What are reasons that an app behaves differently in development than deployed?
            Could you explain or give links?

            Thanks,
            Blama

            Originally posted by Isomorphic View Post
            Since this isn't occurring outside of development/hosted mode, this should not impact any deployed apps (no customer visible impact). However it is a pain for development.

            Comment


              #7
              Just a note about the temporary fix mentioned here. Be sure to call getCellHeight() in all cases, I found a weird issue when attempting to override getRowHeight() just for hosted mode in my code - it broke scripted mode! Details here.

              Comment


                #8
                Originally posted by Isomorphic View Post
                Ok we see the problem and will be fixing it in the near future.

                Since this isn't occurring outside of development/hosted mode, this should not impact any deployed apps (no customer visible impact). However it is a pain for development. You can workaround it for now by explicitly overriding the "getRowHeight()" method in your grid to simply return the result of "getCellHeight()" for the grid.

                Regards
                Isomorphic Software
                Any Update on when a permanent fix will be available?

                Comment


                  #9
                  We made changes for this a while ago - please retest with the latest from smartclient.com/builds.

                  If you still see the issue, let us know your exact version.

                  Comment

                  Working...
                  X