Announcement

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

    ListGrid : ShowGroupSummary + CanDelete + hover = deleted Skin loose

    Hi

    Please forgive my poor english, it's not my first language.

    I have a problem when I delete multiple rows in a ListGrid which have showGroupSummary or setShowGridSummary at true :
    if you put your mouse on the deleted rows (not the last one), the "deleted skin" disappear (but the "undo delete" icon stay).

    I attach a screen to this topic to illustrate the problem, and a sample after this text.

    I'm using SmartGWT4.0 and GWT 2.5.1

    Sombody has an idea ?
    Thanks in advance :)!


    Code:
    public class Application implements EntryPoint {
        public static ListGridRecord createRecord() {
    
    	final ListGridRecord record = new ListGridRecord();
    	record.setAttribute("area", Random.nextInt());
    	return record;
        }
    
        private ListGridRecord[] records = new ListGridRecord[] { createRecord(), createRecord(), createRecord(), createRecord() };
    
        @Override
        public void onModuleLoad() {
    	ListGrid countryGrid = new ListGrid();
    	countryGrid.setSize("500", "500");
    	countryGrid.setCanRemoveRecords(true);
    	countryGrid.setDeferRemoval(true);
    	countryGrid.setShowGridSummary(true);
    	countryGrid.setShowGroupSummary(true);
    	countryGrid.setCanEdit(true);
    	ListGridField areaField = new ListGridField("area", "area");
    	areaField.setShowHover(false);
    	areaField.setShowGroupSummary(true);
    	areaField.setSummaryFunction(new SummaryFunction() {
    	    @Override
    	    public Object getSummaryValue(Record[] records, ListGridField field) {
    		return records.length + " items";
    	    }
    	});
    
    	countryGrid.setFields(areaField);
    	countryGrid.setData(records);
    	countryGrid.draw();
        }
    }
    Attached Files

    #2
    What skin is this?

    What browser(s) are affected?

    Have you made any skinning customizations?

    Comment


      #3
      thanks for your help !

      Thank you for your help !

      I have the same problem with firefox and chrome.

      It's not the usual skin, indeed. We use a custom skin, but i have the same problem with a new project, with only smartgwt's default skin. (and the code from the previous message)

      I attached a new screen (from the new "clean" project, with only smartgwt and smartgwt-skin):

      First row : bugged, because looks like a normal row, whereas it's a deleted row (you can see that with the "undo" icon).

      2row : not bugged deleted row (not bugged because the bug does not appear on the last deleted row)

      3 and 4nd row : normal row, not deleted.

      thanks in advance !
      Attached Files
      Last edited by saynrauliee; 20 Dec 2013, 16:22.

      Comment


        #4
        Sorry, we're not seeing this effect, and there is really no plausible way that we can see that this could happen with the uncustomized Enterprise skin.

        In particular, rows that have been marked for removal do not even have a rollover effect, so it seems certain that you are not actually testing with the code and environment you have claimed.

        Comment


          #5
          Thank you for your response !

          It's possible that I have made a mistake , indeed. In order to be sure, i recreate two new project from scratch, and install them on a small test server. (and both project have problem :( )

          1) With gwt EE edition (trial edition). I attach gwt.xml and EntryPoint to this post (no pom, it's not a maven project).
          Demo URL : (removed)

          2) With smartGwt normal edition. Pom.xml, gwt.xml and Entry point are attached to this post. Demo Url : (removed)

          I can provide you full project, if you want.

          Just to be sure that we search on same direction :
          there isn't any problem with listGrid + delete if there is no summaryFunction.

          The problem only appear when I put this code :
          Code:
          countryGrid.setShowGridSummary(true);
          countryGrid.setShowGroupSummary(true);
          areaField.setSummaryFunction(new SummaryFunction() {
          	    @Override
          	    public Object getSummaryValue(Record[] records, ListGridField field) {
          		return records.length + " items";
          	    }
          	});
          I am agree that there is no rollover effect on deleted rows in "normal case" (without summary), but with the code provided (summary is active), there is a rollover effet on the deleted rows. (In 2 demo you can see it)

          Thank you for your patience and your help !
          Attached Files
          Last edited by saynrauliee; 22 Dec 2013, 04:51.

          Comment


            #6
            We've made changes to address this - please retry with a nightly build dated December 23 or later

            Comment


              #7
              I'll test tomorrow, thanks a lot for your help !

              Comment


                #8
                I am a bit late, sorry. Works perfect now, thanks a lot !

                Comment


                  #9
                  I've experienced the same problem and therefor I upgraded to latest nightly build:
                  SmartClient Version: v9.0p_2014-01-26/PowerEdition Deployment (built 2014-01-26) on FF 26.0
                  <gwt.version>2.5.1</gwt.version>
                  <smartgwt.version>4.0-p20140126</smartgwt.version>

                  But I have the same problem! I can't see that the bug is solved. This is my description of the bug:
                  Mark several rows for deletion, then move mouse over. The line trough then disappears on all but one row (the last one clicked). When saving the grid: only the last clicked row is deleted.

                  Here is my test (the code for fetching data is not included):
                  Code:
                          testGrid = new ListGrid();
                          testGrid.setDataSource(DataSources.getVenues());
                          testGrid.setShowGridSummary(true);
                          testGrid.setCanEdit(true);
                          testGrid.setAutoFetchData(false);
                          testGrid.setCanReorderRecords(true);
                          testGrid.setCanRemoveRecords(true);
                          testGrid.setShowAllRecords(true);
                          testGrid.setAutoSaveEdits(false);
                          testGrid.setSaveLocally(false);
                          layout.add(testGrid);
                          layout.add(new IButton("save test grid", new ClickHandler() {
                              
                              @Override
                              public void onClick(ClickEvent event) {
                                  testGrid.saveAllEdits();
                                  
                              }
                          }));

                  Comment


                    #10
                    We just double-checked and we still show the issue as fixed. Moreover the original issue was related to custom SummaryFunctions - the code you've shown wouldn't even have triggered the issue.

                    Best guess: you are using a copy of the skin from an older version of SmartGWT, or you've added custom CSS styles that are creating the problem, or you're not really using the latest build due to caching or forgetting to run a GWT compile.

                    Comment


                      #11
                      Sorry, my fault. The bug is gone!

                      FireFox was caching old stuff.

                      Comment

                      Working...
                      X