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

ValueConstraints causes wrong editor behavior for PropertiesQuestion

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: jt4.1.1
    • Fix Version/s: TBD_Major
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_xp

      Description

      com.sun.interview.PropertiesQuestion has a ability to assign a constratints object that impacts the way property is shown, edited and validated in the Interview.

      See #setConstraints(String, ValueConstraints)

      The ValueConstraints class defines only a basic attributes - realOnly and visible.

      There are also different subclasses of ValueConstraints available - StringConstraints, BooleanConstraints, etc. These objects imposes a typed constraint - that has a direct impact on the way Renderer/Editor are created for the property. For most of them Editor is a JComboBox.

      The thing is that if a ValueConstraint (a parent object) is assigned to the property, it becames edited as a JComboBox and prohibits empty value!!!

      So the only possibility to have a plain JTextField editor for the property is to not have ANY constraints set at all (setConstraints(<name>, null))

      This is not correct. If property.getConstraints() returns a plain ValueConstraints object - then editor should be a JTextFiled. It should be hidden/visible/allowingUnset valuedepending on the properties. But it should be not a JComboBox!

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dbessono Dmitry Bessonov
                Reporter:
                kromanovorcl Konstantin Romanovskiy (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Imported:
                  Indexed: