Is there a way to do setFilterFieldVisible for multiple fields, in the same way as Table.setVisibleColumns or Table.setColumnHeaders?
It would be useful when you only want to be able to filter by a few fields. Or maybe an option to start with all filter fields invisible and enable them with setFilterFieldVisible(columnId, true)
Is there a way to get the filtered results from the paged filter table each time a search is carried out?
In my scenario, after entering the text to be searched I click TAB button for the search results to be displayed. So is there any way by which I can get the list of the filtered data in the table on such an event?
Thanks for the reply, but how do I make use of this function getVisibleItemIds().
In the PagedFilterTable.jar that I’m using, the search functionality is present within jar itself. So I’m unable to trigger an event from the PagedFilterTable for a search function in my java class, because of which I’m unable to retreive the list of results after search.
The requirement for me is to get only the search based filtered results from the PagedFilterTable to an excel sheet as a report.
We have problem with setRefreshingEnabled method:
If setRefreshingEnabled(false) is called (which means that protected method disableContentRefreshing is called), then in CustomTable’s methods changeVariables, containerItemSetChange, setContainerDataSource, setVisibleColumns and FilterTable/FilterTreeTable’s method resetFilters unconditionally is called protected method enableContentRefreshing (exception is CustomTable’s method sort, which calls it conditionally), which means that it would be same as calling setRefreshingEnabled(true), but we need to have refreshing disabled for more than one FilterTable’s public method call:
like for example, we want to set container data source and programmatically change column’s header filtering field’s value with one actual data fetching from DB (we are using LazyQueryContainer) after all filtering values are set and other preparations are done.
P.S. We are using older “Filtering Table” version, but seems that newest “Filtering Table” version have same problem.
Now, to mitigate this problem, instead of field isContentRefreshesEnabled we are introducing counter field, which counts how many times disableContentRefreshing is called, discounts how many times enableContentRefreshing is called and, when on enableContentRefreshing call counter reaches zero, it calls methods refreshRenderedCells and markAsDirty.
Also in method sort we are changing from conditional call of enableContentRefreshing to unconditional.
Also we are changing disableContentRefreshing value returning logic to always return true so that sort method will always call enableContentRefreshing.
Is there simple way to do the following from a single button click e.g.
The user Clicks a button called “empty then reload”
The FilterTable is cleared and the user actually sees an “empty” FilterTable
An long action 2-3 seconds starts during this time the FilteringTable is visually empty
The new data is display in the FilterTable
The code fragment below will never display the table as empty to the user depsite calling removeAllItems()
FilterTable filterTable = new FilterTable();
Button emptyFilterTableThenLoadNewData = new Button("empty then reload");
emptyFilterTableThenLoadNewData.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
// remove everything from the FilterTable, want it to refresh and display
// an empty table.
filterTable.removeAllItems();
// load some new data this is long running it might take 2-3 seconds,
// Here's the problem the FilterTable is NEVER displayed to the user as empty.
filterTable.setContainerDataSource(buildContainer());
}
});
layout.addComponent(emptyFilterTableThenLoadNewData);
I can of course break ithe above up into two seperate buttons say “clear” and “load”, and of course the table emptys and fills as expected, but I’m looking for an easy solution that mimics a user pressing “clear” followed by “load” via single button “empty then reload”
Answering my own question it seems I can do the following, I assume this is the “best” way and there isn’t any built in functionality that woudl do the same.
Regards,
Jon Strabala
FilterTable filterTable = new FilterTable();
final Button emptyFilterTableThenLoadNewData = new Button("empty then reload");
// Define a thread class to do some "long" non GUI work
class ClearLoadThread extends Thread {
@Override
public void run() {
// Update the UI thread-safely (clear our FilterTable)
UI.getCurrent().access(new Runnable() {
@Override
public void run() {
filterTable.removeAllItems();
}
});
// long running task (we get our data from the database here here)
final Container c = buildContainer();
// Update the UI thread-safely (set new data in our FilterTable)
UI.getCurrent().access(new Runnable() {
@Override
public void run() {
// set data container the in the FilterTable UI safe
filterTable.setContainerDataSource(c);
// Stop polling
UI.getCurrent().setPollInterval(-1);
emptyFilterTableThenLoadNewData.setEnabled(true);
}
});
}
}
emptyFilterTableThenLoadNewData.addClickListener(new Button.ClickListener() {
@Override
public void buttonClick(ClickEvent event) {
final ClearLoadThread thread = new ClearLoadThread();
thread.start();
// Enable polling and set frequency to 0.25 seconds
UI.getCurrent().setPollInterval(250);
emptyFilterTableThenLoadNewData.setEnabled(false);
}
});
buttonLayout.addComponent(emptyFilterTableThenLoadNewData);
Hello,
I implemented the add-ons filteringtable rev = "0.9.13.v7. I taked BeanItemContainer to stock my object InfoAnalyse
This add-ons is great, but I met some filter problems. The filter does not respond when:
The sentence is written in uppercase
The phrase contains a parenthesis
The sentence contains an “/”
Does anyone can give a hand.
My object like :
info = new InfoAnalyse();
info.setNomAnalyse(“Actinomycètes aérobies (identification)”);info.setSynonyme(“”);
collection.add(info);
info = new InfoAnalyse();
info.setNomAnalyse(“HTLV-I/II (anticorps)”);
info.setSynonyme(“”);
collection.add(info);
info = new InfoAnalyse();
nfo.setNomAnalyse(“MRSA”);
info.setSynonyme(“”);
collection.add(info);
Hi,
Can we set date manually in filter of date-column of filter table in vaadin 7? Actually It is possible in vaadin 6 , as it is shown in demo of vaadin 6 filter table.
Actually i want date picker should be like that , as it is shown in below image. Below filter table is in vaadin 6, in this we can select the date from calender as well as we can set the date manually also. I want the same feature of date picker in vaadin 7 filtertable.
Date picker is surrounded with red color boundary in below image. i want the same feature in vaadin 7 filter table.
Can anyone please suggest me how to achieve this. i will bw very thankful.
Does anyone know how to make filtering work for columns which reference another SQLContainer? For example, product_id would translate to basketball in the “products” table whose id is in a column of an order table?
Hi everybody! I hope you can help me with this issue. I have a paged filter table where last column is being shown with smaller width than the header. This happens to me always, with all paged filter tables I have in my application. Why is that?? I tried changing table width but it doesnt work. I attached an image so that you can see my problem.
I really apreciate your help!
Thank you very much,
Celeste.-
I am having a requirement that fromdate should be less than or equal to todate.
In DateFilterPopup class fromFiled and toFiled DateField objects are there.My problem is that whenver I am selecting
fromFiled (fromdate) toFiled (todate) value must be restricted to less then or equal to toDate.
Eg : Aug-15-2015 is my from date then to date should be like Aug-15-2015,Aug-16-2015 or Sep-15-2015 but not Aug-14-2015.
How to restrict the user at UI (DateFiled component)…?
Please suggest me a way…
Hi,
I am trying Vaadin 7.6.0.beta2. When i want to compile widgetset i get this error:
Tracing compile failure path for type 'com.vaadin.client.ui.VCustomScrollTable'
[INFO]
[ERROR]
Errors in 'jar:file:/C:/Users/UserXY/.m2/repository/org/vaadin/addons/filteringtable/0.9.13.v7/filteringtable-0.9.13.v7.jar!/com/vaadin/client/ui/VCustomScrollTable.java'
[INFO]
[ERROR]
Line 2604: The method hasActiveRequest() is undefined for the type ApplicationConnection
Has anyone similar issue?