Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Refreshing the backing bean  RSS feed

 
Nitin Tonk
Greenhorn
Posts: 14
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Darryl for the response.
 
Darryl Nortje
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no probs. It's the WEEEEEEEEEEEEEEKEND. Enjoy it everyone.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!