2 Replies Latest reply on Oct 29, 2006 12:23 AM by Barry Sheward

    Injection not happening?

    Barry Sheward Newbie


      I have a POJO JavaBean and JSF page which sets a property in that POJO. I have Log4J output which shows the property of the POJO being set to reasonable values.

      I have a SessionBean which contains a method which should act upon that POJO. I can see the method being executed, but the @In'd property is always null.

      public class FileCabinetSession implements FileCabinetSessionLocal, FileCabinetSessionRemote {
       private FileCabinetEntry fileCabinetEntry;
       public void importFile() throws Exception {
       if ( fileCabinetEntry == null ) {
       System.out.println( "FCE IS NULL" );
       } else {
       System.out.println( "FCE IS: " + fileCabinetEntry.toString() );
       fileCabinetService.importFile( fileCabinetEntry );

      The JSF file is:

       <h:form enctype="multipart/form-data">
       <t:inputFileUpload value="#{fileCabinetEntry.file}"/>
       <h:commandButton type="submit" value="Import New"
       action="#{fileCabinetSession.importFile}" />
       <h:messages />

      I can see in the debug.seam page that both fileCabinetEntry and fileCabinetSession objects exist in the application context.

      Can anyone tell me why the fileCabinetEntry isn't being injected?