3 Replies Latest reply on Jun 2, 2010 4:06 AM by Ilya Shaikovsky

    richfaces4 Function 'rich:element' not found for rich:hotKey

    odelya yomtov Novice

      Hi!

       

      I download RichFaces4 to implement it with facelet.

       

      I put:

       

       

      <rich:hotKey key="return" handler="#{rich:element('login:submitBut')}.click()" />
      

       

      And get an error:

       

       

      SEVERE: Servlet.service() for servlet Faces Servlet threw exception

      javax.el.ELException: Function 'rich:element' not found

      at com.sun.el.lang.ExpressionBuilder.visit(ExpressionBuilder.java:213)

      at com.sun.el.parser.SimpleNode.accept(SimpleNode.java:168)

      at com.sun.el.lang.ExpressionBuilder.prepare(ExpressionBuilder.java:178)

      at com.sun.el.lang.ExpressionBuilder.build(ExpressionBuilder.java:189)

      at com.sun.el.lang.ExpressionBuilder.createValueExpression(ExpressionBuilder.java:232)

       

       

      my jars are:

       

       

      commons-beanutils-1.7.0.jar

      commons-collections-3.2.jar

      commons-digester-2.0.jar

      commons-logging-1.1.1.jar

      jhighlight-1.0.jar

      jsf-api.jar

      jsf-impl.jar

      jstl-api-1.2.jar

      jstl-impl-1.2.jar

      log4j-1.2.15.jar

      richfaces-api-4.0.0.ALPHA1.jar

      richfaces-core-ui-4.0.0.ALPHA1.jar

      richfaces-impl-4.0.0.ALPHA1.jar

      slf4j-api-1.5.11.jar

      slf4j-log4j12-1.5.11.jar

       

       

      and this is my page:

       

       

      <ui:composition template="/template/layout.xhtml">
       <ui:define name="body">
       <h:form id="login" prependId="false">
       <fieldset><legend>Simple sample</legend>
      <h:outputLabel value="#{msg.User_Name}" /><br />
       <h:inputText id="j_username" value="#{loginRegisterBean.email}" 
      required="true" requiredMessage="#{msg.User_Name_required}">
      </h:inputText><h:outputText value="#{msg.Password}" />
      <h:inputSecret requiredMessage="#{msg.User_Password_required}" id="j_password" required="true" />
       <br />
       <a4j:commandButton id="submitBut" action="#{loginBean.doLogin}" value="Login" reRender="mesg" />
      <rich:hotKey key="return" handler="#{rich:element('login:submitBut')}.click()" />
       </fieldset>
       </h:form>
       </ui:define>
      </ui:composition>
      </html>