Hello, I'm facing the same "problem" as the Matt above but honestly I must admit that I do not really understand Pedro's advice. Did you manage to implement his advice, Matt? Could I get a little more information about how this IAjaxCallDecorator might actually look like? That would be a great help.
Thanks in advance, Philip 2011/2/4 Pedro Santos <pedros...@gmail.com> > I Matt, try to decorate the AJAX javascript to show/hide the indicator > using > an IAjaxCallDecorator > > On Thu, Feb 3, 2011 at 5:40 PM, 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? > > > > > > -- > Pedro Henrique Oliveira dos Santos >