Hi,
I have a RefreshingView which has a delete button in it (this deletes the
model present in the backing list for the view.) The problem is that when a
delete is performed on DB, (see onSubmit( ) for
*deletePlanObjectiveDetailButton
below) *the size of the list changes, Is there a way to "refresh" the view
after I remove the model from the backing list (list.remove( xxx )) ??
Here's a snippet of what i am doing:
*new RefreshingView("refreshing-view-list") {
// populate item.
protected final void populateItem(final Item item) {
final MODEL backingListModel = (backingListModel)
item.getModelObject();
item.add(new Label("label-objective-name",
backingListModel.getName()));
final Button deletePlanObjectiveDetailButton = new
Button("button-delete-plan-objective-details") {
private static final long serialVersionUID = 1L;
// onSubmit.
public final void onSubmit() {
new
ObjectiveMeasureDataProvider().deleteObjectiveMeasure(backingListModel);
backingListModels.remove( ); /// <---- Searches
for backing Model deleted in current list based on id and removes it.
// TODO Figure out a way to do list view refresh
here.
}
};
item.add(deletePlanObjectiveDetailButton);
}
};
*Any Help would be appreciable!!???*
*Rick