title: retrieve session object on jsf view
body: <p>I have a <code>RequestController</code>(@ManagedBean and @ViewScoped) it is view scoped because we are using some ajax calls.</p>
  
  <p>I have a dataTable with result and each result with a button</p>
  
  <pre><code>&lt;p:commandButton action="#{requestController.requestDetail()}" icon="ui-icon-search" title="Detalhes"&gt;
       &lt;f:setPropertyActionListener target="#{requestController.backing.selectedRequestVO}" value="#{order}" /&gt;
  &lt;/p:commandButton&gt;
  </code></pre>
  
  <p>This method is receiving the selected object of my dataTable and is set on the session, it is working, the problem is that I don't know how to get this session object from my view.</p>
  
  <pre><code>public void requestDetail() throws IOException {
          FacesContext context = FacesContext.getCurrentInstance();
      context.getExternalContext().getSessionMap().put("requestDetail",backing.selectedRequestVO);context.getExternalContext().redirect(context.getExternalContext().getRequestContextPath() + "/views/request/detail.html");
      }
  </code></pre>
  
  <p>I need to access it from my view because this object has the request details.</p>