Ned Collyer wrote: > > Spring is meant to be the factory :). Isn't that a big part of why we use > Spring? > > Incidently there is a Classes class that has some handy "cached" stuff for > resolving class references. > see org.apache.wicket.util.lang.Classes >
You can certain make the PanelFactory a spring bean: public class TestPage extends WebPage { @SpringBean(name = "panelFactory") private PanelFactory panelFactory; public TestPage() { add(panelFactory.getPanel("testPanelOne")); } } <bean id="config" class="myapp.Config" scope="singleton"> <property name="panelClass"> <value>myapp.TestPanel</value> </property> </bean> <bean id="panelFactory" class="myapp.PanelFactory" scope="singleton"> <property name="config" ref="config"/> </bean> The Wicket Classes class is not meant for performance. Normal classloaders probable provide better caching support. It was introduced to fix concurrency problems. ----- -- Kent Tong Wicket tutorials freely available at http://www.agileskills2.org/EWDW Axis2 tutorials freely available at http://www.agileskills2.org/DWSAA -- View this message in context: http://www.nabble.com/Accessing-prototype-scoped-panel-beans-using-%40SpringBean-annotation-tp15627974p15651407.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]