title: JSF ConversationScoped bean not elevating scope between POSTs
body: <p>I have a bean with an action method called view() and a field of type MyObject:</p>
  
  <pre><code>@ManagedBean
  @ConversationScoped
  public class MyBean implements Serializable{
      private @Inject Conversation conversation; //has getter and setter
      private MyObject object; //has getter and setter
      ... other fields follow
  
      public String view(MyObject selectedObj){
          conversation.begin();
          return "success";
      }
  
      public String getSomeProperty(){
              return object.getProperty();
      }
  
      ...other methods follow
  }
  </code></pre>
  
  <p>On screen1.xhtml I am using primefaces p:dataTable with var="obj" to output rows with a commandButton to view the object of the row the user clicks on. The button on each row looks like the following.</p>
  
  <pre><code>&lt;p:commandButton action="#{myBean.view(obj)}"
  ajax="false" title="View Clone" image="ui-icon ui-icon-locked"/&gt;
  </code></pre>
  
  <p>When the user clicks on a commandButton in one of the rows, they are taken to page2.xhtml where more detailed info about the obj is displayed. This works correctly and displays the details. When I am inside of the view(MyObject selectedObj) action method, I immediately call conversation.begin(), assign this.obj = selectedObj, and user gets page2.xhtml. </p>
  
  <p>However, when the user clicks a commandButton on page2 it should redisplay with different information from the obj that was assigned from the view() action call that happened when they came from page1 because the scope was elevated to conversation. This is not happening. The obj field is null in the bean when the scope should have prevented it from being lost. So when they clicked a commandButton on page2, it gives null pointer exception when the page tries to resolve #{myBean.someProperty}. </p>
  
  <p>What am I missing? Thank you for any help.</p>