コード例 #1
0
 protected HttpSession getSession() {
   RequestContext reqCtx = RequestContext.lookup();
   if (reqCtx != null) {
     CommandRequest request = reqCtx.getRequest();
     if (request != null) {
       Panel currentPanel = RequestContext.lookup().getActivePanel();
       if (currentPanel != null) {
         return currentPanel.getPanelSession();
       } else {
         if (log.isDebugEnabled())
           log.debug("Using a PanelScoped bean outside a panel. Will default to SessionScoped.");
         return request.getSessionObject();
       }
     }
   }
   return null;
 }