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 8916861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:21:22+00:00 2026-06-15T05:21:22+00:00

I have a comandButton which calls to a confirmDialog which must eliminate a user,

  • 0

I have a comandButton which calls to a confirmDialog which must eliminate a user, but it never calls method that there is in its actionListener.

This is the code:

<p:dialog id="dialogEditar" widgetVar="dialogEditar" header="#{bundle_usuarios.usuarios_titulo_edicion}" resizable="false">
    <p:panelGrid id="panelEditar"
        <p:row>
            <p:column>
                <p:commandButton id="btModificar" type="submit" actionListener="#{usuariosMB.modificarUsuario()}"
                             value="#{bundle_general.general_modificar}" update="formEditar" rendered="#{usuariosMB.permisoCtMenu}"/>
            </p:column>
            <p:column colspan="7">
                <p:commandButton id="btEliminar" type="button" onclick="confirmation.show()"
                              value="#{bundle_general.general_eliminar}"/>
            </p:column>
        </p:row>
    </p:panelGrid>
    <p:confirmDialog appendToBody="true" id="confirmDialog" message="#{bundle_usuarios.usuarios_confirma}"
                     header="#{bundle_usuarios.usuarios_titulo_confirma_eliminar}" severity="alert" widgetVar="confirmation">
        <p:commandButton id="confirm" type="submit" value="#{bundle_usuarios.usuarios_aceptar_eliminar}"
                         update="dialogEditar, formEditar" oncomplete="confirmation.hide()"
                         actionListener="#{usuariosMB.eliminarUsuario()}" rendered="#{usuariosMB.permisoCtMenu}" /> 
        <p:commandButton id="decline" value="#{bundle_usuarios.general_cancelar}" onclick="confirmation.hide()" type="button" />
    </p:confirmDialog>
</p:dialog>

If i put the same code, without confirmDialog, it runs and deletes the user without problems.

The code that runs with success is the next:

<p:dialog id="dialogEditar" widgetVar="dialogEditar" header="#{bundle_usuarios.usuarios_titulo_edicion}" resizable="false">
    <p:panelGrid id="panelEditar"
        <p:row>
            <p:column>
                <p:commandButton id="btModificar" type="submit" actionListener="#{usuariosMB.modificarUsuario()}"
                             value="#{bundle_general.general_modificar}" update="formEditar" rendered="#{usuariosMB.permisoCtMenu}"/>
            </p:column>
            <p:column colspan="7">
                 <p:commandButton id="btEliminar" type="submit" actionListener="#{usuariosMB.eliminarUsuario()}" value="#{bundle_general.general_eliminar}" update="dialogEditar, formEditar" rendered="#{usuariosMB.permisoCtMenu}"/>
            </p:column>
        </p:row>
    </p:panelGrid>
</p:dialog>

Another thing, when I click on the commandButon with id=”confirm”, the confirmDialog never dissapear and it stays blocked in the window.

If you need more details, say me which require.
Please, any suggestion?
Thanks!

  • 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-15T05:21:23+00:00Added an answer on June 15, 2026 at 5:21 am

    If your dialog placed in a h:form it is a good exercise to carry out from this form and place a h:form inside the dialog. Still you would be able to access via widgetVar

    <h:form>
    ....
    </h:form>
    
    <p:dialog>
    
    <h:form>
    ...
    <p:commandButton />
    <h:form>
    
    </p:dialog>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a dataTable and in each row there is a commandButton which calls
I have a form which, when the button gets clicked by a user, redirects
I have a visualforce page which is rendering correctly. There is a commandbutton Save
I have a JSF page that contains two subviews. Depending on which commandButton is
I have a user form with various textboxes which have the ControlSource property set
I have a web application which basically process entries of the user when the
I have a JSF page that includes a tree form tag which is rendered
I have page in which I edit some entity. That page has two command
I have richfaces page thru which i have to add/update/delete a user details. My
I have a controller that is stateless which takes care of processing forms. This

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.