Here, I think this should work: Pastebin link in case the formatting gets messed up in email: http://pastebin.com/f6ef575c3
public ExamplePage() { IModel<? extends List<? extends String>> model = getSomeModel(); final ListView<String> lv = new ListView<String>("listview", model) { @Override protected void populateItem(ListItem<String> item) { item.add(new Label("name", item.getModel())); } }; final IBehavior repaintBehavior = new AbstractDefaultAjaxBehavior() { @Override protected void respond(AjaxRequestTarget target) { // this repaints the list view // this requires your model to always get the most // up-to-date list target.addComponent(lv); } @Override public void renderHead(IHeaderResponse response) { CharSequence callback = getCallbackScript(); response.renderJavascript("function uploadCompleted() { " + callback + "}", "customUploadCompleted"); } }; } -- Jeremy Thomerson http://www.wickettraining.com On Sun, Jul 5, 2009 at 7:57 AM, Mathias Nilsson<wicket.program...@gmail.com> wrote: > > Yes but I will have a WebMarkupContainer with a ListView in that needs to be > updated via ajax. If my javascript hits the onLinkClicked I won't have any > AjaxRequestTarget to update the container via ajax. > -- > View this message in context: > http://www.nabble.com/Wicket-and-javascript-tp24336438p24342870.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 > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org