Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-6988000

PropertiesQuestionRenderer: background coloring works incorrectly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • jt5.0
    • jt4.3
    • tools
    • b20
    • generic
    • generic
    • Not verified

    Description

      Background color for properties question is set in RenderingUtilities.PropCellRenderer.getTableCellRendererComponent method. This method uses question stored in the instance of this class to determine if the value is valid.
      The problem is that PropCellRenderer instance is the same for all questions of the same class - it is cached in PropertiesQuestionRenderer.addGroup method:
      "if (renderer == null)
      renderer = new RenderingUtilities.PropCellRenderer(question);"

      As the result, PropertiesQuestionRenderer can correctly determine if the property value is valid only for first visible properties question, so for all other property questions ValueConstraints will not work for displaying properties.

      So, the renderer field must be reset to null in PropertiesQuestionRenderer.getQuestionRendererComponent method before all addGroup invocations.

      Attachments

        Activity

          People

            aburduko Alexander Burdukov
            aburduko Alexander Burdukov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: