What does the Wicket AJAX debug window say in that response? Jeremy Thomerson http://wickettraining.com -- sent from my "smart" phone, so please excuse spelling, formatting, or compiler errors
On Oct 13, 2010 12:20 AM, "LutherBaker" <lutherba...@gmail.com> wrote: I have created an outer list of areaGroups such that each group item contains a list of areas. I am displaying a ModalWindow and editing an area. After changing the area's name, I submit it via an AjaxSubmitButton which initially added the ListView associated with a particular group. Obviously that failed (can't add a repeater to an AjaxTargetRequest) at which point I added a WebMarkupContainer to the markup. <dl wicket:id="group.list" class="groupList"> <dt>[group name]</dt> <wicket:container wicket:id="item.list.container"> <dd wicket:id="item.list"> Edit [item name] <div class="summary" wicket:id="item.summary">[item summary]</div> </dd> </wicket:container> </dl> I feed this inner ListView with a LodableDetachableModel where I fetchAreasByAreaGroup: @Override protected List<Area> load() { return dataService.fetchAreasByAreaGroup(areaGroup); } I also created a WebMarkupContainer in code and set its outputMarkupId: final WebMarkupContainer itemListContainer = new WebMarkupContainer("item.list.container"); itemListContainer.setOutputMarkupId(true); I store the markup container in a hashmap keyed by AreaGroup which allows me to, from the ModalWindow, retrieve the markup container associated with the edited area's AreaGroup. Which I then add to the AjaxRequestTarget in the ModalWindow's form's AjaxButton.onSubmit handler: final WebMarkupContainer container = areaPage.getWebMarkupContainer(area.getAreaGroup()); target.addComponent(container); So all is well. It all compiles and the page loads without error. So, again, I pop the ModalWindow up, change the name and put a breakpoint in the code. I can see the AjaxRequestTarget add the container. I can see that the container is not null. I can see the dataService retrieve the new area. I can see the code execute which populates the inner ListView I mentioned earlier - with the updated area properties. But, after the ModalWindow goes away, the underlying screen representation doesn't change. The old name is still displayed. Here is a snippet of the generated markup where you can see "item_list_container53" which identifies the wicket:container that I wish to repaint. <dl wicket:id="group.list" class="groupList"> <dt>Work</dt> <wicket:container wicket:id="item.list.container" id="item_list_container53"> <dd wicket:id="item.list"> Edit Hammerhead <div class="summary" wicket:id="item.summary">Day job learning large scale infrastructure skills</div> </dd> </wicket:container> </dl><dl wicket:id="group.list" class="groupList"> <dt>Business Ventures</dt> <wicket:container wicket:id="item.list.container" id="item_list_container55"> <dd wicket:id="item.list"> Edit Fuzzy Bearings <div class="summary" wicket:id="item.summary">Software Development Effort</div> </dd> </wicket:container> </dl> Any thoughts on what I am missing? Thanks in advance, -Luther PS: Please note that nabble will not accept posts with 'onclick' text in the code snippet 'a' tags ... so I specifically edited "onClick" to simply be "click" in the code snippets. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxRequestTarget-not-refreshing-Component-tp2993093p2993093.html Sent from the Users forum 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