Announcement

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

    FormItem returning null from getRequired

    Isomorphic SmartClient/SmartGWT Framework (v9.1p_2014-03-23/PowerEdition Deployment 2014-03-23)

    I'm in the process of moving from SmartGWT 4.0 to 4.1. I came across an issue where, unless setRequired is explicitly called on a form item (e.g. TextItem, DateItem, etc), a call to getRequired returns null.

    So, for example, the code below that was working with SmartGWT 4.0 is no longer working with 4.1:

    Code:
           for ( final FormItem formItem : fields ) {
    		if ( formItem.getRequired() ) {
    			this.setRequiredItemSuffix( formItem );
    		}
    	}
    The if-statement "formItem.getRequired()" ends up throwing a NullPointerException.
    Searching the forums, I came across an old issue that was reported and resolved in 2009 that looks very much like this issue (http://forums.smartclient.com/showthread.php?t=5539).
    Last edited by sderouchie; 24 Mar 2014, 09:22. Reason: format code

    #2
    Sorry for delay - this has now been fixed in 4.1 and 5.0 - please retest with a nightly build dated March 28 or later.

    Comment


      #3
      I've confirmed the fix with the nightly build.
      Thanks!

      Comment

      Working...
      X