hello, here is the codes:
final Form<Void> form = new Form<Void>("search"); add(form); final TextField<String> query = new TextField<String>("query", new PropertyModel<String>(this, "search") ); form.add(query); List<CustomFileDescription> results = null; final WebMarkupContainer resultcontainer = new WebMarkupContainer("resultcontainer"); add(resultcontainer.setOutputMarkupId(true)); final ListView<CustomFileDescription> files = new ListView<CustomFileDescription>("files", results) { @Override protected void populateItem(ListItem<CustomFileDescription> item) { final CustomFileDescription fileDesc = item.getModelObject(); item.setModel(new CompoundPropertyModel<CustomFileDescription>(fileDesc)); item.add(new Label("name")); item.add(new Label("lastModified")); } }; //files.setReuseItems(true); resultcontainer.add(files); final IndicatingAjaxButton buttquery = new IndicatingAjaxButton("submit", form) { @Override protected void onSubmit(AjaxRequestTarget target, Form<?> form) { final List<CustomFileDescription> results = fileSearchService.search(query.getDefaultModelObjectAsString()); System.out.println(results.size()); files.setDefaultModelObject(results); target.addComponent(resultcontainer); } }; form.add(buttquery); ...and im pretty sure that i already some code in previous version of wicket and it work..but i dont know what im missing right now. maybe worst case i will do is to go back to old version of wicket but i want the latest version. Thanks a lot. Cheers. michael mosmann wrote: > > Hi, > >> i think i already put it in the webmarkupcontainer and target the >> markupcontainer. > > ok.. > my fault.. sorry. > > can you post some more code.. i am not sure to see the full picture yet. > >> For no apparent reason the listview is not updating when i targeted it. >> im >> using wicket 1.4.1. > > does it work without ajax? > > mm:) > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > -- View this message in context: http://www.nabble.com/Update-ListView-using-ajax-tp25310457p25324461.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org