IDEMPIERE-3538 NPE happen if show dialog at time not yet complete login
This commit is contained in:
parent
ed891d0c71
commit
624b14b51f
|
@ -459,6 +459,8 @@ public class AdempiereWebUI extends Window implements EventListener<Event>, IWeb
|
|||
}
|
||||
if (getDesktop() != null && getDesktop().getSession() != null) {
|
||||
getDesktop().getSession().setAttribute(CLIENT_INFO, clientInfo);
|
||||
} else if (Executions.getCurrent() != null){
|
||||
Executions.getCurrent().getSession().setAttribute(CLIENT_INFO, clientInfo);
|
||||
}
|
||||
|
||||
Env.setContext(Env.getCtx(), "#clientInfo_desktopWidth", clientInfo.desktopWidth);
|
||||
|
@ -540,6 +542,11 @@ public class AdempiereWebUI extends Window implements EventListener<Event>, IWeb
|
|||
Executions.sendRedirect("index.zul");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClientInfo getClientInfo() {
|
||||
return clientInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string for setupload
|
||||
*/
|
||||
|
|
|
@ -103,7 +103,7 @@ public class ClientInfo implements Serializable {
|
|||
* @return the current clientinfo instance
|
||||
*/
|
||||
public static ClientInfo get() {
|
||||
return SessionManager.getAppDesktop().getClientInfo();
|
||||
return SessionManager.getSessionApplication().getClientInfo();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -67,5 +67,8 @@ public interface IWebClient {
|
|||
* @return keylistener
|
||||
*/
|
||||
public abstract Keylistener getKeylistener();
|
||||
|
||||
|
||||
default ClientInfo getClientInfo() {
|
||||
return getAppDeskop().getClientInfo();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue