title: Primefaces overlay panel inside dialog only works once appended on body
body: <p>I have a overlay panel for a selection of values for an input text.
  If the overlay panel is appended to body it is displayed correctly and lays over the dialog. But in this case the ajax listner inside the overlay panel is only fired once. The second time (and all other times) the backing bean method is not executed from the listener.
  When I change appendToBody to false, the ajax listener inside the overlay panel fires every time, but the overlay panel is not display over the border of the dialog. Is there a solution for this? Tried to play with z-index without success.</p>
  
  <p>Edit:
  With the following overlay panel code it works:
      </p>
  
  <pre><code>&lt;!-- if overlay is appended to body, it works only once --&gt;
  &lt;p:overlayPanel widgetVar="#{widgetVar}" appendToBody="false" styleClass="clSelectionPanel" dynamic="true"&gt;
  
      &lt;p:tree value="#{clContentController.getClRoot()}" var="element"
          selectionMode="single" draggable="false" droppable="false" dynamic="true"&gt;
  
          &lt;p:ajax event="select" onstart="PF('#{widgetVar}').hide();" oncomplete="hitlistTableResized();"
              listener="#{clContentController.ok(element)}" immediate="true" update="@(.#{updateClass})" /&gt;
  
          &lt;p:treeNode ...
      &lt;/p:tree&gt;
  &lt;/p:overlayPanel&gt;
  </code></pre>
  
  <p></p>
  
  <p>On input text with buttons to add value and clear value:</p>
  
  <pre><code>    &lt;p:inputText value="#{curProperty.value}" readonly="true"
      required="#{curExtendedEntryField.required}" styleClass="editMaskChoiceInput"&gt;
  &lt;/p:inputText&gt;
  &lt;p:commandButton immediate="true"
      actionListener="#{clController.setSelectedObject(curProperty)}"
      oncomplete="PF('clSelectionPanelEditVar').loadContents('#{component.clientId}');"
      title="Add Value" process="@this" /&gt;
  &lt;p:commandButton immediate="true"
      actionListener="#{editPropertyBL.clearCSelection(curProperty)}" 
       title="Clear Value" update="@(.editMaskChoiceInput)" /&gt;
  </code></pre>
  
  <p>The trick in my case was to inclusion the overlay panel. I have done this in the input text field iteration before, but now I define it under the form:</p>
  
  <pre><code>&lt;h:form id="editPropertyFormId"&gt;
  &lt;ui:include src="/sections/dialog/editPropertyDialog.xhtml" /&gt;
  
  &lt;ui:include src="/sections/dialog/clSelectOverlay.xhtml"&gt;
      &lt;ui:param name="widgetVar" value="clSelectionPanelEditVar" /&gt;
      &lt;ui:param name="updateClass" value="editMaskChoiceInput" /&gt;
  &lt;/ui:include&gt;
  </code></pre>
  
  <p></p>
  
  <p>Regards
  Oliver</p>