IDEMPIERE-369 Master Detail layout improvements. Make use of the ad_tab.isSingleRow for detail tabs and onNew event - only auto switch to form view if isSingleRow=Y.
This commit is contained in:
parent
15208de636
commit
226a1d9b86
|
@ -1526,6 +1526,18 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
||||||
toolbar.enableIgnore(true);
|
toolbar.enableIgnore(true);
|
||||||
toolbar.enablePrint(adTabbox.getSelectedGridTab().isPrinted());
|
toolbar.enablePrint(adTabbox.getSelectedGridTab().isPrinted());
|
||||||
toolbar.enableReport(true);
|
toolbar.enableReport(true);
|
||||||
|
if (adTabbox.getSelectedGridTab().isSingleRow())
|
||||||
|
{
|
||||||
|
if (adTabbox.getSelectedTabpanel().isGridView())
|
||||||
|
{
|
||||||
|
adTabbox.getSelectedTabpanel().switchRowPresentation();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (adTabbox.getSelectedTabpanel().isGridView())
|
||||||
|
{
|
||||||
|
adTabbox.getSelectedTabpanel().getGridView().editCurrentRow();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -108,9 +108,16 @@ public class CompositeADTabbox extends AbstractADTabbox
|
||||||
@Override
|
@Override
|
||||||
public void onCallback(Boolean result) {
|
public void onCallback(Boolean result) {
|
||||||
if (result) {
|
if (result) {
|
||||||
onEditDetail(row, true);
|
if (getSelectedDetailADTabpanel().getGridTab().isSingleRow()) {
|
||||||
if (!adWindowPanel.getActiveGridTab().isNew())
|
onEditDetail(row, true);
|
||||||
adWindowPanel.onNew();
|
if (!adWindowPanel.getActiveGridTab().isNew())
|
||||||
|
adWindowPanel.onNew();
|
||||||
|
} else {
|
||||||
|
if (!getSelectedDetailADTabpanel().getGridTab().isNew()) {
|
||||||
|
getSelectedDetailADTabpanel().getGridTab().dataNew(false);
|
||||||
|
getSelectedDetailADTabpanel().getGridView().editCurrentRow();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -232,7 +232,7 @@ public class DetailPane extends Panel implements EventListener<Event>, IdSpace {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (adtab != null && adtab.isDetailPaneMode()) {
|
if (adtab != null && adtab.isDetailPaneMode()) {
|
||||||
onEdit(false);
|
onEdit(adtab.getGridTab().isSingleRow());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -820,4 +820,11 @@ public class GridView extends Vbox implements EventListener<Event>, IdSpace
|
||||||
public GridField[] getFields() {
|
public GridField[] getFields() {
|
||||||
return gridField;
|
return gridField;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void editCurrentRow() {
|
||||||
|
if (!renderer.isEditing()) {
|
||||||
|
renderer.editCurrentRow();
|
||||||
|
renderer.setFocusToEditor();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue