Skip to main content

jdk8 b114 TableView exception

1 reply [Last post]
charlymoon
Offline
Joined: 2008-06-09
Points: 0

Since several builds i am having troubles when a row is selected on JavaFX TableView... on the b113 the exception is thrown as follows:

<br />
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException<br />
	at javafx.scene.control.TableView$TableViewArrayListSelectionModel.handleSelectedCellsListChangeEvent(TableView.java:2580)<br />
	at javafx.scene.control.TableView$TableViewArrayListSelectionModel.clearAndSelect(TableView.java:2107)<br />
	at javafx.scene.control.TableView$TableViewSelectionModel.clearAndSelect(TableView.java:1666)<br />
	at com.sun.javafx.scene.control.behavior.TableCellBehaviorBase.simpleSelect(TableCellBehaviorBase.java:318)<br />
	at com.sun.javafx.scene.control.behavior.TableCellBehaviorBase.doSelect(TableCellBehaviorBase.java:231)<br />
	at com.sun.javafx.scene.control.behavior.TableCellBehaviorBase.mousePressed(TableCellBehaviorBase.java:144)<br />
	at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:95)<br />
	at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:89)<br />
	at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)<br />
	at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)<br />
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)<br />
	at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)<br />
	at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)<br />
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)<br />
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)<br />
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)<br />
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)<br />
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)<br />
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)<br />
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)<br />
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)<br />
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)<br />
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)<br />
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)<br />
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)<br />
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)<br />
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)<br />
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)<br />
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)<br />
	at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)<br />
	at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)<br />
	at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)<br />
	at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)<br />
	at javafx.event.Event.fireEvent(Event.java:203)<br />
	at javafx.scene.Scene$MouseHandler.process(Scene.java:3659)<br />
	at javafx.scene.Scene$MouseHandler.access$1800(Scene.java:3384)<br />
	at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1652)<br />
	at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2443)<br />
	at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:314)<br />
	at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:243)<br />
	at java.security.AccessController.doPrivileged(Native Method)<br />
	at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:345)<br />
	at com.sun.glass.ui.View.handleMouseEvent(View.java:523)<br />
	at com.sun.glass.ui.View.notifyMouse(View.java:889)<br />
	at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)<br />
	at com.sun.glass.ui.win.WinApplication.access$300(WinApplication.java:39)<br />
	at com.sun.glass.ui.win.WinApplication$4$1.run(WinApplication.java:112)<br />
	at java.lang.Thread.run(Thread.java:744)</p>
<p>

And the row is not getting selected... is there some change on the way the single selection mode is done on the last 10 builds (at least)? Should i report this as a bug? or am i missing sonething?? this is the only listener i have for the table:
<br />
tblResultados.getSelectionModel().selectedIndexProperty().addListener(<br />
                new ChangeListener<Number>() {<br />
            @Override<br />
            public void changed(ObservableValue<? extends Number> ov,<br />
                    Number original, Number valorNuevo) {<br />
                if ((llenandoTabla)) {<br />
                    return;<br />
                }<br />
                int valorReal = valorNuevo.intValue() + 1;<br />
                lblPosicion.setText(valorReal<br />
                        + " de " + tblResultados.getItems().size());<br />
            }<br />
        });<br />
        chbJuris.getSelectionModel().selectedIndexProperty().addListener(new ChangeListener<Number>() {<br />
            @Override<br />
            public void changed(ObservableValue<? extends Number> ov,<br />
                    Number original, Number nuevoValor) {<br />
                if (nuevoValor.intValue() > -1) {<br />
                    filtraJurs(nuevoValor);<br />
                }<br />
            }<br />
        });<br />

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
anthony_p
Offline
Joined: 2006-07-24
Points: 0

Please file a bug at https://javafx-jira.kenai.com/