Greetings I have a problem with a DataTable component that I am trying to refresh following an Ajax event.
My page contains a 'DataTable' component, with a FilterToolbar added as a topToolbar. The table is displayed correctly. My page contains a modal window that I use to edit the bean ; when I close the modal window, I want my table to be refreshed. So assuming the table component is available when I declare the button, and after setting table.setOutputId to true , I do : ----- AjaxSubmitButton save = new AjaxSubmitButton("save", EditForm.this) { @Override protected void onSubmit(AjaxRequestTarget target, Form form) { ModalWindow.close(target); target.addComponent(table); } }; ----- This works fine as far as the table's row are concerned, except that the filter field (the one rendered by the FilterToolbar) does not get drawn. I tried to explicitely add the filterToolbar component to the target (after setting it to output its ID), but then an exception was thrown, complaining that components with setRenderBodyOnly set to true could not be added to the target. I tried to manually call setRenderBodyOnly on the toolbar, but it failed. Afterwards, I tried the same thing with the AjaxFallbackDataTable ; the problem was even worse, as when I would navigate from a part of the table to the other, the "filter" field would disappear too. I suspect this is because AjaxFallbackDataTable does the rendering of different 'pages' of the table using ajax, and the same problem occurs. So, is there a way to refresh a FilterToolbar in a DataTable using an Ajax event ? Or will I have to reload the entire page ? Regards -- Pierre-Henri Trivier Solutions & Technologies Anyware Technologies www.anyware-tech.com ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user