Announcement

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

    Stack Overflow with FormItem.setDefaultValue(Object)

    Hi Isomorphic,

    I have a case where I am calling com.smartgwt.client.widgets.form.fields.FormItem.setDefaultValue(Object) where the Object is an instanceof String, and I am getting a stack overflow exception.

    It would appear that the method recursively calls itself under this scenario, as it simply passes the value into setDefaultValue "as-is".

    Code:
        public void setDefaultValue(Object value) {
              if (value == null) {
                  setAttribute("defaultValue", (String) null);
              } else if (value instanceof String) {
                  // To avoid GWT Issue 4301, check for a `String' instance and handle that specially.
                  // http://forums.smartclient.com/showthread.php?t=8159#aStringObject
                  setDefaultValue(value);
              }
      ...
      
          }
    SmartClient Version: v10.1p_2016-05-11/Pro Deployment (built 2016-05-11)

    Regards

    #2
    Thanks for pointing this out. We've fixed it in SGWT 9.0p and newer, and the change will be in the nightly builds dated 2016-05-27 and beyond.

    Comment

    Working...
    X