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

PropertiesQuestionRenderer: background coloring works incorrectly

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: jt4.3
    • Fix Version/s: jt5.0
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b20
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      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

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

              Dates

              • Due:
                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: