How to set label dynamically

I need to set label dynamically. Plz check the screen shot. Once I click on the create Button, Second screen will appear. with the label bucket_1,bucket_2,bucket_2,…I want to set the bucket values dynamically. The value can anything. I m sharing my source code below.

package com.keansa.keansacloud.web.plan_data;

import javax.inject.Inject;
import javax.inject.Named;
import java.beans.IntrospectionException;
import java.beans.PropertyDescriptor;
import java.lang.reflect.InvocationTargetException;
import java.util.*;
import java.beans.BeanInfo;
import com.keansa.keansacloud.web.plan_data.Plan_DataEdit;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

import java.util.Map;

public class Plan_DataBrowse extends AbstractLookup {
    private Filter filter;
    private FieldGroup fieldGroup;
    private CreateAction create;
    private EditAction edit;

    private boolean checkChanges = false;

    public void init(Map<String, Object> params) {
          create.setBeforeActionPerformedHandler(() -> {
            WindowManager.OpenType openType1 = create.getOpenType();
            Map<String,Object> windowParams = create.getWindowParams();
            Class aClass = WindowParams.ITEM.getClass();
            String str = create.getWindowId();
            String widowId = create.getWindowId();
         //   WindowManager.OpenMode.valueOf(widowId);
            Frame frame = getWrappedFrame();
            DataGrid component = (DataGrid)frame.getComponent("planDataGrid");
            DataGrid.Column column = component.getColumn("bucket_1");
            column.setCaption("Bucket Value");

          //  Plan_DataEdit.methodCalled();
           // Component component = frame.getComponent("fieldGroup");
           // FrameContext frameContext = WindowParams.ITEM.get(getContext());
          //  Set setVal = windowParams.entrySet().iterator();
         /*   long i = 0;
            Iterator<Map.Entry<String, Object>> it = windowParams.entrySet().iterator();
            while (it.hasNext()) {
                Map.Entry<String, Object> pair =;
               // i += pair.getKey() + pair.getValue();
           /* DataGrid.Column column = planDataGrid.getColumn("bucket_1");
            column.setCaption("Bucket Value");
            MetaPropertyPath metaPropertyPath = column.getPropertyPath();
            MetaProperty metaProperty = metaPropertyPath.getMetaProperty();*/
            showNotification(" create.setBeforeActionPerformedHandler");
            return true;



I suggest that you use CreateAction#setWindowParamsSupplier in your browser screen and obtain label values from the window params in the edit screen. I think it is a more suitable way for you.