This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSF and the fly likes Trouble updating primefaces component w/ajax Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Trouble updating primefaces component w/ajax" Watch "Trouble updating primefaces component w/ajax" New topic
Author

Trouble updating primefaces component w/ajax

Jim Rocard
Greenhorn

Joined: Jul 17, 2009
Posts: 2
Hello! I'm basically building a file manager and using a PrimeFaces dataTable to output a list of the users' directories/files. I'm trying to allow a user to create a new folder using a modal window, and would like it to append the new row to the dataTable upon a successful request. So far, everything is working server-side, but I can't seem to append the changes to the dataTable without a refresh. I feel like I'm missing something simple and was hoping that one of you all might be able to point out my mistake.

Here is the xHTML...



and finally the backing bean method that is called....

Jim Rocard
Greenhorn

Joined: Jul 17, 2009
Posts: 2
Figured it out... I'm not updating the list used to populate my dataTable after insert, therefore it's not being sent in the response. Pretty easy fix for anyone that falls into the same trap.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Trouble updating primefaces component w/ajax
 
Similar Threads
Updating a form in primefaces when a selection is made in the datatable
SelectListener for DataTable populated with ActionListener - infact if the initial size = 0
Problem trying to send file to browser in JSF
<p:datatable scrollable="true"> not working
Cant get my datatable to update [PRIMEFACES]