2 Replies Latest reply on Sep 21, 2006 7:48 PM by Eric Ray

    Seam component not reachable for valueChangeListener method

    Eric Ray Novice

      I have a named Seam component that implements the following method.

      @Name("packages")
      @Stateful
      @Scope(ScopeType.SESSION)
      public class PackageAction {
      ...
       public void selectAccount(ValueChangeEvent event) {
       log.info("[#0]: event #1", user.getUsername(), event.getNewValue());
       AccountEntity ae = (AccountEntity)event.getNewValue();
       workPackage.setAccount(ae);
       }
      ...
      }
      

      My web interface code looks like this...
       <h:form id="controlCenter">
       <h:selectOneMenu id="accountMenu"
       value="#{workPackage.account}"
       valueChangeListener="#{packages.selectAccount}"
       onchange="submit()"
       rendered="#{!hasRemittance}"
       style="font-size:80%" >
       <f:selectItems value="#{packages.accountMap}" />
       </h:selectOneMenu>
       </h:form>
      


      The packages.selectAccount method is never invoked. Breakpoints aren't hit and log statements never occur. It's as if the method doesn't not even exit.

      What's wierd, is that I can change the signature of the method by removing the ValueChangeEvent parameer and the application never misses beat. Nothing complains that the selectAccounts method doesn't take a ValueChangeEvent object. At a minimum I thought I would get a runtime exception with something like NoSuchMethod or the like.

      Any help is appreciated? I'll keep digging. Might try attaching the debugger to the seam code and see what's taking place. Could this be an issue with JSF Lifecycle and not seam?

      Thanks.