Re: AjaxFallBackLink updating a listview in a listview (blog entry)
Hi Sven, I am trying to implement your changes, but am not sure what you mean: I have 3 panels in a page (QuestionCompletePage -QuestionCompletePanel-CompletableQuestionPanel-QuestionNavigationPanel). However, QuestionNavigationPanel, that contains my AjaxLink, belongs to two execution paths (it is used in QuestionCompletePage and QuestionEditPage). So I create an interface IRefreshable and have QuestionCompletePanel implement it (because it contains the container that I want to refresh). public interface IRefreshable { public ListComponent getRefreshables(); } Normally, I would then either have to pass a reference to this panel or otherwise, navigate down from getPage() to get to the panel. This seems to be just as much work as including the container for refreshing in the constructor calls. Any tips appreciated. P B) IMHO passing the container into EditableQuestionPanel isn't a good idea - why should it know anything about its parent? Instead I'd add a hook method into EditableQuestionPanel so that it can notify about changes. The containing QuestionEditPanel can then do whatever it needs to update itself on an Ajax request.
Re: AjaxFallBackLink updating a listview in a listview (blog entry)
I'm afraid forcing the reader to enter credentials isn't going to increase your comment count. Nevertheless here are some suggestions: A) Use PropertyListView and you won't have to twiddle with the item's model. B) IMHO passing the container into EditableQuestionPanel isn't a good idea - why should it know anything about its parent? Instead I'd add a hook method into EditableQuestionPanel so that it can notify about changes. The containing QuestionEditPanel can then do whatever it needs to update itself on an Ajax request. C) Why is QuestionNavigationPanel concerned with the model object of one of its ancestors? QuestionEditPanel should use a LoadableDetachableModel to always work on up-to-date data. When notified of changes (see hook method above) it can detach its model explicitly so the data is fetched again from your QuestionProcessor. Hope this helps Sven pieter claassen wrote: Hi Guys, Here is a blog entry on how I update listviews in listviews with Ajax. http://skeptical-inquirer.blogspot.com/2009/11/updating-listview-in-listview-with-ajax.html I would appreciate any comments to help me improve this pattern. Cheers, Pieter - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org