Sending parameters from composite table to next screen

The following code snippet helps sending parameter to calling lookup screen through lookup button:

private LookupPickerField customerProfileField;
PickerField.LookupAction customerLookupAction;// = customerProfileField.getLookupAction();
public void init(Map<String, Object> params) {
    //2. To pass parameter to customerProfile.browse scree
    customerLookupAction = customerProfileField.getLookupAction();
    customerLookupAction.setLookupScreenParams(ParamsMap.of("isRetailCustomer", "no"));

Is it Possible We can do the same from composite table in the screen? for example,

I have production recipe where operation is used at line item level (composit). When I select the Operation, the resources associated with that operation needs to be selected. for which I want to pass the parameter “operation” to lookup of resources.


You can use, for example, CellClickListener, or a generated column with custom logic.

linesTable.setClickListener("", (item, columnId) ->
        openLookup("sales$Product.browse", null, WindowManager.OpenType.NEW_TAB, ParamsMap.of("orderLine", item)));

Or something like that:

linesTable.addGeneratedColumn("", entity -> {
    LookupPickerField pickerField = componentsFactory.createComponent(LookupPickerField.class);
    pickerField.setDatasource(linesTable.getItemDatasource(entity), "product");
    pickerField.getLookupAction().setLookupScreenParams(ParamsMap.of("OrderLine", entity));
    return pickerField;

Hi Shiryaeva
Thanks. Having hints from your code, now I am thinking of refreshing the resource data source when the resource cell is clicked based on the operation selected.

I have initialized a data source in editor screen
select e from erp$Resource e where = :custom$operationId

then used the following initilized code but getting the following NPE
recipeLineTable.setClickListener("recipeLine.resource",(item, columnId) -> { resourcesDs.refresh(ParamsMap.of("operationId", recipeLineDs.getItem().getOperation().getId())); });

at com.haulmont.cuba.web.gui.components.WebAbstractTable.setClickListener(
at com.inteacc.erp.web.pp.recipe.RecipeEdit.postInit(
at com.haulmont.cuba.gui.components.AbstractEditor.setItem(
at com.haulmont.cuba.gui.WindowManager.openEditor(
at com.haulmont.cuba.web.WebWindowManager.openEditor(

There must be an error somewhere in your code that causes a NPE, hard to say exactly without debugging.

Hi Olga
I have prepared a sample app to demo it and you may please use it to finish what is lacking here.

Before you use the recipe editor, please update the following data:

  1. create 2 records in Operation: Operation 1, Operation 2
  2. Create 2 records in Resource: Resource A, Resource B and use operation 1 & 2 respectively

Then go to Recipe, edit.create a new line in the table, select Operation. What I am expecting here that when we click Resource, it is filtered by the Operation selected. (42.1 KB)