Custom Browser AbstractWindow+AbstractFrame

I need to create a custom browser using a GridLayout where for each cell add a custom component. Custom component has 3 labels that rapresent 3 field of Entity. What is best approch ?

I am thinking to create an Entity Frame and use is like array frames into GridLayout in other Empty Screen. Is right mode ?

Follow code has a AbstractWindow with collection datasource and the AbstractFrame with datasource.
Now I’ve the problem is not clear for me how pass datasource to the Frame. I’ve already single Entity into the iteration loop. How can I do ?

<window xmlns="http://schemas.haulmont.com/cuba/window.xsd"
    caption="msg://caption"
    class="com.company.sinotticoweb.web.sinotticocompleto.Sinottico"
    messagesPack="com.company.sinotticoweb.web.sinotticocompleto">
<dsContext>
    <collectionDatasource id="sinotticoCompletoesDs"
                          class="com.company.sinotticoweb.entity.SinotticoCompleto"
                          view="_local">
        <query>
            <![CDATA[select e from sinotticoweb$SinotticoCompleto e]]>
        </query>
    </collectionDatasource>
</dsContext>
<dialogMode height="600"
            width="800"/>
<layout>
    <grid id="mainGrid"
          spacing="true">
        <columns count="2"/>
        <rows>
            <row/>
            <row/>
        </rows>
    </grid>
</layout>
public class Sinottico extends AbstractWindow {
@Inject
private CollectionDatasource<KeyValueEntity, Object> sinotticoCompletoesDs;
@Inject
private ComponentsFactory componentsFactory;
@Inject
private GridLayout mainGrid;


@Override
public void init(Map<String, Object> params) {
    super.init(params);

    mainGrid.setRows(5);
    mainGrid.setColumns(5);

    sinotticoCompletoesDs.refresh();

    int nCelle=0, riga=0, colonna=0;
    for (Object entity : sinotticoCompletoesDs.getItems()) {
        if (nCelle<25) {
            SinotticoCompleto sc = (SinotticoCompleto) entity;
            Cella c = (Cella) openFrame(null, "sinotticoweb$Cella", null); // how pass datasource ????
            mainGrid.add(c, colonna, riga);

            if (colonna+1>4){
                colonna=0;
                riga++;
            }
            else
                colonna++;

        }
    }
}

}

And Frame

<window xmlns="http://schemas.haulmont.com/cuba/window.xsd"
    class="com.company.sinotticoweb.web.sinotticocompleto.Cella"
    messagesPack="com.company.sinotticoweb.web.sinotticocompleto">
<dsContext>
    <datasource id="sinotticoCompletoDs"
                class="com.company.sinotticoweb.entity.SinotticoCompleto"
                view="_local"/>
</dsContext>
<dialogMode height="600"
            width="800"/>
<layout>
    <textField datasource="sinotticoCompletoDs"
               editable="false"
               property="testo"/>
</layout>
public class Cella extends AbstractFrame {

}

Hi, @fala70

you can pass a datasource in openFrame method params. Is it suitable for you?

Regards,
Daniil.