I have a CDI bean. {{@Named("viewCDI") //+@javax.enterprise.context.SessionScoped //+@com.rico.cdi.CDIViewScoped //-@javax.faces.view.ViewScoped //-@javax.faces.bean.ViewScoped public class HelloViewScoped implements java.io.Serializable{ private Date created; public HelloViewScoped() { created=new Date(); }
public Date getCreated() { return created; }
}}}
In beans.xml I wrote: version="1.1" bean-discovery-mode="annotated">
The problem is that is is not visible to JSF wen I use @javax.faces.view.ViewScoped
The only path to get it visibe is to write a Stereotype annotation: {{@javax.enterprise.inject.Stereotype @javax.faces.view.ViewScoped @Target(TYPE) @Retention(RUNTIME) public @interface CDIViewScoped {}}}
}
|