title: JSF how to submit a form via onchange of a selectOneRadio
body: <p>I'm trying to submit a form when a selectOneRadio value is selected. I have the code below, but it's not getting inside my <code>#{contentEditorBacking.addNewsArticle}</code>. </p>
  
  <p>Does anyone know how i can get into the method when a selectOneRadio is clicked?</p>
  
  <pre><code>&lt;p:panel header="News Article Title"&gt;
      &lt;h:panelGrid columns="2"&gt;
          &lt;h:outputLabel for="title" value="Title" style="font-weight: bold;"/&gt;
          &lt;p:inputText id="title" required="true" value="#{contentEditorBacking.newsTitle}" /&gt;
          &lt;h:outputLabel value="Site" /&gt;
          &lt;p:selectOneRadio value="#{contentEditorBacking.selectedNews}" layout="pageDirection" onchange="submit()"&gt;
              &lt;f:selectItem itemLabel="Public" itemValue="Public" /&gt;
              &lt;f:selectItem itemLabel="Member" itemValue="Member" /&gt;
          &lt;/p:selectOneRadio&gt;
          &lt;p:commandButton value="submit" action="#{contentEditorBacking.addNewsArticle}" /&gt;
      &lt;/h:panelGrid&gt;
  &lt;/p:panel&gt;
  </code></pre>