Re: Removing an element from ListView with AjaxFallbackButton

2009-08-17 Thread Major Péter
So I'm populating an item into the LV, which is gonna have a Remove button, so when I'm add the AFB in the onsubmit I write to remove the ListItem which I'm currently populating?? The LV looks like this final ListViewIMAccount listview = new ListViewIMAccount(ims, new PropertyModel(person,

Re: Removing an element from ListView with AjaxFallbackButton

2009-08-17 Thread Erik van Oosten
Perhaps you can use the list editor: http://wicketinaction.com/2008/10/building-a-listeditor-form-component/ Regards, Erik. Major Péter wrote: Any help would be appreciated. Thanks Regards, Peter -- Erik van Oosten http://day-to-day-stuff.blogspot.com/

Re: Removing an element from ListView with AjaxFallbackButton

2009-08-14 Thread Major Péter
I tried this: item.add(new AjaxFallbackButton(imRemove, PersonForm.this) { @Override public void onSubmit(AjaxRequestTarget target, Form? form) { person.getIMAccounts().remove(acc); removeAll();

Re: Removing an element from ListView with AjaxFallbackButton

2009-08-14 Thread Igor Vaynberg
if removeall() doesnt do what you want then you have to find the specific listitem that represents your deleted row and remove just that one. -igor 2009/8/14 Major Péter majorpe...@sch.bme.hu: I tried to do this: ListView obj = (ListView) form.get(rowPanel:ims); obj.removeAll(); But after

Removing an element from ListView with AjaxFallbackButton

2009-08-13 Thread Major Péter
Hi all, I have some problem with ListViews and AjaxFallbackButton: The main idea is, that I have a Listview and a NewEntry button outside the LV. If I press the new button I'm gonna have a new ddc and Textfield and a Remove button in the LV. So far it works as intended, until I'm trying to

Re: Removing an element from ListView with AjaxFallbackButton

2009-08-13 Thread Cserep Janos
Because of this: listview.setReuseItems(true); You should do a removeAll() in your onSubmit() method when you change the model (the list in this case). - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For