What is "customers" used in Declarative creation method.

Hi,

I am using declarative creation method.


@Override
public void init(Map<String, Object> params) {
    Set<Customer> entities = (Set<Customer>) params.get("customers");
    for (Customer entity : entities) {
        customersDs.includeItem(entity);
    }
    customersDs.refresh();
}

Can any one say me what is “customers” used in params.get(“customers”). Because I am getting null value for entities in this example.

Hi,

I don’t know what example you are talking about, but “customers” here should be a screen parameter passed when the screen is opened. See a working example here in the ProductBrowse screen.

I am talking about the Declarative creation example, please find the below link

https://doc.cuba-platform.com/manual-6.6/datasource_decl_creation.html

Can you say me, Where I can find the screen parameter.