Announcement

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

    ListGrid Filter SelectItem

    Hi!

    I have a ListGrid and one of it's fields is SelectItem.

    In it's filter, it doesn't show a empty value, so the user can cancel the filter.

    See attached image.
    Attached Files

    #2
    Hi Terciof,
    Could you let us know what build you're seeing this on (use the "eval" area in the developer console to check the value of isc.version).
    Also could you show us the code for the ListGrid, and any DataSource applied to it?

    Thanks

    Comment


      #3
      Isomorphic,

      Code:
      Evaluator: result of 'isc.version' (1ms):
      "7.1a/LGPL Development Only"
      I'm using the SVN revision 606 of SmartGWT.

      Thanks.

      Comment


        #4
        I discovered that this bug is hanging my ListGrid filters.

        It usually happened when I posted this issue: http://forums.smartclient.com/showthread.php?t=6261

        You fixed the exception, but it doesn't work anymore.

        Thanks.

        Comment


          #5
          These two issues don't seem related.

          You were asked in this thread for sample code, but you've not shown any.

          You were given a solution in the other thread but ignored it.

          Please try to read responses more closely and provide all the detail you can.

          Comment


            #6
            About the source code, sorry, my fault.

            I did what you said in the other thread, i created a DataSource with setClientOnly(true). The Map solution doesn't sounds good.

            In the constructor of this DataSource I call a RPC and in the response I use setTestData(Record[]) to fill this datasource.

            My application is 100% dynamic, every information about the GUI is send by the server on-the-fly, with custom Objects.

            In those objects I have the DataSource fields, types and all information need, including relationships, like this N:1 that I'm having issues.

            To create the ListGrid I'm using:

            Code:
            		this.grid = new ListGrid();
            		this.grid.setWidth100();
            		this.grid.setHeight100();
            		this.grid.setDrawAheadRatio(3);
            		this.grid.setAlternateRecordStyles(true);
            		this.grid.setModalEditing(true);
            		this.grid.setAutoFetchData(true);
            		this.grid.setShowFilterEditor(true);
            		this.grid.setAutoSaveEdits(false);
            		this.grid.setFilterOnKeypress(true);
            		this.grid.setConfirmDiscardEdits(true);
            		this.grid.setDataSource(this.mainDataSource);
            
            		this.grid.setFields(this.generateFields());
            generateFields() is a function that read my object and create ListGridField based on the parameters.

            To create the ComboBox(SelectItem) I'm doing this way:

            Code:
            DataSource dataSource = this.dataSourceManager.getDataSources(field);
            
            SelectItem comboBox = new SelectItem();
            comboBox.setName(field.getName());
            comboBox.setDisplayField(field.getDisplayField());
            comboBox.setValueField(comboBox.getName());
            comboBox.setOptionDataSource(dataSource);
            
            gridField = new ListGridField();
            gridField.setName(field.getName());
            gridField.setTitle(field.getLabel());
            gridField.setDisplayField(field.getDisplayField());
            gridField.setValueField(gridField.getName());
            gridField.setOptionDataSource(dataSource);
            gridField.setEditorType(comboBox);
            Regards.

            Comment


              #7
              Hi!

              I'm getting the error below in HostedMode with the lastest SmartGWT SVN revision 606.

              Code:
              [ERROR] Uncaught exception escaped
              com.google.gwt.core.client.JavaScriptException: (TypeError): Result of expression 'this.formItem' [undefined] is not an object.
               line: 851
               sourceId: 1130061496
               sourceURL: http://localhost:51569/test/sc/client/widgets/form/PickList.js
               expressionBeginOffset: 37337
               expressionCaretOffset: 37350
               expressionEndOffset: 37368
              	at com.smartgwt.client.data.DataSource.processResponse(Native Method)
              	at br.com.ib8.factory.test.client.MyDS2$1.onSuccess(MyDS2.java:87)
              	at br.com.ib8.factory.test.client.MyDS2$1.onSuccess(MyDS2.java:1)
              	at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:215)
              	at com.google.gwt.http.client.Request.fireOnResponseReceivedImpl(Request.java:264)
              	at com.google.gwt.http.client.Request.fireOnResponseReceivedAndCatch(Request.java:236)
              	at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:227)
              I tried to get the stacktrace in firebug but it's not throw!

              I created a TestCase, how to send? The attachments doesn't accept .zip.

              I could verify that the error is throw when setFilterOnKeyPress(true) is set.

              Comment


                #8
                Code:
                15:18:14.362:WARN:Log:TypeError: this.formItem is undefined
                Into the Developer Console.

                Comment


                  #9
                  Originally posted by terciof

                  I created a TestCase, how to send? The attachments doesn't accept .zip.

                  I could verify that the error is throw when setFilterOnKeyPress(true) is set.
                  Please create an issue and attach your standalone testcase.

                  Comment


                    #10
                    OK I'll create a issue.

                    I could get the stack trace:

                    Code:
                    dataArrived()
                    _dataArrived()
                    _makeFunction
                    _doneDataArriving()
                    fetchRemot...ataReply()
                    fireCallback()
                    fireCallback()
                    _completeR...ocessing()
                    processResponse()
                    $processResponse
                    onSuccess_0
                    $onResponseReceived
                    $fireOnRes...ceivedImpl
                    fireOnResp...seReceived
                    onreadystatechange()

                    Comment

                    Working...
                    X