0 Replies Latest reply on Feb 27, 2007 10:20 PM by gus888

    null exception on @inject in ICEfaces PanelTabListener

    gus888

      Hi there,

      I tried to inject a Seam session bean into panelTabListener, but I always got null value. The code is follows:

      @Name("tabListenerImpl")
      @Stateless
      public class TabListenerImpl implements TabChangeListener {
      
       @In (create=true, required=true)
       @Out (required=false)
       private ProjectFinder projectFinder;
      
       public void processTabChange(TabChangeEvent e) throws AbortProcessingException {
       int index = e.getNewTabIndex();
       if (index == 0)
       projectFinder.find();
       }
      }

      The jsp code:
      <ice:panelTabSet selectedIndex="0" styleClass="myTab">
      
       <ice:panelTab id="tab1" label="Project">
       <ice:panelGroup id="Panel1">
       <f:subview id="re1">
       <ui:include src="/projects.xhtml" />
       </f:subview>
       </ice:panelGroup>
       </ice:panelTab>
       <ice:panelTab id="tab2" label="Tab 2">
       <ice:panelGroup id="Panel2">
       <f:subview id="re2">
       <h:outputText value="Tab 2" />
       </f:subview>
       </ice:panelGroup>
       </ice:panelTab>
       <ice:tabChangeListener type="icefaces.TabListenerImpl"/>
      </ice:panelTabSet>

      I don't what is wrong with code, or some issues on ICEfaces+Seam. Anybody can give some direction? Thank you in advance.