https://sourceforge.net/tracker/?func=detail&atid=955896&aid=2912815&group_id=176962 [JasperReport in process problem]
- fallback to highlighted mode if modal mode is not available
This commit is contained in:
parent
a4b23664f6
commit
b32c97c23d
|
@ -23,6 +23,7 @@ import org.adempiere.webui.part.AbstractUIPart;
|
|||
import org.compiere.model.MMenu;
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.Env;
|
||||
import org.zkoss.zk.ui.event.Events;
|
||||
|
||||
/**
|
||||
* Base class for desktop implementation
|
||||
|
@ -35,6 +36,7 @@ public abstract class AbstractDesktop extends AbstractUIPart implements IDesktop
|
|||
|
||||
private List<Object> windows = null;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private static final CLogger logger = CLogger.getCLogger(AbstractDesktop.class);
|
||||
|
||||
public AbstractDesktop() {
|
||||
|
@ -186,14 +188,22 @@ public abstract class AbstractDesktop extends AbstractUIPart implements IDesktop
|
|||
*/
|
||||
protected void showModal(Window win)
|
||||
{
|
||||
try
|
||||
{
|
||||
win.doModal();
|
||||
}
|
||||
catch(InterruptedException e)
|
||||
{
|
||||
|
||||
}
|
||||
//fall back to highlighted if can't execute doModal
|
||||
if (Events.inEventListener())
|
||||
{
|
||||
try
|
||||
{
|
||||
win.doModal();
|
||||
}
|
||||
catch(InterruptedException e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
showHighlighted(win, null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue