Hybrid View

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext User
    Join Date
    Jul 2010
    Posts
    6
    Vote Rating
    0
    HAMON Michel is on a distinguished road

      0  

    Default [FNR] Filters. Bug and inheritance problem.

    [FNR] Filters. Bug and inheritance problem.


    Hi.
    I have found a bug in Date Filter (On same date comparison doesn't work as expected)

    In file:
    DateFilter.java:
    Replace: if (afterItem.isChecked() && onMenu.getDate() != null) {
    by: if (onItem.isChecked() && onMenu.getDate() != null) {

    Moreover:
    Is it possible to modify method validateModel:
    public class DateFilter extends Filter {
    ....

    @Override
    public boolean validateModel(ModelData model) {
    Date d = model.get(dataIndex);
    ..
    }

    ...
    }

    by something like:
    public class DateFilter extends Filter {
    ....

    public Object getValue(ModelData model) {
    return model.get(dataIndex);
    }

    @Override
    public boolean validateModel(ModelData model) {
    Date d = getValue();
    ..
    }

    ...
    }

    My model doesn't contain Date but a Type witch can return a Date.
    With this solution i can write a class witch extend DateFilter like:

    public class MyOwnTypeFilter extends DateFilter {
    public Object getValue(ModelData model) {
    MyOwnType obj = (MyOwnType)model.get(dataIndex);
    return (Date) obj.getMyDate();
    }
    }

    Please modify all object witch inherit from Filter like this one.
    Without this, we must duplicate lot of your code.

    Thanx

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,966
    Vote Rating
    130
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Fixedi n SVN as of revision 2155.

    Your suggestion is not a real bug, but we will take a look at it to add a helper method. But it wont be a public one as you suggested.

  3. #3
    Ext User
    Join Date
    Jul 2010
    Posts
    6
    Vote Rating
    0
    HAMON Michel is on a distinguished road

      0  

    Default


    Thank you for your quick answer/fix.

    Can you let me know when the "helper method" will be implemented?

  4. #4
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,966
    Vote Rating
    130
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    I added the helper method in SVN at revision 2195

  5. #5
    Sencha Premium Member
    Join Date
    Aug 2011
    Posts
    15
    Vote Rating
    0
    dariusjb is on a distinguished road

      0  

    Default


    Hi Sven,

    Does GXT 2.2.5 include those fix you are talking about?

    I think I found a bug on the use of Filter, unless I m missing something.

    If you add a DateFilter, then selecting a date for the "before" will check the menu before and apply the filter
    If you come back on the filter, then only check the menu, it is throwing Nullpointer exception.

    Looking at the code, I would understand that I missed the initialisation to set the initial value for the different calender view associated with each menu.
    But using setValue on the DateFilter, requires a list of FilterConfig, doing this, will check (enable) every menu used by the DateFilter, therefore activating the filtering.

  6. #6
    Sencha Premium Member
    Join Date
    Aug 2011
    Posts
    15
    Vote Rating
    0
    dariusjb is on a distinguished road

      0  

    Default


    updateMenuState is called when onCheckChange is threshold

    Inside:

    beforeItem.setChecked(beforeMenu.getDate() != null && beforeMenu.getDate().after(afterMenu.getDate()), true);

    if you never went on the date picker "afterMenu", the getDate return null

    Same for beforeMenu

    beforeItem.setChecked(beforeMenu.getDate() != null && beforeMenu.getDate().after(afterMenu.getDate()), true);

    A nullpointer happend when check one item (before or after), and then check the another one.

Similar Threads

  1. [FNR] TimeField bug?
    By is84092 in forum Ext GWT: Bugs (2.x)
    Replies: 1
    Last Post: 12 Apr 2010, 5:02 AM
  2. Replies: 1
    Last Post: 25 Nov 2008, 9:37 PM
  3. [SOLVED] DataView, ListStore and filters... Question and Bug
    By mrdecav in forum Ext GWT: Help & Discussion (1.x)
    Replies: 2
    Last Post: 15 Sep 2008, 3:23 PM
  4. Inheritance Problem
    By deltafoxtrot in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 15 May 2008, 7:49 AM
  5. Destroy a form in ext 1.1 / Inheritance problem
    By Ronaldo in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 15 Aug 2007, 9:42 AM

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar