Display image/icon in a table column

Good night, I would like some guidance on what is the best way, what I have set up below or is there another more efficient and correct way to display an image / icon in a table.

looking and doing some tests I managed to display an image/icon in the table

one of the topics I looked

the code is like this now

in the controller block

@Install(to = "retornoPedidoesTable.imgSituacao", subject = "columnGenerator")
private ComponentReturnOrderTableImgSituacaoColumnGenerator(br.inf.mfp.gestaoadministrativa.entity.RetornoRequestReturnOrder) {
    Label<String> img1 = uiComponents.create(Label.NAME);
    img1.setId("imgStatus");
    img1.setStyleName("bordesless");
    //img1.setIcon(icons.get(JmixIcon.ADD_ACTION));
    img1.setIconFromSet(JmixIcon.ADD_ACTION);
    return img1;
}

in XML the table looks like this

        <table id="retornoPedidoesTable" width="100%" dataContainer="retornoPedidoDc">
            <buttonsPanel>
                <button id="createBtn" caption="msg://update"/>
                <button id="editBtn" caption="msg://Edit"/>
                <button id="removeBtn" caption="msg://remove"/>
                <button id="ClearBtn" caption="msg://clear"/>
            </buttonsPanel>
            <columns>
                <column id="order" visible="false"/>
                <column id="imgSituation" width="40px"/>
                <column id="item"/>
                <column id="quantityInformed"/>
            </columns>
        </table>

my question is in the following, is it the best way or the most correct, the way the image is being displayed?

the question may seem simple, but the documentation is still not as advanced and diversified as in Cuba.

Hi,

In case of Icons (not images), i’d recommend using IconProvider (see demo). In case of image files, a generated column that returns the Image component is the correct solution.

Regards,
Gleb

very simple, very easy

thank you so much