I have a table with multiple rows. When I click on a row in the designer the “selectedrow” property updates correctly. However, when I click on it in the client/staging the selected row does not update. It will only update if I click and drag on the target row. Is there a setting that I may be missing to get the correct functionality in the client?
Here are the settings that I have for the table:
For anyone that runs into this in the future, this ended up being caused by an incorrect type being used in the tables column attributes data. I was creating/initializing the column attributes dataset so that I could set the column sizes when the table loaded. When creating the dataset, I incorrectly put in “false” for the boolean values which was causing the column to be initialized as a string type instead of a boolean. I found the following errors in the client logs which while not directly helpful provided some clue to the issue:
Exception in thread “AWT-EventQueue-0” java.lang.ClassCastException: java.base/java.lang.String cannot be cast to java.base/java.lang.Boolean
at com.inductiveautomation.factorypmi.application.components.PMITable$DataSetTableModel.isCellEditable(PMITable.java:2130)
at com.inductiveautomation.ignition.client.util.gui.table.SortTableModel.isCellEditable(SortTableModel.java:616)
at java.desktop/javax.swing.JTable.isCellEditable(Unknown Source)
at java.desktop/javax.swing.JTable.editCellAt(Unknown Source)
at java.desktop/javax.swing.plaf.basic.BasicTableUI$Handler.adjustSelection(Unknown Source)
at java.desktop/javax.swing.plaf.basic.BasicTableUI$Handler.mousePressed(Unknown Source)
at java.desktop/java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.desktop/java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)
at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.desktop/java.awt.Component.processEvent(Unknown Source)
at java.desktop/java.awt.Container.processEvent(Unknown Source)
at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.EventQueue.access$500(Unknown Source)
at java.desktop/java.awt.EventQueue$3.run(Unknown Source)
at java.desktop/java.awt.EventQueue$3.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
1 Like