title: How to get an ajax event to fire from within a p:dialog
body: <p>So I have been stumped most of the day today trying to call a method in my backing bean when a component changes values.  Everything works correctly if my components are outside of a <code>&lt;p:dialog&gt;</code>, however when nested inside a dialog the server side never happens.  Originally I was working with the <code>&lt;p:calendar&gt;</code> control, but noticed it also didn't work with a simple inputText.  The following example works:</p>
  
  <pre><code>&lt;h:panelGrid columns="3"&gt;
      &lt;h:outputText value="Start"/&gt;
      &lt;p:inputText id="startOfRange" value="#{myBean.startRange}" valueChangeListener="#{myBean.startChanged}"&gt;
          &lt;p:ajax event="change" update="play"/&gt;
      &lt;/p:inputText&gt;
      &lt;h:outputText id="play" style="margin-left: 10px;" value="#{myBean.startRange}"/&gt;
  &lt;/h:panelGrid&gt;
  </code></pre>
  
  <p>My backing bean method looks like</p>
  
  <pre><code>public void startChanged(ValueChangeEvent event) { }
  </code></pre>
  
  <p>This method is invoked after a tab out of the inputText, however when wrapped like the following the method never gets invoked:</p>
  
  <pre><code>&lt;p:dialog widgetVar="efDlg" zindex="10" appendToBody="true" header="Create Custom Date Range"
        modal="true" height="375" width="450" resizable="false" closable="false" &gt;
  &lt;h:panelGrid columns="4"&gt;
      &lt;h:outputText value="Start"/&gt;
      &lt;p:inputText id="startOfRange" value="#{myBean.startRange}" valueChangeListener="#{myBean.startChanged}"&gt;
          &lt;p:ajax event="change" update="play"/&gt;
      &lt;/p:inputText&gt;
      &lt;h:outputText id="play" style="margin-left: 10px;" value="#{myBean.startRange}"/&gt;
      &lt;p:inputText id="endOfRange" value="#{myBean.endRange}" valueChangeListener="#{myBean.endChanged}"/&gt;
  &lt;/h:panelGrid&gt;
  &lt;div class="customRangeButtons"&gt;
      &lt;span&gt;
          &lt;p:commandButton value="Cancel" onstart="efDlg.hide();" actionListener="#{myBean.cancelCustomDateRange}" update="pGraphs"/&gt;
      &lt;/span&gt;
      &lt;span style="margin-left: 300px;"&gt;
          &lt;p:commandButton  value="Ok" type="submit" onstart="efDlg.hide();" action="#{myBean.saveCustomDateRange()}" update="pGraphs"/&gt;
      &lt;/span&gt;
  &lt;/div&gt;    
  &lt;/p:dialog&gt;
  </code></pre>
  
  <p>Note I am using Primefaces 2.2.1 with Mojarra 2.1.0.  Any ideas as to why I can't get the startChanged method to be called when the value has changed?</p>