IDEMPIERE-369 Master Detail layout improvements. Redraw event must execute as the last event.
This commit is contained in:
parent
6ea176f61a
commit
f8c002536e
|
@ -573,7 +573,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
|||
adTabbox.getSelectedTabpanel().activate(true);
|
||||
|
||||
if (adTabbox.getSelectedTabpanel().isGridView()) {
|
||||
Events.postEvent(new Event(CompositeADTabbox.ON_POST_INIT_EVENT, adTabbox.getComponent()));
|
||||
Events.postEvent(new Event(CompositeADTabbox.ON_POST_INIT_EVENT, adTabbox.getComponent(), null));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ import org.zkoss.zk.ui.HtmlBasedComponent;
|
|||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zk.ui.event.Events;
|
||||
import org.zkoss.zk.ui.sys.ExecutionCtrl;
|
||||
import org.zkoss.zk.ui.util.Clients;
|
||||
import org.zkoss.zul.Menuitem;
|
||||
import org.zkoss.zul.Vlayout;
|
||||
|
@ -204,6 +205,11 @@ public class CompositeADTabbox extends AbstractADTabbox
|
|||
layout.addEventListener(ON_POST_INIT_EVENT, new EventListener<Event>() {
|
||||
@Override
|
||||
public void onEvent(Event event) throws Exception {
|
||||
ExecutionCtrl ctrl = (ExecutionCtrl) Executions.getCurrent();
|
||||
if (ctrl.getNextEvent() != null) {
|
||||
Events.postEvent(new Event(ON_POST_INIT_EVENT, layout));
|
||||
return;
|
||||
}
|
||||
LayoutUtils.redraw(layout);
|
||||
}
|
||||
});
|
||||
|
@ -561,7 +567,7 @@ public class CompositeADTabbox extends AbstractADTabbox
|
|||
detailTab.setDetailPaneMode(true, isUseVflexForDetailPane());
|
||||
detailPane.setVflex(Boolean.toString(isUseVflexForDetailPane()));
|
||||
if (!ADTabpanel.isUseSplitViewForForm() && !headerTab.isGridView()) {
|
||||
Events.echoEvent(new Event(DetailPane.ON_REDRAW_EVENT, detailPane));
|
||||
Events.postEvent(new Event(DetailPane.ON_REDRAW_EVENT, detailPane));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@ import org.zkoss.zk.ui.Page;
|
|||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zk.ui.event.Events;
|
||||
import org.zkoss.zk.ui.sys.ExecutionCtrl;
|
||||
import org.zkoss.zk.ui.util.Clients;
|
||||
import org.zkoss.zul.Caption;
|
||||
import org.zkoss.zul.Div;
|
||||
|
@ -396,6 +397,11 @@ public class DetailPane extends Panel implements EventListener<Event> {
|
|||
} else if (event.getName().equals(ADTabpanel.ON_DYNAMIC_DISPLAY_EVENT)) {
|
||||
updateProcessToolbar();
|
||||
} else if (event.getName().equals(ON_REDRAW_EVENT)) {
|
||||
ExecutionCtrl ctrl = (ExecutionCtrl) Executions.getCurrent();
|
||||
if (ctrl.getNextEvent() != null) {
|
||||
Events.postEvent(new Event(ON_REDRAW_EVENT, this));
|
||||
return;
|
||||
}
|
||||
LayoutUtils.redraw(this);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue