Skip to content

Table does not update after saving and closing dialog #5706

Description

@Yarik2308

Environment

Jmix version: 3.0.0

Bug Description

When editing an entity in the dialog, if you trigger the detail_save action and then click the "X" (close) button, the table does not update.

Steps To Reproduce

  1. In the newly generated project, add the "detail save" action in the user editor.
  2. In the table view, update the editAction
                <action id="editAction" type="list_edit">
                    <properties>
                        <property name="openMode" value="DIALOG"/>
                    </properties>
                </action>
Image Image Image Image

same for StandardTabbedModeMainView
with <action id="editAction" type="list_edit"/>

Image Image

Current Behavior

Entity is not updated in table

Expected Behavior

Entity updated in table

Sample Project

jmix3.zip

Proposed solution

Override fireEvent in StandardDetailView

    @Override
    protected void fireEvent(ComponentEvent<?> componentEvent) {
        if (componentEvent instanceof AfterCloseEvent closeEvent && closeEvent.closedWith(StandardOutcome.CLOSE) && isSaveActionPerformed()) {
            AfterCloseEvent afterCloseEvent = new AfterCloseEvent(this, StandardOutcome.SAVE.getCloseAction());
            super.fireEvent(afterCloseEvent);
        } else {
            super.fireEvent(componentEvent);
        }
    }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions