Hi I have the following, and its resulting in 2x calls to the load on my
model - which confuses me.
My panel has the following in its constructor.
setModel(new CompoundPropertyModel(new LoadableDetachableModel() {
protected Object load() {
return featureService.get(docRef);
}
}));
In my test I have:
expect(mockFeatureService.get(testFeature.getDocRef())).andReturn(testFeature);
replay(mockFeatureService);
applicationContext.putBean("featureService", mockFeatureService);
wicketTester.startPanel(new TestPanelSource() {
public Panel getTestPanel(String panelId) {
return new TestFeatureShowPanel(panelId, testFeature.getDocRef());
}
});
wicketTester.assertLabel("panel:title", testFeature.getTitle());
verify(mockFeatureService);
When I run this through a jetty server I get 1 call to the "load" method of
my TestFeature model.
When I run the test I get 2 calls to the load method. The 2nd seems to be
triggered from the assertLabel call. If I have many assertLabel calls -
then its still called only twice. Ie, more assertLabels do no call "load"
again.
Any ideas why?
--
View this message in context:
http://www.nabble.com/Wicket-tester-calling-%22load%22-twice-in-loadableDetachableModel-tp16835367p16835367.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]