Uploaded image for project: 'Click'
  1. Click
  2. CLK-626

FormTable does not gracefully handle NULL Fields

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.2.0
    • Component/s: extras
    • Labels:
      None

      Description

      To be able to have columns in a FormTable that are "display only", ie no fields to edit, I set the Field to null. FieldColumn is perfectly capable of handling NULLs for getField(). It will fallback to the super implementation when a Field is null, and render the data as if it was a Column.

      FormTable however, does that only partially. Some parts are checked, some are not.

      Line 283 of FormTable does a good job:
      if (fieldColumn.getField() != null)

      { fieldColumn.getField().setForm(getForm()); }

      But further down the code, getField() is called and used directly. I would like to see it checked for null. I have modified my local FormTable, and I can find no problems using it like that.

        Attachments

          Activity

            People

            • Assignee:
              sabob Bob Schellink
              Reporter:
              surfman WarnerJan Veldhuis
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: