Search in sources :

Example 6 with Execution

use of org.zkoss.zk.ui.Execution in project adempiere by adempiere.

the class AEnv method isInternetExplorer.

/**
     * @return true if user agent is internet explorer
     */
public static boolean isInternetExplorer() {
    Execution execution = Executions.getCurrent();
    if (execution == null)
        return false;
    Object n = execution.getNativeRequest();
    if (n instanceof ServletRequest) {
        String userAgent = Servlets.getUserAgent((ServletRequest) n);
        if (userAgent.indexOf("MSIE ") >= 0) {
            return true;
        }
    }
    return false;
}
Also used : ServletRequest(javax.servlet.ServletRequest) Execution(org.zkoss.zk.ui.Execution)

Aggregations

Execution (org.zkoss.zk.ui.Execution)6 ServletRequest (javax.servlet.ServletRequest)3 ArrayList (java.util.ArrayList)1 Properties (java.util.Properties)1 HttpSession (javax.servlet.http.HttpSession)1 IDesktop (org.adempiere.webui.desktop.IDesktop)1 MSession (org.compiere.model.MSession)1 MTheme (org.compiere.model.MTheme)1 MUser (org.compiere.model.MUser)1 Language (org.compiere.util.Language)1 Component (org.zkoss.zk.ui.Component)1 Page (org.zkoss.zk.ui.Page)1 Session (org.zkoss.zk.ui.Session)1 UiException (org.zkoss.zk.ui.UiException)1 ExecutionCarryOver (org.zkoss.zk.ui.impl.ExecutionCarryOver)1 DesktopCache (org.zkoss.zk.ui.sys.DesktopCache)1 DesktopCtrl (org.zkoss.zk.ui.sys.DesktopCtrl)1 ExecutionCtrl (org.zkoss.zk.ui.sys.ExecutionCtrl)1 SessionCtrl (org.zkoss.zk.ui.sys.SessionCtrl)1 Visualizer (org.zkoss.zk.ui.sys.Visualizer)1