Hi,
I want to use FilterBuilder as a means for User to specify his selection criteria. Once he does that, I want to extract the Criteria and use it in a Where clause to extract data.
I understand FilterBuilder.getCriteria returns a AdvancedCriteria object. Is there a way to derive the criteria in a string format?
Thanks,
Ajay
Same question.
I don’t want client side filtering. My database is pretty large and I want to extract the criteria and filter on the server side.
Isomorphic – is this option available or was filtering meant to be only on the client side?
Both of you: server-side filtering via SQL and/or Hibernate is built into Power Edition. If you are a professionally employed developer, this option makes the most sense.
@ajaykrishna If you want to build your own server logic, use eg RestDataSource to get the criteria to the server (serialization is automatic), then see the SmartClient Reference for AdvancedCriteria for the format.
@jayanth Your question is unrelated - see ResultSet for options controlling whether client-side filtering is enabled. However note that SmartGWT uses Adaptive Filtering, which you can and should leave enabled for large datasets.
I was hoping for something along the following lines with the Adaptive Filter:
-
If record(s) that satisfied the filter criteria are available in the cache, serve those records
-
If a record satisfying the filter criteria was not available in the cache, fire the request to the server with the criteria so that a server side filter can be applied.
It appears now that to realistically have any filtering, one has to either load the entire data set (showAllRecords) or have the user scroll the list grid all the way to the bottom before attempting to use the filters.
What you just described is how adaptive filtering already works.
Are you assuming use of the SmartGWT EE?
I don’t see how to get this to work with SmartGWT. Can you list the properties that need to be set to get the behavior outlined?
Not assuming EE. No properties need to be set. It is the default.
Have you read any of the documentation we’ve referred you to so far? Or tried using using the Developer Console and looking at the RPC tab?