ag-grid Server-side filtering by unique keys - filter list can contains milion keys - filtering

We would like to implement a server-side filtering and display all unique keys in the filter list. Unfortunately, there may be milion items in the list.
Does it exist a way how to do it? Do we have to pass all values into filterParams or is it possible to use a lazy loading? Can we pass a custom component with implementation of lazy loading?

Related

Passing a Reusable rule id into an action

I would have like to use reusable execution Rules as an action but saw on a post that it is not supported by code effects.
For example: If Temperature is 54 then RuleA.
Is there any support for passing the ruleid into an action so it can be added to a collection of rule ids?
Example: IF Temperature is 54 THEN PasseusableRuleId(reusableruleid).
You can use the Dynamic Menu Data Sources feature to create a list of your reusable rules and use that list as param in your action method. One small note to remember: dynamic menu sources can only use integers as IDs, so you cant just use GUID IDs of your rules in there. Instead, add a unique auto-incrementing int column to the rules table in your database and use those int values as IDs in dynamic menus. Details can be found at https://codeeffects.com/Doc/Business-Rules-Dynamic-Menu-Data-Sources

Validating arrays using Firestore rules

In my HTML page I have a group of five checkboxes. Their values are 1,2,3,4,5.
In the object to which those checkboxes belong I save them as an array. So if user selects options 2,4,5 I store it as [2,4,5].
I'm stuck at the spot when I try to validate that array in Firebase rules. Is there any way of doing validation like this?
I want to make sure an array like [5,6,7] does not go through the Firestore rules but something like [1,3,4,5] does.
Array type fields in Firestore documents show up as List type objects in security rules. You can use its hasOnly method to determine if the List contains only certain elements.
request.resource.data.arrayField.hasOnly([1,2,3,4,5)

DOMINO REST API get Collection sort column

Hi I'm trying to get a sorted Collection from the Domino Rest Api. My database name is "Test/JSON_Views.nsf" and my views name "List".
The endpoint I use is
**/Test/JSON_Views.nsf/api/data/collections/name/List?sortcolumn=title&sortorder=ascending&count=20
But the JSON-Response entries aren't sorting by title in ascending order.
Should I make any settings to the column properties in the designer? If I set descending there for the title-column it works. But I want to change the sorting in my external java-application.
Is my endpoint correct? I use this Domino API Docu as Reference.
Add an additional sorting to your title column:
This gives the API the possibility to sort by title in both directions. You can do this with other columns too so you are very flexible in sorting this way.
The doc says that if the column isn't sorted in design then the sortcolumn parameter has no effect, so the answer is "Yes" you should change the design of the desired column. If doing that is unworkable in whatever context you use it, then create a second view and use that instead.

How to fetch distinct list from SpringData without using query annotation?

I am using 2 different properties to fetch distinct list eg
findDistinctBy<propertyName>And<propertyName>In(List<String> list).
My actual Spring jpa statement is
List<PojoClass> findAllByTpIdInAndDistinctMobile(List<String> edgeIds);
where TpId & Mobile are 2 different properties in PojoClass. I need to implement this without using Query annotation. Any suggestions of queryDsl will also do.
The question needs to be more clear.What exactly do you intend to achieve when the input is a list of Ids?
There is no option to provide a list to findAll unless it is an Id.
A simple way would be to loop the the input list in service and append the result to a result list.
for(String edgeId:edgeIds){
resultList.addAll(findByEdgeId(edgeId));
}
Updated code after #Tejas comment
for(Pojo pojo:Pojos){
resultList.addAll(findDistinctPojoByPropert1OrPropert2(String pojo.getProperty1(),String pojo.getProperty2());
}

GWT DataGrid/CellTable: Select all over multiple pages

I´m using GWT 2.4 with a DataGrid and a SimplePager along with a MultiSelectionModel. I want to implement a simple select-all-feature over all pages.
I´m only able to select all visible items on the current page. What is the best way to select all items on all pages?
I know the MultiSelectionModel stores the proxy keys provided by a ProvidesKey object in a HashMap. I think I have to request all proxy objects from server or at least all keys. But actually I don´t want to store information about the ProvidesKey´s getKey()-method on server-side. But I also can not access the MultiSelectionModel´s HashMap of the selected proxies´ keys. This all looks cumbersome, so is there a better way to solve this?
As mentioned in https://developers.google.com/web-toolkit/doc/latest/DevGuideUiCellWidgets#selection, one way to achieve this would be to implement your own SelectionModel (e.g. by extending AbstractSelectionModel or DefaultSelectionModel):
A complex implementation can handle "select all" across multiple pages using a boolean to indicate that everything is selected, and then keep track of negative selections.
Why do you need all keys for select all? When you select some objects from a list, you need to remember which ones are selected, but when you select all objects, you need a single Boolean:
// on click Select All button/checkbox
boolean selectAll = true;
// ask a user what he wants to do
// send a request to server with a parameter selectAll to update/delete all objects
Select all across multiple pages will work only if you are NOT lazy loading. First of all why do you need to select all? If you want to do some actions on all the grid data, you will already have the list and you can perform your actions on the list directly. Nonetheless you can select all the rows of the grid over multiple pages by iterating through the list and using the following API on each item.
public void setSelected(T item, boolean selected);
Note: This will work only if you are NOT lazy loading.