swingx
  1. swingx
  2. SWINGX-1430

JXTreeTable: IllegalArgumentException on getEditingRow

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.3
    • Fix Version/s: 1.6.3
    • Component/s: TreeTable
    • Labels:
      None
    • Environment:

      Window XP SP 3, NetBean 7.0

      Description

      java.lang.IllegalArgumentException: column must be valid, was-1
      at org.jdesktop.swingx.JXTreeTable.isHierarchical(JXTreeTable.java:2073)
      at org.jdesktop.swingx.JXTreeTable.getEditingRow(JXTreeTable.java:1213)
      Caused: java.lang.reflect.InvocationTargetException
      at sun.reflect.GeneratedMethodAccessor88.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.netbeans.modules.form.RADProperty.getTargetValue(RADProperty.java:119)
      at org.netbeans.modules.form.FormProperty.checkCurrentValue(FormProperty.java:1003)
      at org.netbeans.modules.form.FormProperty.getValue(FormProperty.java:269)
      at org.openide.explorer.propertysheet.PropUtils.updateEdFromProp(PropUtils.java:905)
      at org.openide.explorer.propertysheet.PropUtils.getPropertyEditor(PropUtils.java:878)
      Caused: java.lang.IllegalStateException: Error getting property value
      at org.openide.explorer.propertysheet.PropUtils.getPropertyEditor(PropUtils.java:894)
      at org.openide.explorer.propertysheet.PropUtils.getPropertyEditor(PropUtils.java:818)
      at org.openide.explorer.propertysheet.SheetTable.onCustomEditorButton(SheetTable.java:846)
      at org.openide.explorer.propertysheet.SheetTable.processMouseEvent(SheetTable.java:709)
      at java.awt.Component.processEvent(Component.java:6028)
      at java.awt.Container.processEvent(Container.java:2041)
      at java.awt.Component.dispatchEventImpl(Component.java:4630)
      at java.awt.Container.dispatchEventImpl(Container.java:2099)
      at java.awt.Component.dispatchEvent(Component.java:4460)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
      at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4235)
      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
      at java.awt.Container.dispatchEventImpl(Container.java:2085)
      at java.awt.Window.dispatchEventImpl(Window.java:2478)
      at java.awt.Component.dispatchEvent(Component.java:4460)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
      at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:148)
      [catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

      and then I can't create the Model for TreeTable ,

        Activity

        Hide
        Karl Schaefer added a comment -

        Not sure how this is a bug for SwingX. If the value is not valid, then it is appropriate to get an exception.

        Show
        Karl Schaefer added a comment - Not sure how this is a bug for SwingX. If the value is not valid, then it is appropriate to get an exception.
        Hide
        caothuvolam added a comment -

        Oh, may be my word wasn't very clear for the issue description, the case is:

        When I drag the new JXTreeTable bean from the Palette of NetBean to the GUI Builder, it's fine... But in the Properties Window show an red line error like in the picture. And the default editingColumn value ALWAYS was -1, so the exception throw in editingRow... And then :
        -I change the editingColumn but take no effect
        -I can't change the editingRow cause the error
        -I can't change the Model of the TreeTable (for creating Row and Collumn ) => It say "Fail to change value of 'Model'"

        Show
        caothuvolam added a comment - Oh, may be my word wasn't very clear for the issue description, the case is: When I drag the new JXTreeTable bean from the Palette of NetBean to the GUI Builder, it's fine... But in the Properties Window show an red line error like in the picture. And the default editingColumn value ALWAYS was -1, so the exception throw in editingRow... And then : -I change the editingColumn but take no effect -I can't change the editingRow cause the error -I can't change the Model of the TreeTable (for creating Row and Collumn ) => It say "Fail to change value of 'Model'"
        Hide
        kleopatra added a comment -

        verified that it is a treetable issue - thanks for the clarification! Changed the title accordingly

        Jeanette

        Show
        kleopatra added a comment - verified that it is a treetable issue - thanks for the clarification! Changed the title accordingly Jeanette
        Hide
        kleopatra added a comment -
        • guarded internal call to isHierarchical against -1
        • added test

        committed as of revision #3994

        Show
        kleopatra added a comment - guarded internal call to isHierarchical against -1 added test committed as of revision #3994
        Hide
        caothuvolam added a comment -

        I will test the new revision ...

        Thank so much for the lighting fast response . You guys ROCK , i'm very appreciate that!

        Show
        caothuvolam added a comment - I will test the new revision ... Thank so much for the lighting fast response . You guys ROCK , i'm very appreciate that!
        Hide
        caothuvolam added a comment -

        I'm not really sure this bug is fixed yet . I have a lastest build from Hudson (The red line and exception is gone ) and still can't add Model to the Table. A dialog show : Fail to write value to the property "Model"

        Show
        caothuvolam added a comment - I'm not really sure this bug is fixed yet . I have a lastest build from Hudson (The red line and exception is gone ) and still can't add Model to the Table. A dialog show : Fail to write value to the property "Model"
        Hide
        kleopatra added a comment -

        well, I'm pretty sure the reason for the NPE is fixed (tests are our friends and the error message is different.

        As to interaction of Netbeans with SwingX .. no idea. Try to create an example manually (without the builder), set the model to see if that's possible. If that's possible but fails with Netbeans, I would point fingers to the builder - you might try to get input from the netbeans folk (here rarely anybody uses that IDE). If on the other hand, you are sure, it's a SwingX bug, please file a new issue. We would need more info to be able to do anything about it, best a small runnable example.

        Cheers
        Jeanette

        Show
        kleopatra added a comment - well, I'm pretty sure the reason for the NPE is fixed (tests are our friends and the error message is different. As to interaction of Netbeans with SwingX .. no idea. Try to create an example manually (without the builder), set the model to see if that's possible. If that's possible but fails with Netbeans, I would point fingers to the builder - you might try to get input from the netbeans folk (here rarely anybody uses that IDE). If on the other hand, you are sure, it's a SwingX bug, please file a new issue. We would need more info to be able to do anything about it, best a small runnable example. Cheers Jeanette
        Hide
        caothuvolam added a comment - - edited

        Sorry for the late reply ...

        Yes , the error "Fail to change value of 'Model'" is from NetBean itself ... (I've asked in the NetBean forum too ...)

        But I may ask futher about the editingColumn value <- What's the valid value for this property :
        When I try to set it to any value (eg: 0,1,2... etc), then the Exception come in and a "blank" error dialog appear ...
        <= I think it's for your testing purpose but can you tell me some more info about the "editingColumn" value

        Show
        caothuvolam added a comment - - edited Sorry for the late reply ... Yes , the error "Fail to change value of 'Model'" is from NetBean itself ... (I've asked in the NetBean forum too ...) But I may ask futher about the editingColumn value <- What's the valid value for this property : When I try to set it to any value (eg: 0,1,2... etc), then the Exception come in and a "blank" error dialog appear ... <= I think it's for your testing purpose but can you tell me some more info about the "editingColumn" value
        Hide
        kleopatra added a comment -

        nothing special to JXTreeTable, it's plain core JTable api, meant for internal usage only - you can't set set it. If you want to programmatically start an edit, call editCellAt instead.

        If you deem this issue fixed with regard to the initial problem, please close. For further discussion (of SwingX related questions) please post to the swinglabs forum.

        Thanks
        Jeanette

        Show
        kleopatra added a comment - nothing special to JXTreeTable, it's plain core JTable api, meant for internal usage only - you can't set set it. If you want to programmatically start an edit, call editCellAt instead. If you deem this issue fixed with regard to the initial problem, please close. For further discussion (of SwingX related questions) please post to the swinglabs forum. Thanks Jeanette

          People

          • Assignee:
            kleopatra
            Reporter:
            caothuvolam
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: