Announcement

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

    FormItem.getRequired & null pointer exception

    Using the snapshot from 22 April, I have had an issue today where cycling through the FormItems on a DynamicForm, unless setRequred is set explicitly I get a null pointer exception when accessing getRequired(). So for say a ComboxboxItem unless setRequred(false) is set (or setRequired(true)) then the following gives a null pointer exception.

    Code:
            for (FormItem formItem : dynamicForm.getFields()) {
                System.out.println("FormItem = " + formItem.getTitle());
                
                if (formItem.getRequired()) {
                    System.out.println("Required = " + formItem.getTitle());
                }
            }
    I wonder if others can reproduce.
    Last edited by boardtc; 6 May 2009, 01:44.

    #2
    This will be fixed shortly. For now, you can test to see if the return type is null and treat as false.

    Thanks,
    Sanjiv

    Comment

    Working...
    X