title: p:commandButton doesn't execute f:setPropertyActionListener in JSF 2
body: <p>I work with JSF2 and PrimeFaces and I want to go to another page with this button: </p>
  
  <pre><code>&lt;p:column&gt;
      &lt;h:commandButton action="userCommand" value="list of commands" &gt;
          &lt;f:setPropertyActionListener value="#{car}" target="#{userController.u1}" /&gt;  
      &lt;/h:commandButton&gt;
  &lt;/p:column&gt;
  </code></pre>
  
  <p>On the target page I use some information from <code>userController.u1</code>, but the <code>&lt;f:setPropertyActionListener&gt;</code> tag doesn't seem to be executed.</p>
  
  <p>I thus get the following exception: </p>
  
  <pre><code>java.lang.NullPointerException
  </code></pre>
  
  <p>In response to Arjan, thank you for your detailed response, but I think there is another method to do this, instead of using a new managedBean as I did in my question, I use one (sessionScoped) that is already instantiated and then I called it in the new constructor to retrieve the value,</p>
  
  <p>How do you find this solution? Can you help me to call the other managedBean from the constructor of the new managedBean?</p>
  
  <p>Because I tested this : </p>
  
  <pre><code>  ELContext elContext = context.getELContext();
      Application application = context.getApplication();
      String userid = (String) application.evaluateValueExpressionGet(context,
              "#{userBean.userid}", String.class);
  </code></pre>
  
  <p>but I have a problem with "context". Do you have any idea?</p>