IDEMPIERE-520 Master/Detail bugs found using Production window. Fixed regression after the 6.5.1 upgrade.

This commit is contained in:
Heng Sin Low 2013-01-12 00:08:08 +08:00
parent ae93d9ecc6
commit ebb76fd02c
6 changed files with 70 additions and 44 deletions

View File

@ -1226,6 +1226,7 @@ DataStatusListener, IADTabpanel, IdSpace
@Override
public void setDetailPaneMode(boolean detailPaneMode) {
if (this.detailPaneMode != detailPaneMode) {
this.detailPaneMode = detailPaneMode;
if (detailPaneMode) {
detailPane = null;
@ -1239,6 +1240,7 @@ DataStatusListener, IADTabpanel, IdSpace
this.setVflex("true");
listPanel.setDetailPaneMode(detailPaneMode);
}
}
/**
* Get all visible button editors

View File

@ -1399,7 +1399,10 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
}
//
if (!detailTab)
{
adTabbox.evaluate(e);
}
toolbar.enablePrint(adTabbox.getSelectedGridTab().isPrinted());
toolbar.enableReport(true);

View File

@ -319,12 +319,14 @@ public class CompositeADTabbox extends AbstractADTabbox
private void activateDetailADTabpanel() {
if (detailPane != null && detailPane.getParent() != null) {
IADTabpanel tabPanel = detailPane.getSelectedADTabpanel();
if (tabPanel != null) {
tabPanel.activate(true);
if (!tabPanel.isGridView()) {
tabPanel.switchRowPresentation();
}
}
}
}
@Override
protected void updateTabState() {
@ -516,7 +518,7 @@ public class CompositeADTabbox extends AbstractADTabbox
}
IADTabpanel detailTab = detailPane.getSelectedADTabpanel();
if (detailTab != null) {
//check data action
String uuid = (String) execution.getAttribute(CompositeADTabbox.class.getName()+".dataAction");
if (uuid != null && uuid.equals(detailTab.getUuid())) {
@ -537,6 +539,7 @@ public class CompositeADTabbox extends AbstractADTabbox
}
detailTab.activate(true);
detailTab.setDetailPaneMode(true);
}
detailPane.setVflex("true");
}
}

View File

@ -537,9 +537,13 @@ public class DetailPane extends Panel implements EventListener<Event>, IdSpace {
Tab tab = (Tab) tabbox.getTabs().getChildren().get(i);
tab.setVisible(visible);
if (tab.getLinkedPanel() != null)
if (tab.isSelected()) {
tab.setSelected(false);
}
if (tab.getLinkedPanel() != null) {
tab.getLinkedPanel().setVisible(visible);
}
}
public boolean isTabVisible(int i) {
if (i < 0 || tabbox.getTabs() == null || i >= tabbox.getTabs().getChildren().size())

View File

@ -167,10 +167,12 @@ public class GridView extends Vbox implements EventListener<Event>, IdSpace
}
public void setDetailPaneMode(boolean detailPaneMode) {
if (this.detailPaneMode != detailPaneMode) {
this.detailPaneMode = detailPaneMode;
pageSize = detailPaneMode ? DEFAULT_DETAIL_PAGE_SIZE : MSysConfig.getIntValue(MSysConfig.ZK_PAGING_SIZE, 20);
updatePaging();
}
}
public boolean isDetailPaneMode() {
return this.detailPaneMode;

View File

@ -45,6 +45,18 @@ public class Tabpanel extends org.zkoss.zul.Tabpanel implements IdSpace
return enabled;
}
@Override
public boolean setVisible(boolean visible) {
// TODO Auto-generated method stub
return super.setVisible(visible);
}
@Override
protected void setVisibleDirectly(boolean visible) {
// TODO Auto-generated method stub
super.setVisibleDirectly(visible);
}
public void setEnabled(boolean enabled)
{
this.enabled = enabled;