Hello i use Vaadin in jboss as7 and CDI
and i have got problem i define inheritance and i have got Servlet:
@SessionScoped
public class ShopWebServlet extends ShopMasterServlet
{
private static final long serialVersionUID = 1L;
private WebConf webConf;
@EJB
WebConfBeanRemoteHandler webConfBeanRemoteHandler;
@Override
public void init() {
System.out.println("TEST EJB :D");
webConf = new WebConf();
webConf.setDefaultTitle("TEST APP 1");
System.out.println("WEB CONF: " + webConf.toString());
Label label = new Label(webConfBeanRemoteHandler.getName("Luk"));
webConfBeanRemoteHandler.insertWebConf(webConf);
Window main = new Window("Main");
main.addComponent(label);
setMainWindow(main);
}
}
and [quote]
public class VaadinAppServlet extends AbstractApplicationServlet {
private static final long serialVersionUID = 1L;
@Inject Instance<ShopWebServlet> application;
@Override
protected Class<? extends Application> getApplicationClass() throws
ClassNotFoundException {
return ShopWebServlet.class;
}
@Override
protected Application getNewApplication(HttpServletRequest request) throws
ServletException {
ShopWebServlet app = application.get();
return app;
}
}
[/quote]
and line:
webConfBeanRemoteHandler.insertWebConf(webConf); do his job fine
but if i try use this in ShopMasterServlet the same code its not working ??
so what i must change to use CDI in parent servlet (ShopMasterServlet)?? i think its problem with VaadinAppServlet but i not know how configure it
and my another problem is with widget i add add-on and before i have got in descriptor web.xml :
and its working wery well but i must change it (because i use CDI) into :
and i have got alert in browser:
i try to use init param :
but its not working (my widget compile i se it in console ) and i have got the same error in browser ? how can i configure my widget with CDI and use CDI with inheritance ??