Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8521625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:52:47+00:00 2026-06-11T06:52:47+00:00

Ok folks, i’m have a issue here: My panels and ajax behavior suddenly stopped

  • 0

Ok folks, i’m have a issue here: My panels and ajax behavior suddenly stopped to work. They were running perfectly, but suddenly stopped to work. I my JSF page i have a dialog panel (confirmPanel, newPanel) that must be open on the click event of commandButtons (btnNew, btnExclude). Here is the code for the JSF page.

    <ui:define name="content">
        <f:view>
            <h:form id="frmPublico">
                <p:panelGrid columns="2" styleClass="ui-main-div">
                    <f:facet name="header">
                        <p:panelGrid columns="2">
                            <p:commandButton id="btnNew" value="Novo" onclick="wvNew.show();" type="button"/>
                        </p:panelGrid>
                    </f:facet>
                    <p:growl id="gGlobalMsgs" globalOnly="true" redisplay="false"/>
                    <p:dataTable id="dtPublico" value="#{publicoBean.lstDataTablePublico}" 
                             var="publico" paginator="true" rows="#{publicoBean.maximoLinhasTablePublico}" 
                             paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                             rowsPerPageTemplate="5,10" >

                        <f:facet name="header">
                            Públicos
                        </f:facet>
                        <p:column>
                            <p:commandButton type="button" id="btnEdit" image="ui-icon-pencil" /> 
                        </p:column>
                        <p:column>
                            <p:commandButton type="button" id="btnExclude" image="ui-icon-circle-close" onclick="wvConfirm.show()" /> 
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                Nome
                            </f:facet>
                            <h:outputText value="#{publico.nmePublico}" />
                        </p:column>
                        <p:column>
                            <f:facet name="header">
                                Tipo de público
                            </f:facet>
                            <h:outputText value="#{publico.tdTipoPublico}"  />
                        </p:column>

                        <f:facet name="footer">
                            Públicos
                        </f:facet>
                    </p:dataTable>

                    <f:facet name="footer">

                    </f:facet>
                </p:panelGrid>

                <!-- Caixas de diálogos -->
                <p:dialog id="dialogNovo" header="Novo público" widgetVar="wvNew" modal="true" appendToBody="false" >
                    <p:panelGrid columns="1">

                        <p:panelGrid columns="2" id="pnlNovoPublico">
                            <!-- Cabeçalho do grid -->
                            <f:facet name="header">
                                <!-- <p:messages id="info"/> -->
                                Cadastrar público
                            </f:facet>

                            <!-- Linha 1 -->
                            <h:outputLabel for="txtNomePublico" value="*Nome:"/>
                            <p:inputText id="txtNomePublico" value="#{publicoBean.nome}" required="true" requiredMessage="Digite o nome do público." />
                            <p:message for="txtNomePublico" redisplay="false" id="msgNomePublico" />

                            <!-- Linha 2 -->
                            <h:outputLabel for="ddlTipoPublico" value="*Tipo de público:"/>
                            <p:selectOneMenu id="ddlTipoPublico" value="#{publicoBean.tipoPublicoSelecionado}" effect="fade" 
                                         converter="#{publicoBean.conversor}" 
                                         required="true" requiredMessage="Selecione um tipo de público."> 
                                <f:selectItem itemLabel="Selecione um item..." itemValue=""/>
                                <f:selectItems value="#{publicoBean.lstMenuTipoPublico}" var="pt" itemLabel="#{pt.label}" itemValue="#{pt}"></f:selectItems>
                        </p:selectOneMenu>
                            <p:message for="ddlTipoPublico" redisplay="false" id="msgDdlTipoPublico" />

                        <!-- Rodapé do grid -->
                            <f:facet name="footer">
                                <p:commandButton actionListener="#{publicoBean.cadastrarPublico}" value="Cadastrar" icon="ui-icon-check" ajax="true" update="pnlNovoPublico, msgGlobal"/>
                            </f:facet>
                        </p:panelGrid>
                    </p:panelGrid>
                </p:dialog>

                <!-- Caixa de diálogo de confirmação -->
                <p:confirmDialog id="dialogConfirmExclusao" message="Tem certeza que deseja excluir este item?"
                             header="Confirmar exclusão" severity="alert" widgetVar="wvConfirm">
                    <p:commandButton id="btnConfirm" value="Continuar" oncomplete="wvConfirm.hide()"
                                 actionListener="#{publicoBean.excluirPublico}" />
                    <p:commandButton id="btnCancel" value="Cancelar" onclick="wvConfirm.hide()" type="button" /> 

                </p:confirmDialog>
            </h:form>
        </f:view>
    </ui:define>
</ui:composition>

The Id and WidVar attributes are different. When i open the Javascript console and hit wvNew and wvConfirm, they are undefined. What maybe happening?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T06:52:49+00:00Added an answer on June 11, 2026 at 6:52 am

    From PrimeFaces documentation:

    Use appendToBody with care as the page definition and html dom would
    be different, for example if dialog is inside an h:form component and
    appendToBody is enabled, on the browser dialog would be outside of
    form and may cause unexpected results. In this case, nest a form
    inside a dialog.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Folks, I have just joined a company where they are using WSAD 5.1 which
Folks, Apologies if this has been covered in another thread, but I have searched
Folks, why jQuery hover does not work? Here is the link - http://layot.prestatrend.com/ Thanks
Folks, My Issue Why is an HSQLDB file-based database I have pre-populated with a
Folks, Here's what I am trying to do: my script will be running as
folks! I have project in cc.net and this project nay start by 3 ways
Folks I am surprised to see my code working, that I dont have any
Folks I have a sealed class as follows. I want to extend this sealed
Folks, We have been using OpenXml APIs found in System.IO.Packaging for creating a package
Folks, i have the following problem. My website uses an iframe to select an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.