Screen Master Detail Fragment

Follow my code, is side of editBox of a screen master detail. I want use a fragment for reuse it in other screens. As you can see I had to put the fragment inside 2 containers a form and a tabshet, otherwise fragment was not enabled and disabled correctly when entering edit mode.

<vbox id="editBox" height="100%" margin="false,false,false,true" align="TOP_LEFT"  spacing="true">

                <form id="form" dataContainer="prodottoDc">
                    <tabSheet id="tabSheet">
                        <tab id="">
                            <fragment id="prodottoFragment" screen="demo_ProdottoFragment"/>
                <hbox id="actionsPane" spacing="true" visible="false">
                    <button id="saveBtn" action="save"/>
                    <button id="cancelBtn" action="cancel"/>
                    <button id="configWizardBtn" invoke="onConfigWizardBtnClick" caption="Config Wizard"/>

Looking code of CUBA that is function that enable and disable controls:

    protected void initEditComponents(boolean enabled) {
            TabSheet tabSheet = getTabSheet();
            if (tabSheet != null) {
                ComponentsHelper.walkComponents(tabSheet, (component, name) -> {
                    if (component instanceof FieldGroup) {
                        ((FieldGroup) component).setEditable(enabled);
                    } else if (component instanceof Table) {
                        ((Table) component).getActions().forEach(action -> action.setEnabled(enabled));
                    } else if (!(component instanceof ComponentContainer)) {

is possible include a getFragment function that iterate all childs components to enable and disable ?

You can use the same ComponentsHelper.walkComponents() method to iterate child components of a fragment, e.g.:

private MyFragment myFragment;

private void hideComponents() {
    ComponentsHelper.walkComponents(myFragment.getFragment(), (component, name) -> {