- edited description
Using TableControl without TableController
Issue #34
resolved
I use TC as data container without setting TController (it is ok if I set). But when I trigger (click on table cell) focus it throws NullPointerException in TC.java line 735:
if (!mode.get().equals(Mode.INSERT) || newValue.getRow() == -1 || oldValue.getRow() == -1) { //line 735
return;
}
From a programming standpoint it is recommended to write this:
mode.get().equals(Mode.INSERT)
like this:
Mode.INSERT.equals(mode.get())
or
(mode!=null && mode.get().equals(Mode.INSERT))
because mode.get()
can throw null pointer exception.
Anyway how can I use TC without TController?
Comments (4)
-
reporter -
reporter I defined that, focusing table with Controller but without calling reload() throws NPE.
-
I wonder why you avoid TableController.
Btw, you should be able to modify the list of records:
List<R> lstRecord = tableController.getRecords(); lstRecord.clear();//clear tableControl lstRecord.add(new Record());//add one row
something like that.
-
- changed status to resolved
Thank you for the report
- Log in to comment
I changed text