Search in sources :

Example 1 with TokenCommand

use of org.adempiere.webui.component.TokenCommand in project adempiere by adempiere.

the class AdempiereWebUI method onCreate.

public void onCreate() {
    Properties ctx = Env.getCtx();
    langSession = Env.getContext(ctx, Env.LANGUAGE);
    SessionManager.setSessionApplication(this);
    Session session = Executions.getCurrent().getDesktop().getSession();
    if (session.getAttribute(SessionContextListener.SESSION_CTX) == null || !SessionManager.isUserLoggedIn(ctx)) {
        //  logs in.
        if (ThemeUtils.setSystemDefaultTheme()) {
            return;
        }
        ;
        ThemeUtils.addBrowserIconAndTitle(this.getPage());
        loginDesktop = new WLogin(this);
        loginDesktop.createPart(this.getPage());
    } else {
        loginCompleted();
    }
    /* TODO-evenos: Check if this works correctly, its copied from idempiere */
    Executions.getCurrent().getDesktop().enableServerPush(true);
    Executions.getCurrent().getDesktop().addListener(new DrillCommand());
    Executions.getCurrent().getDesktop().addListener(new TokenCommand());
    Executions.getCurrent().getDesktop().addListener(new ZoomCommand());
    eventThreadEnabled = Executions.getCurrent().getDesktop().getWebApp().getConfiguration().isEventThreadEnabled();
}
Also used : ZoomCommand(org.adempiere.webui.component.ZoomCommand) DrillCommand(org.adempiere.webui.component.DrillCommand) TokenCommand(org.adempiere.webui.component.TokenCommand) Properties(java.util.Properties) MSession(org.compiere.model.MSession) HttpSession(javax.servlet.http.HttpSession) Session(org.zkoss.zk.ui.Session)

Aggregations

Properties (java.util.Properties)1 HttpSession (javax.servlet.http.HttpSession)1 DrillCommand (org.adempiere.webui.component.DrillCommand)1 TokenCommand (org.adempiere.webui.component.TokenCommand)1 ZoomCommand (org.adempiere.webui.component.ZoomCommand)1 MSession (org.compiere.model.MSession)1 Session (org.zkoss.zk.ui.Session)1