Problems opening a Select One Menu within a p:dialog

Asked

Viewed 21 times

-1

I own a select one menu within a p:dialog, I can see that it loads the data, but it doesn’t open, doesn’t drop down, outside the p:dialog it works normally.

I searched on but found no results.

My XHTML:

<p:dialog appendTo="@(body)"  header="Meu perfil" responsive="true" widgetVar="perfilModal" height="400" width="1000" resizable="false" >
   <h:form id="formularioAlterar">
      <p:outputPanel id="painelAlterar">
         <h:message for="msgValidador" />
         <div class="ui-g ui-fluid">
            <div class="ui-g-12">
               <p:outputLabel value="Selecione sua cidade:*" />
            </div>
            <div class="ui-g-12">
               <p:selectOneMenu filter="true" id="cidade" value="#{funcionarioMB.funcionario.idCidade}" required="true" requiredMessage="Necessário informar uma cidade" converter="omnifaces.SelectItemsConverter">
                  <f:selectItems value="#{funcionarioMB.cidades}" var="cidade" itemValue="#{cidade.idCidade}" itemLabel="#{cidade.nomeCidade} - #{cidade.sigla}" />
               </p:selectOneMenu>
               <p:message for="cidade" />
            </div>
            <br></br>
            <br></br>
            <p:commandButton value="Salvar" id="Salvar" styleClass="btn btn-success btn-block" action="#{funcionarioMB.AlterarPerfil()}" oncomplete="PF('mensagem').show()"/>
            <p:commandButton value="Cancelar" id="Cancelar" styleClass="btn btn-danger btn-block" oncomplete="PF('perfilModal').hide()"></p:commandButton>
            <br></br>
            <br></br>
         </div>
      </p:outputPanel>
   </h:form>
</p:dialog>
  • Note, I noticed that it opens behind the p:dialog

1 answer

0

Resolved with

appendTo="@this" within the Select One Menu

Browser other questions tagged

You are not signed in. Login or sign up in order to post.