loadTableRowSettings not restoring selection

This is the forum for JIDE Common Layer which is open sourced at https://github.com/jidesoft/jide-oss. Please note, JIDE technical support doesn't monitor this forum as often as other forums. Please consider subscribe for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Moderator: JIDE Support

Forum rules
Community driven forum for open source JIDE Common Layer. JIDE technical support doesn't monitor this forum as often as other forums. If you only use JIDE Common Layer, please consider subscribing for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

loadTableRowSettings not restoring selection

Postby j-christ » Tue Jun 16, 2015 11:59 pm

In the code below table.loadTableRowSettings(true) is not restoring the selected state after a fireTableDataChanged(). Any ideas why not?

Code: Select all
 private final class SortableSelectionSavingTable extends SortableTable {
      private SortableSelectionSavingTable(TableModel arg0) {
         super(arg0);
      }

      void saveSelection() {
         saveTableRowSettings(true);
      }

      void restoreSelection() {
         loadTableRowSettings(true);
       }
   }

...
table = new SortableSelectionSavingTable (model);
...
table.saveSelection();
table.fireTableDataChanged();
table.restoreSelection();

j-christ
 
Posts: 1
Joined: Tue Jul 17, 2012 10:28 am

Re: loadTableRowSettings not restoring selection

Postby JIDE Support » Wed Jun 17, 2015 8:46 am

You shouldn't use the protected methods as we made them protected for a reason as they are not public APIs. We used them internally which will be conflicting if you also use them. Please call TableUtils.saveSelection and loadSelection in pair instead.
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am


Return to JIDE Common Layer Open Source Project Discussion (Community Driven)

Who is online

Users browsing this forum: No registered users and 11 guests