wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnerkar <pner...@gmail.com>
Subject Re: How to delete an item from List view.
Date Fri, 01 Feb 2008 15:08:11 GMT

Hi Eelco,

RefreshingView is available in wicket 1.3.0.
While I'm using wicket 1.2.6.

Regards,

Pankaj,...


Eelco Hillenius wrote:
> 
> On Jan 31, 2008 3:49 PM, pnerkar <pnerkar@gmail.com> wrote:
>>
>> Hi All,
>>
>> I have rendered a list view on a Web Page.
>>
>> vehicle1    X
>> vehicle2    X
>> vehicle3    X
>>
>> when a person click on 'X', that item should be deleted.
>> But I'm facing an issue, when i click on 'X', last item get deleted.
>> Actually when I delete vehicle2 from my list, it deletes vehicle2 but
>> that
>> component is still there.
>> So while rendering it render vehicle1 & vehicle2.
>>
>> public void onSubmit() {
>>         List vehicles = (List) getParent().getParent().getModelObject();
>>         vehicles.remove(index);
>> }
> 
> Instead of using ListView, you could consider RefreshingView with it's
> itemReuseStrategy set to ReuseIfModelsEqualStrategy.
> 
> Eelco
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-delete-an-item-from-List-view.-tp15217608p15227738.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Mime
View raw message