refresh the page
HI
I have implemented a checkbox. I am deleting a data by checking the chackbox. Its deleting fine. But the problem is that its not refreshing the page. The content is still seen on the page even its not there in DB.
handleCheckbox2ValueChange(ValueChangeEvent valueChangedEvent) {
}
Please help me.
Regards
Rishab
# 3
Maybe you need to rearrange your logic.
Basic example:public class MyBean { // Session scoped bean.
private List<Item> content; // + getter + setter
{
loadContentFromDatabase(); // Preload on 1st view.
}
public void delete() {
Item item = (Item) table.getRowData();
doYourDaoThingToDeleteItem(item);
loadContentFromDatabase(); // Reload.
}
private void loadContentFromDatabase() {
content = doYourDaoThingToLoadItems();
}
}