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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T22:02:51+00:00 2026-05-23T22:02:51+00:00

I am having trouble updating components in primefaces. Here is one example: <h:form> <p:panel

  • 0

I am having trouble updating components in primefaces. Here is one example:

            <h:form>
            <p:panel style="width: 350px;" header="Partial Process">
            <p:dataTable id="tablaPersonas" var="per" value="#{manejador.lista}">
                <p:column style="text-align: center;">
                    <f:facet name="header">
                        <h:outputText value="Nombre" />
                    </f:facet>
                    <h:outputText value="#{per.nombre}" />
                </p:column>
                <p:column style="text-align: center;">
                    <f:facet name="header">
                        <h:outputText value="Apellido" />
                    </f:facet>
                    <h:outputText value="#{per.apellido}" />
                </p:column>
                <p:column headerText="Editar" style="text-align: center;">
                    <p:commandButton value="Editar"/>
                </p:column>
             </p:dataTable>
    </p:panel>
            <p:commandButton value="Abrir" onclick="widgetDlgAgregar.show();"/>

            <p:dialog header="Agregar" widgetVar="widgetDlgAgregar" width="250" height="150" closable="true">
                <h:panelGrid id="gridAdd" columns="2">
                    <h:outputLabel value="Nombre:"/>
                    <p:inputText value="#{manejador.auxiliarAgregar.nombre}"/>

                    <h:outputLabel value="Apellido:"/>
                    <p:inputText value="#{manejador.auxiliarAgregar.apellido}"/>

                    <p:commandButton oncomplete="widgetDlgAgregar.hide();" update="tablaPersonas,gridAdd"  value="Agregar" actionListener="#{manejador.agregarPersona}"/>
                </h:panelGrid>
            </p:dialog>

        </h:form>

As you see, I click on a CommandButton called “Abrir” and a Dialog opens with “Agregar” as title. I fill in the input boxes and when I click the CommandButton “Agregar”, the DataTable isn’t updated. Why is this 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-05-23T22:02:51+00:00Added an answer on May 23, 2026 at 10:02 pm

    Oh sorry i think you forgot this update

    try this it should work

                <h:form prependId="false">
                <p:panel style="width: 350px;" header="Partial Process">
                    <p:dataTable id="tablaPersonas" var="per"
                        value="#{manejador.lista}">
                        <p:column style="text-align: center;">
                            <f:facet name="header">
                                <h:outputText value="Nombre" />
                            </f:facet>
                            <h:outputText value="#{per.nombre}" />
                        </p:column>
                        <p:column style="text-align: center;">
                            <f:facet name="header">
                                <h:outputText value="Apellido" />
                            </f:facet>
                            <h:outputText value="#{per.apellido}" />
                        </p:column>
                        <p:column headerText="Editar" style="text-align: center;">
                            <p:commandButton value="Editar" />
                        </p:column>
                    </p:dataTable>
                </p:panel>
                <p:commandButton value="Abrir" onclick="widgetDlgAgregar.show();" update="gridAdd" />
    
    
    
                <p:dialog header="Agregar" widgetVar="widgetDlgAgregar" width="250"
                    height="150" closable="true">
                    <h:panelGrid id="gridAdd" columns="2">
                        <h:outputLabel value="Nombre:" />
                        <p:inputText value="#{manejador.auxiliarAgregar.nombre}" />
    
                        <h:outputLabel value="Apellido:" />
                        <p:inputText value="#{manejador.auxiliarAgregar.apellido}" />
    
                        <p:commandButton oncomplete="widgetDlgAgregar.hide();"
                            update="tablaPersonas,gridAdd" value="Agregar"
                            actionListener="#{manejador.agregarPersona}" />
                    </h:panelGrid>
                </p:dialog>
    
            </h:form>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having trouble updating a partial that contains a nested_attributes_for form with AJAX.
I'm having some trouble updating a row in a MySQL database. Here is the
I'm having trouble with updating an ASP:UpdatePanel using javascript (jQuery). Here're what I have.
I am having trouble with updating saved instance in datastore. My form has two
I am having trouble updating my Database from my code using a DataSet. I'm
I am updating an application to Rails 3 and I am having trouble creating
I am having some trouble updating UMDF drivers using devcon during a standard code-deploy-debug
I am having some trouble, updating a listbox, Ive tried Refresh and Update but
I'm having trouble updating my rails app on heroku. I've gotten my app up
I'm having trouble updating the DOM when doing an AJAX post using JQuery. 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.