Focus fun when using powertable with jtable editors


On Ignition 7.7.0

This is a bit off the beaten path and a pretty new capability to ignition but I have overridden default editor in a powertable to be able to do Key/value edits with a contextual editor to suit the data type being edited. (cell specific not column specific as per the extension function)

See image. editor component changes to suit data eg number is PMINumericTextField, datetime is PMIDateTimePopupSelector etc

My issue is with the focus behaviour (it appears you need to override JTable and explicitly set cell focus and the powertable does not appear to do this)

Editing via mouse click to gain focus is quite ok (albeit with double enter sometimes required for some components), but if you select cell via cursor control and enter new value via keyboard you can type the updated value as expected but focus is not properly gained and changes do not propgate when you press enter (eg PMINumericTextField,PMISpinner etc behave like this)

I have attached my example page export so you can see what I mean. The code is prototype at this stage, but I am pretty happy where it is heading.

The main reason for doing this is that I have some applications with a lot of parameters. It is much easier to store them as a key/value table. By enforcing datatype via the editor component I can then avoid many common errors eg typos in date field, text in number field etc

cellrender_Main Window_2014-10-28_1552.proj (13.7 KB)

Interested in what you are doing. When I have some time I’ll have to take a look closer (So maybe in 2015!). Like you, our projects have many many parameters and those parameters could be REAL values INTEGER values, and sometimes better off as an enumerated list (1 - Enabled, 0 - Disabled). If you method is allowing you to create custom enumeration dropwdown lists which are cell specific, that would be fantastic.

Based on your screen shot, for the drop down option, are you able to create custom enumeration lists for each cell? When I first looked into doing something like this, the list was global to the column, so it doesn’t work for me.