Results 1 to 5 of 5

Thread: Error occurs with DateFilter when date is not explicitly set

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha Premium Member
    Join Date
    Aug 2012
    Posts
    49

    Default Error occurs with DateFilter when date is not explicitly set

    The following causes an error to occur when filtering on a date field in a grid:

    1. Select either the Before, After, or On checkbox (without selecting a date or the Filters checkbox)
    2. Select the Filters checkbox

    An error occurs and the grid gets stuck in a loading state. If the grid has a load mask this is problematic because the grid is in an unusable state.

  2. #2
    Sencha User
    Join Date
    Sep 2013
    Location
    Minneapolis, MN
    Posts
    2

    Default

    Further details, this scenario creates a null pointer exception in the DateFilter's updateMenuState method.

  3. #3
    Sencha User
    Join Date
    Jul 2011
    Location
    Germany
    Posts
    223

    Default

    Recently, we discovered this issue aswell. But I think rondestvedt missed a point for reliable reproduction.

    Here is my showcase.
    Necessary preperation (missing above):
    1. go to http://www.sencha.com/examples/#ExamplePlace:filtergrid
    2. Click "last updated" column -> Filters
    3. Select "before" -> today

    Filter is set as expected. Now we get the error described above with these steps

    1. Again click "last updated" column -> Filters
    2. Select the checkbox on the left of "After"

    This leads to this stacktrace in an alert window:
    Code:
    Error: Exception caught: (TypeError) 
     stack: [email protected]://www.sencha.com/examples/explorer/36CCD28A8BA1AFB322F2F7ECF89E813C.cache.html:3762
    [email protected]://www.sencha.com/examples/explorer/36CCD28A8BA1AFB322F2F7ECF89E813C.cache.html:8260
    [email protected]://www.sencha.com/examples/explorer/36CCD28A8BA1AFB322F2F7ECF89E813C.cache.html:4692
    [email protected]://www.sencha.com/examples/explorer/36CCD28A8BA1AFB322F2F7ECF89E813C.cache.html:9003
    [email protected]://www.sencha.com/examples/explorer/36CCD28A8BA1AFB322F2F7ECF89E813C.cache.html:8997
    [email protected]://www.sencha.com/examples/explorer/36CCD28A8BA1AFB322F2F7ECF89E813C.cache.html:8943
    [email protected]://www.sencha.com/examples/explorer/36CCD28A8BA1AFB322F2F7ECF89E813C.cache.html:8284
    [email protected]://www.sencha.com/examples/explorer/36CCD28A8BA1AFB322F2F7ECF89E813C.cache.html:7766
    [email protected]://www.sencha.com/examples/explorer/36CCD28A8BA1AFB322F2F7ECF89E813C.cache.html:4721
    [email protected]://www.sencha.com/examples/explorer/36CCD28A8BA1AFB322F2F7ECF89E813C.cache.html:7494
    [email protected]://www.sencha.com/examples/explorer/36CCD28A8BA1AFB322F2F7ECF89E813C.cache.html:3601
    [email protected]://www.sencha.com/examples/explorer/36CCD28A8BA1AFB322F2F7ECF89E813C.cache.html:9003
    [email protected]://www.sencha.com/examples/explorer/36CCD28A8BA1AFB322F2F7ECF89E813C.cache.html:9003
    [email protected]://www.sencha.com/examples/explorer/36CCD28A8BA1AFB322F2F7ECF89E813C.cache.html:6581
    [email protected]://www.sencha.com/examples/explorer/36CCD28A8BA1AFB322F2F7ECF89E813C.cache.html:6128
    [email protected]://www.sencha.com/examples/explorer/36CCD28A8BA1AFB322F2F7ECF89E813C.cache.html:3959
    [email protected]://www.sencha.com/examples/explorer/36CCD28A8BA1AFB322F2F7ECF89E813C.cache.html:7696
    jg/<@http://www.sencha.com/examples/explorer/36CCD28A8BA1AFB322F2F7ECF89E813C.cache.html:6242
    
     __gwt$exception: <skipped>
     fileName: http://www.sencha.com/examples/explorer/36CCD28A8BA1AFB322F2F7ECF89E813C.cache.html
     lineNumber: 3762
     columnNumber: 17: b is null
    Further info:
    It doesn't matter if the DateFilter is active or not to cause this error. But there got to be a Date selected at "before" even if "before" is currently not active. If there hasn't been selected a date at "before", clicking "after" is fine (but pointless anyway).

    Of course user acts pretty stupid here: Activating "after" without having set a date for "after" is rather pointless. But if GXT allows user to act this way, there shouldn't be an exception.

    Version(s) of Ext GWT
    Ext GWT 3.0.3 and 3.1.0

    Browser versions and OS
    FF 24.6.0 ESR on Win7 Enterprise, 64Bit

    Run mode
    Dev Mode and Prod mode


    Workaround
    Set a date like "today" at DateFilters DatePickers:
    Code:
            dateFilter.getBeforeMenu().getDatePicker().setValue(new Date());
            dateFilter.getAfterMenu().getDatePicker().setValue(new Date());
            dateFilter.getOnMenu().getDatePicker().setValue(new Date());
            dateFilter.setActive(false, false);
    Last line is optional. It deactivates dateFilter, since setValue lead to activation of dateFilter.

  4. #4
    Sencha User
    Join Date
    Jul 2011
    Location
    Germany
    Posts
    223

    Default

    It seems like this one is fixed in GXT 3.1.3 (maybe earlier). Afaics, the proposed workaround (set a default date for all DatePickers of DateFilter) made its way into the code.

  5. #5
    Sencha User
    Join Date
    Jul 2011
    Location
    Germany
    Posts
    223

    Default

    Sencha, DO A BETTER JOB HANDLING BUG REPORTS LIKE THIS!

    Is this problem solved? In which version? What has been done?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •