Success! Looks like we've fixed this one. According to our records the fix was applied for EXTGWT-2824 in a recent build.
  1. #1
    Ext GWT Premium Member icfantv's Avatar
    Join Date
    Sep 2011
    Location
    Superior, CO
    Posts
    411
    Vote Rating
    21
    icfantv will become famous soon enough icfantv will become famous soon enough

      0  

    Exclamation DateField does not allow unsetting the max and min date values

    DateField does not allow unsetting the max and min date values


    Required Information

    Version(s) of Ext GWT
    Ext GWT 3.0.4 (and probably all of 3.x)

    Browser versions and OS
    (and desktop environment, if applicable)
    • Not tested w/ IE, but checked on:
    • Chrome 24, OS X 10.8
    • Chrome 24, Ubuntu 11.10, GNOME
    • Firefox 18, Ubuntu 11.10, GNOME

    Virtual Machine
    No

    Description
    Once set, DateField.setMinValue(Date) and DateField.setMaxValue(Date) do not allow the values to be reset by passing null as a parameter. Rather they throw an NPE because underneath it attempts to create either a min/max date validator with the null value or set the min/max date on the existing, internal min/max validator w/ the null value.

    Run mode
    both

    Steps to reproduce the problem
    1. Start running in development mode in Eclipse
    2. Open app in browser
    3. Construct a DateField object, say "dateField"
    4. call dateField.setMaxValue(null) and/or dateField.setMinValue(null), results in an NPE.

    Expected result
    No error, expect it to reset the underlying min/max dates

    Actual result
    An NPE is thrown

    Test case
    Code:
    public class DateFieldTest implements EntryPoint
    {
       @Override
       public void onModuleLoad()
       {
          final DateField dateField = new DateField();
          FieldLabel fl = new FieldLabel(dateField, "Start");
          CssFloatLayoutContainer cflc = new CssFloatLayoutContainer();
          cflc.add(fl);
          cflc.add(new TextButton("Set Null Min", new SelectEvent.SelectHandler()
          {
             @Override
             public void onSelect(SelectEvent event)
             {
                dateField.setMinValue(null); // throws NPE
             }
          }));
          cflc.add(new TextButton("Set Null Max", new SelectEvent.SelectHandler()
          {
             @Override
             public void onSelect(SelectEvent event)
             {
                dateField.setMaxValue(null); // throws NPE
             }
          }));
    
          ContentPanel cp = new ContentPanel();
          cp.setPixelSize(600, 200);
          cp.setWidget(cflc);
    
          RootPanel.get().add(cp);
       }
    }
    Helpful Information

    Debugging already done
    • The problem is that the underlying code constructs a min and max date validator and uses the date parameter value unchecked whereas the very next if block checks that value for null before attempting to set that value on the validator that was just constructed.

    Possible fix
    • The proper behavior is probably to unwire the validator if the parameter is null and perform any other bookkeeping (e.g., talking to the date picker).

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,731
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha - GXT Dev Team
    Join Date
    Jan 2012
    Location
    Arlington, WA
    Posts
    380
    Vote Rating
    15
    branflake2267 will become famous soon enough

      0  

    Default


    This issue has been fixed and is available in SVN. It will be available when 3.0.5 is released.

    Brandon

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi