Click
  1. Click
  2. CLK-32

Null values in Column renderTableData raise exception

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      None
    • Environment:
      Click-0.15, all enironments

      Description

      I have a row in a Table that represents an object instance (eg User). Once of the object attributes (role) is another object. If the User does not have a Role, I get an exception - 'IllegalArgumentException on HTMLStringBuffer - null value parameter' (line 93 in HTMLStringBuffer)

      I think the problem is around line 393 in Column.java. A test for a null value before doing a buffer.append() would fix this

      I'm subclassing Column right now to override the renderTableData method, which seems to work. The pertinent lines of code are:

      (replace line 393 with)
      if (columnValue != null)

      { buffer.append(columnValue); }

      Or should HTMLStringBuffer be more forgiving? Or both?

        Activity

          People

          • Assignee:
            Malcolm Edgar
            Reporter:
            Geoff Hopson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development