AutoFilterTableHeader clears all table data

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.

AutoFilterTableHeader clears all table data

Postby Maurice » Fri Jan 06, 2012 6:19 am

Hi,

We are using version 3.3.0and are having trouble with the CustomAutoFilterTableHeader. When we set the flag 'setAcceptTextInput' and a user selects multiple values, the table is cleared on the next redraw.

I've attached an example below:

Regards,
Code: Select all

public class AutoFilterTableHeaderTest {

   public static void main(String args[]) {
      new AutoFilterTableHeaderTest().run();
   }
   
   public void run() {
      SortableTable sortableTable = new SortableTable(new AbstractTableModel() {
         
         @Override
         public Object getValueAt(int rowIndex, int columnIndex) {
            return rowIndex + columnIndex;
         }
         
         @Override
         public int getRowCount() {
            return 10;
         }
         
         @Override
         public int getColumnCount() {
            return 10;
         }
      });
      
      CustomAutoFilterTableHeader autoFilterTableHeader = new CustomAutoFilterTableHeader(sortableTable);
      
      /* ======= The problem line ===========================*/
      
      autoFilterTableHeader.setAcceptTextInput(true);
      
      /* ====================================================*/

      autoFilterTableHeader.setAllowMultipleValues(true);
      autoFilterTableHeader.setPreferSelectedValues(true);
      autoFilterTableHeader.setAutoFilterEnabled(true);
      sortableTable.setTableHeader(autoFilterTableHeader);
      autoFilterTableHeader.init();
      
      JFrame frame = new JFrame("AutoFilterTableHeaderTest");
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      frame.getContentPane().add(autoFilterTableHeader, BorderLayout.NORTH);
      frame.getContentPane().add(sortableTable, BorderLayout.CENTER);
      frame.pack();
      frame.setVisible(true);
   }
}

Maurice
 
Posts: 62
Joined: Tue Sep 14, 2010 3:36 am

Re: AutoFilterTableHeader clears all table data

Postby JIDE Support » Fri Jan 06, 2012 8:42 am

I'm afraid that accept text could work well with multiple values selection. The reason is that, accept text means that the table has to be filtered according to the text in the input field. Making multiple values selection has to put something on the input field but it has no way to fulfill the request stated above. Hence another filtering, caused by mouse over the header, causes the table being cleared.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: AutoFilterTableHeader clears all table data

Postby Maurice » Mon Jan 09, 2012 4:47 am

Hi,

This issue didn't occur in the version we were previously using 3.0.0.

Maybe I'm not being clear on the use case. Nothing is entered into the manual input field. The user that chooses multiple values from the drop down which then adds those values to the manual input. On the next redraw the table clears all data.

Clearly the filter values are valid as it is the column dropdown that create the correct filter syntax. Also, as this used to work fine, thus allowing users to view the choices they have made I wonder why this might have changed.

Regards,

Maurice
Maurice
 
Posts: 62
Joined: Tue Sep 14, 2010 3:36 am

Re: AutoFilterTableHeader clears all table data

Postby JIDE Support » Mon Jan 09, 2012 10:00 am

Got you. Although it's not the intended behavior, we will switch the old behavior back in next regular release.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: AutoFilterTableHeader clears all table data

Postby JIDE Support » Tue Jan 10, 2012 4:39 pm

Just so you know, this is fixed in 3.3.3 just released.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: AutoFilterTableHeader clears all table data

Postby Maurice » Wed Jan 11, 2012 2:54 am

Many Thanks
Maurice
 
Posts: 62
Joined: Tue Sep 14, 2010 3:36 am


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

Who is online

Users browsing this forum: No registered users and 16 guests

cron