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.enablePrint(adTabbox.getSelectedGridTab().isPrinted());
|
||||
toolbar.enableReport(true);
|
||||
if (adTabbox.getSelectedGridTab().isSingleRow())
|
||||
{
|
||||
if (adTabbox.getSelectedTabpanel().isGridView())
|
||||
{
|
||||
adTabbox.getSelectedTabpanel().switchRowPresentation();
|
||||
}
|
||||
}
|
||||
|
||||
if (adTabbox.getSelectedTabpanel().isGridView())
|
||||
{
|
||||
adTabbox.getSelectedTabpanel().getGridView().editCurrentRow();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -108,9 +108,16 @@ public class CompositeADTabbox extends AbstractADTabbox
|
|||
@Override
|
||||
public void onCallback(Boolean result) {
|
||||
if (result) {
|
||||
if (getSelectedDetailADTabpanel().getGridTab().isSingleRow()) {
|
||||
onEditDetail(row, true);
|
||||
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()) {
|
||||
onEdit(false);
|
||||
onEdit(adtab.getGridTab().isSingleRow());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -820,4 +820,11 @@ public class GridView extends Vbox implements EventListener<Event>, IdSpace
|
|||
public GridField[] getFields() {
|
||||
return gridField;
|
||||
}
|
||||
|
||||
public void editCurrentRow() {
|
||||
if (!renderer.isEditing()) {
|
||||
renderer.editCurrentRow();
|
||||
renderer.setFocusToEditor();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue