if you want to talk about a cleaner way... add(new removelink("remove", item.getmodel()) { onclick() { vehicles.remove(getmodelobject()); } }
assuming vehicles is a property on listview's parent... -igor On Jan 31, 2008 7:29 PM, Timo Rantalaiho <[EMAIL PROTECTED]> wrote: > On Thu, 31 Jan 2008, pnerkar wrote: > > public void onSubmit() { > > List vehicles = (List) getParent().getParent().getModelObject(); > > vehicles.remove(index); > > } > > As a cleaner way to do this you could try > > > List<Vehicle> vehicles = findParent(VehiclesList.class).getModelObject(); > > > Best wishes, > Timo > > -- > Timo Rantalaiho +358-45-6709709 > Reaktor Innovations Oy <URL: http://www.ri.fi/ > > > > --------------------------------------------------------------------- > 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]