Can anybody please enlighten me why this doesn't work (ok end of the day, maybe it really is something small). I am clearly changing the underlying model data, but how to tell questionEditPanel to pick that change up. I tried setDefaultModel(new TemplateWebModel(template)), templateEditPanel.modelChanged() and nothing works. Any tips appreciated.
P AjaxFallbackLink newpage = new AjaxFallbackLink("newpage") { @Override public void onClick(AjaxRequestTarget target) { QuestionBase newpage = new NewPage(); Template template = templatewebmodel.getEntity(); template.addQuestion(newpage); templateFactory.store(template); target.addComponent(questionEditPanel); } }; add(newpage); questionEditPanel = new QuestionEditPanel("questionrenderpanel", templatewebmodel); questionEditPanel.setOutputMarkupId(true); add(questionEditPanel); --