Hi Thank's for correcting me on how to update the ListView, nicely explained.
1. I am able to view the results panel now. 2. I have made change in the following way to update the list by updating the model. Added a WebMarkupContainer and wrapped the ListView within it. The visibility is applied now only on the WebMarkupContainer that wraps the list. So now, I update the model and call this.setModelObject(updatedModelInstance);, But now I can see only the header of the Listiview being rendered and the actual data/repeated items are blank... is not re-painted. The markup on the ajax response has the following: *INFO: *Received ajax response (723 characters) *INFO: * <?xml version="1.0" encoding="UTF-8"?><ajax-response><component id="resultListContainer13" ><![CDATA[<div id="resultListContainer13"> <div> <table width="0%" cellspacing="0"></table> <table width="100%" cellspacing="0" class="dataview"> <tr> <th width="5%"> </th> <th width="15%">First Name</th> <th width="5%"> </th> <th width="15%"><label for="MiddleName">Middle Name</label></th> <th width="5%"> </th> <th width="15%"><label for="LastName">Last Name</label></th> <th width="5%"> </th> <th width="15%"> </th> </tr> The content is not rendered, now why would that happen? Does it need to invoke a method on the result list panel to render the contents? Now am thinking should i add a wrapper WebMarkupContainer for the PageableListView as well? So Ajax can re-paint it? Thanks for the time, Reg Niv On Fri, Aug 6, 2010 at 4:14 PM, Wilhelmsen Tor Iver <toriv...@arrive.no>wrote: > > searchResults = new SearchResults("id",list); //-> Not sure if this > > is the > > correct way to refresh a ListView... > > It's not. Creating a new object like this will defeat the logic because it > has not been added to the hierarchy that the Ajax call expects. > > What you want to do is to modify the *model* of the result, then tell it to > repaint. For repeaters (like ListView) where the markup is used multiple > times and the "real" wicket id is something completely different than what > you may think, you also want to put a "wrapper" in the form of a > WebMarkupContainer around the repeater and then use that for visibility and > Ajax updates. > > - Tor Iver > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >