Exception in dataGrid action

Hi,
We have a view with dataGrid component into a tab with two actions but when we create the view this exception raise : io.jmix.flowui.exception.GuiDevelopmentException: Can’t find component: direccionsPersona for action: direccionsPersona.createAction

The tab and dataGrid declaration is

"<tab id="adrecesTab" label="Adreces">
	<dataGrid id="direccionsPersona" dataContainer="direccionsDc">
		<columns>
			<column property="c_direccio.c_tipus_direccio"/>
            <column property="c_direccio.d_adreca"/>
		</columns>
        <actions>
            <action id="createAction" type="list_create"/>
            <action id="removeAction" type="list_remove"/>
        </actions>
	</dataGrid>
    <simplePagination/>
    <hbox id="buttonsDireccionsPanel">
        <button id="addDireccioBtn" action="direccionsPersona.createAction"/>
        <button id="removeDireccioBtn" action="direccionsPersona.removeAction"/>
    </hbox>
</tab>"

Thnxs,

Hi!

I couldn’t reproduce the problem, the DataGrid with actions was successfully rendered inside the tab:
image

Also, the code you provided has a bug. A tab element can only have one child element inside.
In your case DataGrid, SimplePagination and hbox buttons panel inside the tab (3 components).

Wrap all these components in some kind of vbox so that they display correctly:

        <tabSheet>
            <tab id="tab" label="Tab">
                <vbox>
                    <hbox id="buttonsPanel" classNames="buttons-panel">
                        <!-- buttons -->
                    </hbox>
                    <dataGrid id="usersDataGrid"
                              width="100%"
                              columnReorderingAllowed="true"
                              minHeight="20em"
                              dataContainer="usersDc">
                        <actions>
                            <!-- actions -->
                        </actions>
                        <columns resizable="true">
                           <!-- columns -->
                        </columns>
                    </dataGrid>
                </vbox>
            </tab>
        </tabSheet>

Regards,
Dmitriy

That’s the solution,
Thank’s Dimitriy,