It's not a secret anymore!*
The moose likes JSF and the fly likes Table Refresh Issue after update from Back Bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Table Refresh Issue after update from Back Bean" Watch "Table Refresh Issue after update from Back Bean" New topic
Author

Table Refresh Issue after update from Back Bean

Deniz Atak
Ranch Hand

Joined: Jun 29, 2011
Posts: 30
I have a table that consists of rows of reports. A back bean method that is tied to a check box value change event is getting the row IDs and populating an array (rowsToBeRemoved) with this IDs. Another method gets this array and removes the object from reportlist class:


The code executes fine, removes the object from the reportlist but after that my table brings up a mixed reportlist. If I refresh the page it brings the reportlist in correct order, otherwise it doesn't. And if I try to delete a row in the mixed state it deletes the report as if it is in correct order, thus ending with deleting the wrong report. I hope I could explained.. What am I doing wrong?
Deniz Atak
Ranch Hand

Joined: Jun 29, 2011
Posts: 30
There was a problem with table update in JSF. I put onClick="setTimeout('#{user$recentreports.updateReportList()}',500}" to my table which triggers an already defined method in the back bean. And it solved my problem. Maybe this helps someone someday.
 
 
subject: Table Refresh Issue after update from Back Bean
 
Similar Threads
Hql delete syntax?
Logic iterate and vo
Throwing an Exception when deleting a row
Unable to delete
howto modify database structure ?