public class SpringHelloWorld extends com.itmill.toolkit.Application {
public void init() {
final Window main = new Window("Hello window");
setMainWindow(main);
SpringContextHelper helper = new SpringContextHelper(this);
MyBeanInterface bean = (MyBeanInterface)
开发者_JAVA技巧 helper.getBean("myBean");
main.addComponent(new Label( bean.myMethod() ));
}
}
http://qastegiano.blogspot.com/2008/01/itmill-toolkit-5-spring.html
Is it a custom class or we should define something out there.
You've got to define something out there. It's an example of how to get a bean out of the bean factory; substitute a useful class of your own.
精彩评论