Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6402408

MBeans tab: jconsole loses attribute edits on focus change

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 6
    • Component/s: tools
    • Subcomponent:
    • Resolved In Build:
      b83
    • CPU:
      x86
    • OS:
      windows_xp
    • Verification:
      Verified

      Description

      FULL PRODUCT VERSION :
      java version "1.5.0_06"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600](C) Copyright 1985-2001 Microsoft Corp.

      A DESCRIPTION OF THE PROBLEM :
      jconsole loses attribute data entered into JTable cells when the focus is lost.

      This is the behavior described in bug #4709394. In that bug it states that it is necessary to set the terminateEditOnFocusLost client property to avoid this data loss. Clearly the need to set this property is so underdocumented that even the Sun engineers don't know to apply it!

      jconsole should not lose attribute data when JTable focus is lost. Our users will consider this a bug in *our* MBeans even though we have nothing to do with writing jconsole.

      Overall, I believe this situation points out that the default should be for all JTable cells not to lose edits when losing focus. If Sun can't even use the property correctly, there is no way that others will in general. Most Swing tables I've seen lose their data when losing focus for just this reason. I had assumed Sun simply had still not fixed this in any way based on this.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Enter data for an MBean attribute in jconsole but switch focus before commiting the changes.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The edits should be commited.
      ACTUAL -
      The edits are canceled.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      None. [Hitting 'enter' before switching focus works, but this is not something we can realistically train customers to do -- it's not how other table UI's work.]

        Attachments

          Activity

            People

            • Assignee:
              lmalvent Luis-Miguel Alventosa (Inactive)
              Reporter:
              tbell Tim Bell
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: