Success! Looks like we've fixed this one. According to our records the fix was applied for EXTGWT-2997 in 2.3.1.
  1. #1
    Sencha User
    Join Date
    Jan 2010
    Posts
    3
    Vote Rating
    0
    keygen is on a distinguished road

      0  

    Default ExtGWT 2.3.0 regression: LabelField.setValue(null) throws NPE

    ExtGWT 2.3.0 regression: LabelField.setValue(null) throws NPE


    See code of LabelField
    Code:
    @Override
      public void setValue(Object value) {
        this.value = value.toString();
        if (rendered) {
          if (useHtml) {
            el().update(Util.isEmptyString(this.value) ? " " : this.value);
          } else {
            getElement().setInnerText(this.value);
          }
        }
      }

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,732
    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, that is clearly an oversight. My first attempt at a workaround would be to either extend the class or use a Converter to deal with null values and treat them as an empty string.

  3. #3
    Ext GWT Premium Member mariusz.pala's Avatar
    Join Date
    Jun 2008
    Location
    Poland
    Posts
    299
    Vote Rating
    2
    mariusz.pala is on a distinguished road

      0  

    Default


    Can you prepare a patch for that? We use FieldBinding plus LabelField is used in hundreds of different classes and there is no way we can create an easy workaround for this...
    Plus another regression I found is Shortcut.setHtml doesn't accept Html, when I use bold tag it's displayed as a text and the text is not in bold.

  4. #4
    Ext GWT Premium Member
    Join Date
    Jul 2009
    Posts
    80
    Vote Rating
    0
    terciofilho is on a distinguished road

      0  

    Default


    Another problem is that before this change, LabelField stored Object values, now it always store String.

    I used to have a LabelField with an Integer value(setValue(123) for example). Now I always get a String as return.

    This is a behavior change, not just the Html and Text semantics.

    When you create the useHtml things you replaced the private property "text" and used the field's "value" property, changing the behavior.

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

      0  

    Default


    A fix has been merged and is available in the SVN repository. This will be available soon in the 2.3.1 release.