3 Replies Latest reply on Dec 16, 2007 4:48 PM by Pete Muir

    Injection doesnt work

    Ananthan Rudran Newbie


      I have the following code in the web front end,

      <h:outputLabel for="sarId" align="left" value="SAR No" dir="LTR"/>
       <h:inputText id="sarId" value="#{sar.id}" size="20" align="left"/>
      <s:button value="Add" action="#{taskmgr.addTask}" />

      then i have a EntityBean name as follows
      public class OSASar implements Serializable {
       private String id;
       public OSASar(){
       public OSASar(String id){
       this.id =id;
       public String getId() {
       return id;

      and then an SessionBean as
      public class TaskManager implements Task {
       EntityManager em;
       @In(value="sar" ,required=true, scope=ScopeType.SESSION)
       private OSASar sar;
       private Log log;
       public TaskManager(){
       public void addTask(){
       System.out.println("Name:"+" "+sar.getId());

      when the addTask method is called i am getting
      org.jboss.seam.RequiredException: @In attribute requires non-null value: taskmgr.sar exception.
      Which means value is not getting injectec(?) What could be the possible cause?