aspose file tools
The moose likes JSF and the fly likes Refreshing the backing bean Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Refreshing the backing bean" Watch "Refreshing the backing bean" New topic
Author

Refreshing the backing bean

Nitin Tonk
Greenhorn

Joined: Jun 24, 2008
Posts: 14

I am working on a page in which i need to delete an item.
Once i delete it,the page still shows the value on the page,until i refresh the page manually.
Please Advise.
Darryl Nortje
Ranch Hand

Joined: Jun 11, 2002
Posts: 140
Hi there Nitin,

Let's assume you have a Collection/List on your backing bean, and you now want to delete one of the items in that List, from your page.
So you select the item you want to delete using commandLink or or whatever, this calls a method in your bean. In your bean you you find out which element in the List was selected, and you need to action on. Then all you do is remove that element from the List and forward back to the same page, by returning null.
Nitin Tonk
Greenhorn

Joined: Jun 24, 2008
Posts: 14

Thanks Darryl for the response.
Darryl Nortje
Ranch Hand

Joined: Jun 11, 2002
Posts: 140
no probs. It's the WEEEEEEEEEEEEEEKEND. Enjoy it everyone.

 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Refreshing the backing bean
 
Similar Threads
Session Deletion help.
Issues with scope: JSF-Primefaces
Double posting
WA #1.....word association
how to reload a jsp page ?