If that does not work you can also force the list to recreate all
items by calling removeAll() after you have  deleted the object.

Maurice

On Thu, Jun 5, 2008 at 7:39 PM, Sam Barnum <[EMAIL PROTECTED]> wrote:
> Ricky, what are you using as the model for your refreshing view?
>
> You should be using some sort of detachable model that re-fetches the items
> for the list from the DB each time.
>
> --
> Sam Barnum
> 360 Works
> http://www.360works.com
> 415.865.0952
>
>
>
> On Jun 5, 2008, at 10:32 AM, Ricky wrote:
>
>> 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
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to