Refresh table after create action call

Hi! i am trying to update an items table after create action is called, but new item not appear until i commit data and reopen screen, i have next code:


Hi @marc.delphi,

In your code, you open an edit screen with Parent DataContext, which should commit data to the current screen’s data context. Thus, all changes will be saved in parent DataContext (ArticuloConfig DataContext), not in the ArticuloConfigItem DataContext.
Remove the withParentDataContext(articuloConfigItemsDl.getDataContext()) line and it will work.

In addition, you can delete call because method already contains this call.

I put a link to documentation, where you can find additional information about Parent DataContext.


Hi, that is exaclty what i want to do. i want to commit changes from child entities on its parent context… in old framework i did something like this:

public class AlicuotaIVAEdit extends AlicuotaEdit {

    private GroupBoxLayout valoresBox;
    private WindowConfig windowConfig;
    private Metadata metadata;
    private CollectionDatasource<AlicuotaValorIVA, IdProxy<Long>> alicuotaValorIVAsDs;

    public void onCreate(Component source) {

        AlicuotaValorIVA alicuotaValor = metadata.create(AlicuotaValorIVA.class);
        String windowAlias = windowConfig.getEditorScreenId(alicuotaValor.getMetaClass());


        openEditor(windowAlias, alicuotaValor, WindowManager.OpenType.NEW_TAB, alicuotaValorIVAsDs)
                .addCloseWithCommitListener(() -> {



Replace a screenBuilders.addAfterCloseListener() call with screenBuilders.withListComponent(itemsTable) call.