IDEMPIERE-3032 Save clicking on detail button

This commit is contained in:
Carlos Ruiz 2016-02-17 17:11:24 +01:00
parent 80e519c760
commit 61ae46fb38
1 changed files with 2 additions and 1 deletions

View File

@ -93,7 +93,7 @@ public class CompositeADTabbox extends AbstractADTabbox
@Override
public void onEvent(Event event) throws Exception {
if (DetailPane.ON_EDIT_EVENT.equals(event.getName())) {
if (headerTab.getGridTab().isNew()) return;
if (headerTab.getGridTab().isNew() && ! headerTab.needSave(true, false)) return;
final int row = getSelectedDetailADTabpanel() != null
? getSelectedDetailADTabpanel().getGridTab().getCurrentRow()
@ -227,6 +227,7 @@ public class CompositeADTabbox extends AbstractADTabbox
IADTabpanel selectedPanel = getSelectedDetailADTabpanel();
if (selectedPanel == null) return;
int newIndex = selectedPanel.getTabNo();
selectedPanel.query();
Executions.getCurrent().setAttribute(AD_TABBOX_ON_EDIT_DETAIL_ATTRIBUTE, selectedPanel);
Event selectionChanged = new Event(ON_SELECTION_CHANGED_EVENT, layout, new Object[]{oldIndex, newIndex});