4 Replies Latest reply on Mar 6, 2011 4:19 PM by geschtli

    Different calling conventions for bean methods??

    geschtli Newbie



      I have a strange effect in my little test application.


      i have that little bean (CDI convention):




      public class LoginBean implements Serializable


          private static final long serialVersionUID = 2989679125285684221L;

          private String alias = "";

          private String auth = "";


         @Inject private AccountManager am; 


          public String getAlias()


             return alias;



          public String getPassword()


             return auth;



          public void setAlias(final String _alias)


              alias = _alias;



          public void setPassword(final String _auth)


              auth = _auth;



          public String getLogin()


            if ( am.login(alias, auth) )

             return "loginPass";   


             return "loginFail";




      with Getter and Setter in it.


      Now the little calls then:


      <ui:composition xmlns="http://www.w3.org/1999/xhtml"








             <h:form ajaxSubmit="true">  

                      <h:outputText value="#{msg.name}" />

                     <h:inputText value="#{loginBean.alias}" required="true" />

                     <h:outputText value="#{msg.pwd}" />

                     <h:inputSecret  value="#{loginBean.password}"  required="true" />

                     <a4j:commandButton value="GO" action="#{loginBean.getLogin}" render="name" />

                     <h:outputText id="name" value="  Name:#{loginBean.alias}" />




      Now, for the ajax-button here, i can't simple set #loginBean.login,

      similar to the other methods. No i must set the original method name,

      otherwise i got the following exception : 'javax.el.MethodNotFoundException'.


      Now my question. Is there something in richfaces, that collides with

      the calling convention for methods, if using 'CDI' in the application.