Hi Eric,

Yes, our current application remembers whatever filter was applied to the main 
table and when the application restarts and the table is populated, the filter 
is automatically applied.

So, we store this filter to a file on disk and we read that back on startup.

I don’t see a way using the built in QuickFilters to get the values of the 
filter and what type it is (Equals, GreaterThan, etc). Those are instances of 
the QuickFilter interface in the ETable.
I am just returned an Object when I use the “getQuickFilter” method. 

I think I’ll just end up writing my own QuickFilters and this way I can track 
the values I need and then save those values out when the TopComponent is 
persisted and read back.

At least, that’s what it looks like I need to do..



> On Jul 3, 2021, at 7:51 AM, Eric Bresie <ebre...@gmail.com> wrote:
> 
> And/or setModel help?by persist do you mean save to to a file, to db, or 
> apply to the tabl?
> 
> Does the setQuickFilter options ( 
> http://bits.netbeans.org/dev/javadoc/org-netbeans-swing-outline/org/netbeans/swing/etable/ETable.html#setQuickFilter-int-java.lang.Object-
>  
> <http://bits.netbeans.org/dev/javadoc/org-netbeans-swing-outline/org/netbeans/swing/etable/ETable.html#setQuickFilter-int-java.lang.Object->)
> 
> Eric Bresie
> ebre...@gmail.com
> 
>> On July 2, 2021 at 2:29:36 PM CDT, Tim Mullé <tmu...@gmail.com> wrote:
>> Hi, 
>> 
>> I’m looking at maybe using the built in Explorer TableView (ETable) instead 
>> of our customized JTable component we currently have in our Swing 
>> Application. 
>> 
>> I’m am evaluating the TableView component and seeing if it is worth using 
>> that component in the new NetBeans Platform application I’m going to migrate 
>> our 
>> current application to. 
>> 
>> I have a few questions: 
>> 
>> 1. How can I persist any quick filter objects that are set on the ETable? I 
>> am using "Object quickFilterObject = tv.getTable().getQuickFilterObject();” 
>> but that 
>> Just returns an Object and not like “EqualsQuickFilter” which is in the 
>> TableView. There are no ways for me to also get the type or value of the 
>> filter. I’m guessing 
>> That I’ll have to provide my own interface popup and store off our filters 
>> we want?  
>> 
>> The reason I ask is in our current application we reapply any filters on the 
>> table on application startup once the data is populated in the table. 

Reply via email to