Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

FormItem returning null from getRequired

$
0
0
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).

Viewing all articles
Browse latest Browse all 4756

Trending Articles