IDEMPIERE-1684 Quick Info Widget. Fix quick info is not updated when switching tabs.

This commit is contained in:
Heng Sin Low 2014-08-13 14:56:16 +08:00
parent a177bd8c6e
commit 1b75bb4e78
2 changed files with 9 additions and 1 deletions

View File

@ -249,7 +249,7 @@ public class ADWindow extends AbstractUIPart
* @return adwindow instance if found, null otherwise * @return adwindow instance if found, null otherwise
*/ */
public static ADWindow findADWindow(Component comp) { public static ADWindow findADWindow(Component comp) {
Component parent = comp.getParent(); Component parent = comp;
while(parent != null) { while(parent != null) {
if (parent.getAttribute(AD_WINDOW_ATTRIBUTE_KEY) != null) { if (parent.getAttribute(AD_WINDOW_ATTRIBUTE_KEY) != null) {
ADWindow adwindow = (ADWindow) parent.getAttribute(AD_WINDOW_ATTRIBUTE_KEY); ADWindow adwindow = (ADWindow) parent.getAttribute(AD_WINDOW_ATTRIBUTE_KEY);

View File

@ -671,6 +671,14 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
public void updateHelpContext(String ctxType, int recordId) { public void updateHelpContext(String ctxType, int recordId) {
Clients.response(new AuScript("zWatch.fire('onFieldTooltip', this);")); Clients.response(new AuScript("zWatch.fire('onFieldTooltip', this);"));
helpController.renderCtxHelp(ctxType, recordId); helpController.renderCtxHelp(ctxType, recordId);
GridTab gridTab = null;
Component window = getActiveWindow();
ADWindow adwindow = ADWindow.findADWindow(window);
if (adwindow != null) {
gridTab = adwindow.getADWindowContent().getActiveGridTab();
}
updateHelpQuickInfo(gridTab);
} }
@Override @Override