1 Reply Latest reply on Mar 15, 2006 8:16 AM by newlukai

    Could issue JBSEAM-145 be the reason for my problem?

      Hi there,

      because I didn't know what I could do else to solve my problem I visited JIRA and checked all issues. I found [#JBSEAM-145] (http://jira.jboss.com/jira/browse/JBSEAM-145), which requests @In to use the JSF variable resolver if Seam doesn't find a component.

      Here's my code again:

      @Stateful
      @Scope(ScopeType.SESSION)
      @LoggedIn
      @Name("showTestactionForDevelopers")
      @Interceptors(SeamInterceptor.class)
      public class ShowTestactionForDevelopers implements IShowTestactionForDevelopers{
       @PersistenceContext(unitName = "aresDatabase", type = PersistenceContextType.EXTENDED)
       private EntityManager em;
      
       @In
       @Valid
       private User user;
      
       @In
       private FacesContext facesContext;
      
       @In(required=false)
       private List<Testaction> currentTestactions;
       @In(required=false)
       private Integer currentTestactionIndex;
       @In(required=false)
       @Out(required=false)
       @Valid
       private Testaction currentTestaction;
      
       private transient List<Testcase> testcases;
       private transient List<User> developers;
       private transient List<Revisionclass> revisions;
      
       public String saveTestaction() {
       saveCurrentTestaction();
       return "backToList";
       }
       //omitted the rest


      I want currentTestaction to be injected. But it doesn't work. Either Seam injects null or injects the displayed form without the changes made by the user.

      [#JBSEAM-145] in my mind, I added a field facesContext to my component. In debug mode I checked what's in facesContext. In its _viewRoot I found the form representing the currentTestaction with the changes made. So I think, my application would work if Seam would check the JSF variable resolver?!?

      For any questions just ask or look here: http://www.jboss.com/index.html?module=bb&op=viewtopic&t=78947

      Thanks
      Newlukai