title: How to refresh page in JSF on selectOneMenu selection?
body: <p>I have a page containing a PrimeFaces (2.2.1) Editor component, a Refresh button and a selectOneMenu, whose selection affects the contents of the Editor, as follows:</p>
  
  <pre><code>&lt;p:editor id="uploadedText" value="#{facilityDataUploadBean.uploadedText}"
            width="600" height="180" disabled="true" controls="" /&gt;
  &lt;h:commandButton value="Refresh" immediate="true" /&gt;
  &lt;h:selectOneMenu id="skipLines" styleClass="dropdown"
                   value="#{facilityDataUploadBean.skipLines}"&gt;
      &lt;f:selectItems value="#{facilityDataUploadBean.skipLinesList}" /&gt;
      &lt;f:ajax listener="#{facilityDataUploadBean.importParameterChanged}" /&gt;
  &lt;/h:selectOneMenu&gt;
  </code></pre>
  
  <p><code>facilityDataUploadBean.importParameterChanged</code> updates <code>facilityDataUploadBean.uploadedText</code>.  After changing the selectOneMenu value, the operator presses the Refresh button to refresh the page, including the contents of the <code>p:editor</code>.  (I cannot simply refresh the <code>p:editor</code> using AJAX, because it doesn't re-render correctly, at least in PF 2.2.1.)</p>
  
  <p>It seems like I ought to be able to accomplish the page refresh automatically when the <code>selectOneMenu</code> value is changed, but I've been unable to come up with a combination of attributes and events that will do that.  I've tried various combinations of <code>onchange="submit();"</code>, <code>immediate="true"</code> and <code>valueChangeListener</code> on the <code>selectOneMenu</code>, as well as <code>execute="@all/@form"</code>, <code>render="@all/@form"</code> on the <code>f:ajax</code> event, all to no avail.  My current workaround is to display a message asking the user to press the Refresh button whenever they change the <code>selectOneMenu</code> selection - pretty hokey.</p>