yes -igor
On Fri, Nov 18, 2011 at 8:25 AM, heapifyman <heapify...@gmail.com> wrote: > Hm, looks like AjaxRequestTarget.get() is what I was looking for? > > > > 2011/11/18 heapifyman <heapify...@gmail.com> > >> Hello again, >> >> I have a follow-up question. Can I somehow update other components once >> the AjaxLazyLoadPanel's getLazyLoadComponent() method has completed? >> >> I thought I could use the new wicket 1.5 event mechanism for that but if I >> understood correctly I would have to send the AjaxRequestTarget in the >> payload to add my changed components to it, right? >> And I don't really know how to get the AjaxRequestTarget in >> the getLazyLoadComponent() method. >> >> Thanks in advance for any hints, >> Philip >> >> >> 2011/11/18 heapifyman <heapify...@gmail.com> >> >>> Great, it's working. >>> Thanks for the quick response, >>> >>> Philip >>> >>> >>> >>> 2011/11/17 Igor Vaynberg <igor.vaynb...@gmail.com> >>> >>>> you can replace the lazy load panel instance: >>>> >>>> //check other selections >>>> myLazyLoadPanel=myLazyLoadPanel.replaceWith(new >>>> MyLazyLoadPanel(myLazyLoadPanel.getId(), ..) >>>> target.addComponent(myLazyLoadPanel); >>>> >>>> this will reset the state of lazyloadpanel to the "not-yet-loaded" >>>> >>>> -igor >>>> >>>> On Thu, Feb 3, 2011 at 11:40 AM, Matt Schmidt <mschmid...@gmail.com> >>>> wrote: >>>> > I currently have a DataGridView loaded inside of an AjaxLazyLoadPanel, >>>> > including the service call to get the data. >>>> > >>>> > myLazyLoadPanel = new AjaxLazyLoadPanel("id", new >>>> CollectionModel<Pojo>()) { >>>> > public Component getLazyLoadComponent(String markupId) { >>>> > if(getDefaultModelObject() == null) { >>>> > setDefaultModelObject(myPojoService.readAll()); >>>> > } >>>> > return new MyDataGridView(markupId, getDefaultModel()); >>>> //ignoring >>>> > casting for simplicity >>>> > } >>>> > } >>>> > >>>> > That works great for loading the page before the service call is >>>> complete. >>>> > >>>> > But now I need to add a DropDownChoice to change the collection in the >>>> data >>>> > grid via Ajax after the page is loaded. Is there anyway to get the >>>> > DataGridView to be replaced with an Ajax indicator (like on page load) >>>> > during an Ajax "onchange" event for the DropDownChoice? I've added an >>>> Ajax >>>> > indicator to the DropDownChoice, but I would like the same behavior I >>>> get on >>>> > page load for the AjaxLazyLoadPanel. >>>> > >>>> > This is what I have for the drop down for starters: >>>> > >>>> > myDropDownChoice.add(new AjaxFormComponentUpdateBehavior("onchange") { >>>> > protected void onUpdate(AjaxRequestTarget target) { >>>> > if(myDropDownChoice.getModelObject().equals(foo)) { >>>> > >>>> myLazyLoadPanel.setDefaultModelObject(myPojoService.readFoo()); >>>> > } >>>> > //check other selections >>>> > target.addComponent(myLazyLoadPanel); >>>> > } >>>> > } >>>> > >>>> > I may be looking at this entirely wrong... Any suggestions? >>>> > >>>> >>>> --------------------------------------------------------------------- >>>> 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