1 Reply Latest reply on Nov 5, 2008 6:12 AM by Jim Barrows

    Component Lifecycle and the tomahawk schedule

    Chad Skinner Newbie

      I have been trying to write a seam managed bean for the tomahawk schedule component and am having little luck. My problem is in that I am lacking knowledge of how the seam managed beans are initialized and how I would go about injecting the required beans.

      To better explain, the Tomahawk Schedule uses an implementation of the ScheduleModel interface as the value for the component and the component calls the loadEntries() method on the ScheduleModel to retrieve the data to display.

      <t:schedule value="#{scheduleModelImpl}" />

      My Implementation of this interface is in the page scope and  uses the @In annotation to inject the EJB that does the data retrieval, but this EJB is not injected. I am assuming that I need a factory method of some sort, but am not certain. When exactly are the @In annotations processed I assumed that it would be on the creation of the ManagedBean which is placed into the page scope, but they do not appear to be called.

      public class CalendarService extends AbstractScheduleModel {
         private CalendarManagerLocal calendarManager;
         protected Collection<ScheduleEntry> loadEntries(Date aStartDate, Date aEndDate) {
            Collection<ScheduleEntry> lEntries = new ArrayList<ScheduleEntry>();
            // Retrieve Schedule Entries
            return lEntries;

      Am I doing something wrong with the annotations, or do I need to create the factory methods?