Re: AjaxFallBackLink driving me nuts!

2009-11-17 Thread Jeremy Thomerson
are you using a list view in your question edit panel?  you might need to
call setreuseitems(false)

--
Jeremy Thomerson
http://www.wickettraining.com



On Tue, Nov 17, 2009 at 11:04 AM, pieter claassen pie...@claassen.co.ukwrote:

 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);

 --



Re: AjaxFallBackLink driving me nuts!

2009-11-17 Thread bgooren

For starters, I'd try to eliminate possible causes. E.g. make sure the model
change is seen from QuestionEditPanel. A way to do this is either run your
app in a debugger and set some checkpoints around onRender and/or
onBeforeRender, or simply override onBeforeRender() and log the model
contents.

Since we don't see what kind of model your templatewebmodel is, it could
also be that this class is caching its value.

Bas


Pieter Claassen wrote:
 
 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.

-- 
View this message in context: 
http://old.nabble.com/AjaxFallBackLink-driving-me-nuts%21-tp26393621p26396450.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org