IDEMPIERE-5686 - Closing Browser Tab while Process Modal Dialog is Opened causes NPE (#1797)
* IDEMPIERE-5686 - Closing Browser Tab while Process Modal Dialog is Opened causes NPE * IDEMPIERE-5686 - fixes * IDEMPIERE-5650 - WProcessCtl fix * IDEMPIERE-5650 - move check to ShowMaskWrapper
This commit is contained in:
parent
86a91987e1
commit
4a35720457
|
@ -18,6 +18,7 @@ import org.adempiere.webui.component.Mask;
|
||||||
import org.adempiere.webui.part.UIPart;
|
import org.adempiere.webui.part.UIPart;
|
||||||
import org.zkoss.zk.au.out.AuScript;
|
import org.zkoss.zk.au.out.AuScript;
|
||||||
import org.zkoss.zk.ui.Component;
|
import org.zkoss.zk.ui.Component;
|
||||||
|
import org.zkoss.zk.ui.Executions;
|
||||||
import org.zkoss.zk.ui.util.Clients;
|
import org.zkoss.zk.ui.util.Clients;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -113,6 +114,7 @@ public class ShowMaskWrapper implements ISupportMask {
|
||||||
* @param comp
|
* @param comp
|
||||||
*/
|
*/
|
||||||
public static void setFlagShowMask (Component comp){
|
public static void setFlagShowMask (Component comp){
|
||||||
|
if(Executions.getCurrent() != null && Executions.getCurrent().getNativeRequest() != null)
|
||||||
comp.setAttribute(ISupportMask.READY_SHOW_MASK_FLAG, Integer.valueOf(1), Component.REQUEST_SCOPE);
|
comp.setAttribute(ISupportMask.READY_SHOW_MASK_FLAG, Integer.valueOf(1), Component.REQUEST_SCOPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,6 +124,7 @@ public class ShowMaskWrapper implements ISupportMask {
|
||||||
* @return true if flag exists
|
* @return true if flag exists
|
||||||
*/
|
*/
|
||||||
public static boolean hasFlagShowMask (Component comp){
|
public static boolean hasFlagShowMask (Component comp){
|
||||||
return (comp.getAttribute(ISupportMask.READY_SHOW_MASK_FLAG, Component.REQUEST_SCOPE) != null);
|
return (Executions.getCurrent() != null && Executions.getCurrent().getNativeRequest() != null)
|
||||||
|
&& (comp.getAttribute(ISupportMask.READY_SHOW_MASK_FLAG, Component.REQUEST_SCOPE) != null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2443,6 +2443,8 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
|
||||||
createT_Selection_InfoWindow(pInstanceID);
|
createT_Selection_InfoWindow(pInstanceID);
|
||||||
recordSelectedData.clear();
|
recordSelectedData.clear();
|
||||||
}else if (ProcessModalDialog.ON_WINDOW_CLOSE.equals(event.getName())){
|
}else if (ProcessModalDialog.ON_WINDOW_CLOSE.equals(event.getName())){
|
||||||
|
if (getDesktop() == null)
|
||||||
|
return;
|
||||||
if (processModalDialog.isCancel()){
|
if (processModalDialog.isCancel()){
|
||||||
//clear back
|
//clear back
|
||||||
m_results.clear();
|
m_results.clear();
|
||||||
|
|
Loading…
Reference in New Issue