WicketSpring

!! moved to http://code.google.com/p/webical/wiki/WicketAndSpring !!

Wicket-Spring setup

  • The wicket -servlet is set as the default servlet in the web.xml
  • The WebicalApplication is injected by spring in the applicationContext

By extending the AnnotSpringWebapplication in the WebicalApplication its possible to let Spring inject dependencies like managers etc. using the @SpringBean annotation.

Testing

All wicket testcases are subclassed from WebicalApplicationTest. This class sets up:
  • The WicketTester to be used to assert all requirements
  • The AnnotApplicationContextMock to insert dependencies that are supposed to be injected by Spring
  • A DummyHomePage to be used in links etc when any page does.

To test components like panels simply subclass the WebicalApplicationTest and set the PanelTestPage as the startpage inluding your panel/component as the content.

Resources

-- IvoVanDongen - 28 Sep 2006

Topic revision: r3 - 28 Jan 2008 - 10:24:59 - MattijsHoitink
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback