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 <[email protected]>: > I tried to do this: > ListView obj = (ListView) form.get("rowPanel:ims"); > obj.removeAll(); > > But after that, the input is forgotten. > I tought, that if I enable the ReuseItems, than the list will remember the > contents, but when I call, the removeAll(), it's just forgots the input > values. It's like I just left the reuseItems on false. > How can I achieve, that the new values won't be forgotten when I remove one > item from the list? > Thanks > > Peter > > 2009-08-14 17:18 keltezéssel, Igor Vaynberg írta: >> >> you have ot call removeall() on the listview, not on the button. >> >> -igor >> >> 2009/8/14 Major Péter<[email protected]>: >>> >>> I tried this: >>> >>> item.add(new AjaxFallbackButton("imRemove", PersonForm.this) { >>> >>> �...@override >>> public void onSubmit(AjaxRequestTarget target, Form<?> >>> form) { >>> person.getIMAccounts().remove(acc); >>> removeAll(); >>> if (target != null) { >>> target.addComponent(rowPanel); >>> } >>> } >>> }.setDefaultFormProcessing(false)); >>> >>> but it's still not working, it looks like that on every single >>> imRemove#onSubmit in the list the last element will disappear. I have no >>> idea what's causing this behavior... >>> >>> Regards, >>> Peter >>> >>> 2009-08-14 04:19 keltezéssel, Cserep Janos írta: >>>> >>>> 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: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
