On Tue, Jan 4, 2011 at 2:11 PM, Matt Schmidt <mschmid...@gmail.com> wrote:
> I am trying to rerender an entire page via ajax from an abstract page. > > I have the follow page hierarchy: > > abstract class AbstractPage extends WebPage > * dropdown to change an existing session variable > class MyPage1 extends AbstractPage > * component that depends on the value of the session variable > class MyPage2 extends AbstractPage > * another component that depends on the value of the session variable > > When the dropdown changes, I want the current page to rerender via ajax, so > I added this in the ajax behavior: > > target.addComponent(AbstractPage.this); //also tried > target.addComponent(target.getPage()); > > But this appears to cause the page to postback and the url changes to use > the page map (?wicket:interface=:4::::). If I change it and add just the > dropdown to the target, the Ajax request works as expected, but of course > the component in the implementation page (MyPage1) is not rerendered. > > Any suggestions? > The "entire page" doesn't have a markup ID that can be replaced, so it won't much work. You could attach a markup container to your body tag and re-render everything in that. The real question is: why? -- Jeremy Thomerson http://wickettraining.com *Need a CMS for Wicket? Use Brix! http://brixcms.org*