Announcement

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

    Possible Bug Found While Invoking groupBy Method on ListGrid

    Hello,

    I think we found a bug while invoking the groupBy method on a ListGrid:

    Code:
    final DataSource dataSource = DataSource.get(DATA_SOURCE);
    final ListGrid listGrid = new ListGrid();
    listGrid.setWidth100();
    listGrid.setHeight100();
    listGrid.setDataSource(dataSource);
    listGrid.setAutoFetchData(Boolean.FALSE);
    listGrid.groupBy("I_ID");
    layout.addMember(listGrid);
    If you add that in a onModuleLoad, the following Javascript error appears through window.alert (and nothing else, I mean no panel at all):
    Code:
    com.google.gwt.core.client.JavaScriptException: (TypeError) @com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)([JavaScript object(46), JavaScript object(146), JavaScript object(149)]): this.fields is undefined
    Do you have an idea where does this come from? We're using the p20141130 of SmartGWT 4.1 Power.

    Cheers,
    A.

    #2
    We're not seeing this effect with sample DataSources, so we suspect the DataSource you are providing is flawed in some way.

    Comment


      #3
      Actually, our dataSource.ds.xml is quite simple (it uses the default connection):
      Code:
      <?xml version="1.0"?>
      <DataSource ID="dataSource" dataFormat="iscServer" serverType="sql" tableName="T_FEES_MIL_EXECU"> 
      	<fields>
      		<field name="T_DT" type="date" canEdit="false" />
      		<field name="I_ID" type="integer" canEdit="false" />
      		<field name="R_ID" type="integer" canEdit="false" />
      		<field name="INTERNAL_ORDER_ID" type="text" canEdit="false" />
      		<field name="ISIN" type="text" canEdit="false" />
      	</fields>
      </DataSource>
      And if we remove the groupBy method, it works well.

      The same datasource and groupby functionality works in SmartClient Version: v8.3p_2014-07-12/PowerEdition Deployment (built 2014-07-12)

      Cheers,
      A.
      Last edited by lextra; 3 Dec 2014, 04:22. Reason: Additional Information

      Comment


        #4
        This has been fixed for builds dated December 4 and later - alternatively, calling setGroupByField() instead of groupBy() should work in your case (which is before draw).
        Last edited by Isomorphic; 3 Dec 2014, 06:41.

        Comment


          #5
          Thanks! We're going to try this tomorrow and we'll make you feedback.

          Cheers,
          A.

          Comment


            #6
            It seems to work well. Thanks a lot for your reactivity!

            Cheers,
            A.

            Comment

            Working...
            X