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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:49:57+00:00 2026-05-27T03:49:57+00:00

I have a question about updating variable inside dataTable component, which was sended to

  • 0

I have a question about updating variable inside dataTable component, which was sended to dialog component.

I want to have dialog box with options. There are informations about user (user data editing).
ManageUsers class have UserDAO selectedUser property, UserDAO class contains User POJO (login, email etc).
ManageUsers.updateUser persists data in database.

How can I update selectedUser through inputText?
I can not use p:inplace component because I have a problem with h:forms and facelets (changing to production stage does not resolve this problem).

Glassfish: 3.1
Primefaces: 2.2
JSF: 2.1 (now MyFaces 2.1.3)

<h:form prependId="false"> 

   <p:growl id="growl"/>

   <!--            Data table with all users-->
   <p:dataTable id="userTable" var="u" value="#{manageUsers.users}"> 

      <p:column headerText="login" style="width:150px" filterBy="#{u.user.login}" filterMatchMode="contains"> 
         <h:outputText value="#{u.user.login}" />
      </p:column> 

      <p:column headerText="email" style="width:150px" filterBy="#{u.user.email}" filterMatchMode="contains"> 
         <h:outputText value="#{u.user.email}" /> 
      </p:column>

      <p:column headerText="apikey" style="width:150px" filterBy="#{u.user.apikey}" filterMatchMode="startsWith"> 
         <h:outputText value="#{u.user.apikey}" />
      </p:column>

      <p:column headerText="Options" > 
         <p:commandButton update="display" oncomplete="userDialog.show()" 
                      image="ui-icon ui-icon-search"> 
            <f:setPropertyActionListener value="#{u}" target="#{manageUsers.selectedUser}" /> 
         </p:commandButton> 
      </p:column> 

   </p:dataTable>   

   <!--            Dialog box with options-->
   <p:dialog appendToBody="true" header="User Detail" widgetVar="userDialog" resizable="false" 
           width="500" showEffect="explode" hideEffect="explode" onCloseUpdate="growl,userTable"> 
      <h:panelGrid id="display" columns="2" cellpadding="4"> 

         <h:outputText value="Login" />
         <p:inputText  required="true" value="#{manageUsers.selectedUser.user.login}" />

         <h:outputText value="Email" />
         <p:inputText  required="true" value="#{manageUsers.selectedUser.user.email}" />

         <p:commandButton value="save and exit" action="#{manageUsers.updateUser}" update="growl,userTable" onclick="userDialog.hide()" />

      </h:panelGrid> 
   </p:dialog>

</h:form>

Example view

  • 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-27T03:49:58+00:00Added an answer on May 27, 2026 at 3:49 am
    PROBLEM RESOLVED. Setters was not fired. I don't know why, but when I remove appendToBody="true", then setters work perfectly. Anyone know why?
    

    The setters weren’t fired because setting appendToBody to true might cause the dialog to be out the form component.From the Primefaces User Guide (3.0.M4):

        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

I have a question about updating table through t-sql. The client may want to
I have a question about this question . I posted a reply there but
I have asked a question on SuperUser about updating Ruby version in Google SketchUp
I have a question that is driving me crazy. It is all about updating,
I am fairly new to jquery and I have a question about updating data
I have a question about NSFetchedResultController updating problem. As you may have already known,
I've got a question about updating attributes. I have an user model and also
Folks, I just have a quick question about updating my app after it is
I have question about NSView: Imagine a Custom View where the mouseDown, mouseDrag and
I have question about normalization. Suppose I have an applications dealing with songs. First

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.