Thanks for the tip. I'll use this when my constructors get too long.
Christian
On Wed, 30 Nov 2005 09:47:42 +0200, Joni Suominen <[EMAIL PROTECTED]>
wrote:
Unfortunately the instrumentation does not help here. I'm using getters
at constructors to overcome this issue.
public class MyPanel extends Panel {
@SpringBean
private ContactDao contactDao;
public MyPanel(String id) {
super(id);
List<Contact> contacts = getContactDao().findAll();
// add a TextField for each contact
}
protected ContactDao getContactDao() {
return contactDao;
}
}
In test class I test through a stub implementation which provides the
dependency in getter:
public class MyPanelStub extends MyPanel {
@Override
protected ContactDao getContactDao() {
return new ContactDaoStub();
}
}
--
Christian Essl
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user