8 Replies Latest reply on Mar 14, 2007 4:43 PM by Eduardo Cauduro

    suggestion box example not work

    Eduardo Cauduro Newbie

      Hi, im new in RichFaces and try to do the suggestion box example retired from RichFacesLiveDemo, but not work for me, i used exadel studio pro 4 in eclipse ide.
      I create de the bean SuggestionBox.java same on described in richfaceslivedemo, then i create a jsf page :

      <%@ taglib uri="http://richfaces.ajax4jsf.org/rich" prefix="rich"%>
      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
      
      <html>
       <head>
       <title></title>
       </head>
       <body>
       <f:view>
       <h:form id="suggestionbox_form">
      
      
       <h:outputText
       value="Simple richfaces Suggestion Box test web application."
       style="font: 18px;font-weight: bold;" />
       <br />
       <br />
      
       <h:panelGrid columns="3" border="0" style="border: 1px solid black;">
       <f:verbatim>Suggestion Box will suggest you town names if it's started with the "a" or
       "A" letter</f:verbatim>
      
       <f:facet name="header">
       <f:verbatim>Input With Suggestion Feature</f:verbatim>
       </f:facet>
      
      
       <f:verbatim> </f:verbatim>
      
       <h:inputText value="#{suggestionBox.property}" id="text" />
       <rich:suggestionbox id="suggestionBoxId" for="text" tokens=",["
       rules="#{suggestionBox.rules}"
       suggestionAction="#{suggestionBox.autocomplete}" var="result"
       fetchValue="#{result.text}" rows="#{suggestionBox.intRows}"
       first="#{suggestionBox.intFirst}"
       minChars="#{suggestionBox.minchars}"
       shadowOpacity="#{suggestionBox.shadowOpacity}"
       border="#{suggestionBox.border}" width="#{suggestionBox.width}"
       height="#{suggestionBox.height}"
       shadowDepth="#{suggestionBox.shadowDepth}"
       cellpadding="#{suggestionBox.cellpadding}">
       <h:column>
       <h:outputText value="#{result.text}" />
       </h:column>
       </rich:suggestionbox>
       </h:panelGrid>
      
       <br />
       <br />
      
       </h:form>
       </f:view>
       </body>
      </html>
      


      when i access the page and input some letter on input box i receive an alert error:
      request error: 500 internal server error
      message undefined

      So looking in a tomcat log:
      14/03/2007 14:09:20 com.sun.faces.lifecycle.InvokeApplicationPhase execute
      SEVERE: autocomplete
      javax.faces.el.MethodNotFoundException: autocomplete
      at com.sun.faces.el.MethodBindingImpl.method(MethodBindingImpl.java:199)
      at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:124)
      at org.richfaces.component.UISuggestionBox.broadcast(UISuggestionBox.java:144)
      at javax.faces.component.UIData.broadcast(UIData.java:657)
      at org.richfaces.component.UISuggestionBox.broadcast(UISuggestionBox.java:137)
      at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
      at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
      at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:329)
      at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
      at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
      at java.lang.Thread.run(Thread.java:595)
      14/03/2007 14:09:20 org.apache.catalina.core.StandardWrapperValve invoke
      SEVERE: Servlet.service() for servlet Faces Servlet threw exception
      javax.faces.el.MethodNotFoundException: autocomplete
      at com.sun.faces.el.MethodBindingImpl.method(MethodBindingImpl.java:199)
      at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:124)
      at org.richfaces.component.UISuggestionBox.broadcast(UISuggestionBox.java:144)
      at javax.faces.component.UIData.broadcast(UIData.java:657)
      at org.richfaces.component.UISuggestionBox.broadcast(UISuggestionBox.java:137)
      at org.ajax4jsf.framework.ajax.AjaxViewRoot.processEvents(AjaxViewRoot.java:180)
      at org.ajax4jsf.framework.ajax.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:158)
      at org.ajax4jsf.framework.ajax.AjaxViewRoot.processApplication(AjaxViewRoot.java:329)
      at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)

      Makes me think he dont find autocomplete metod, but this method exists in SuggestionBox class. Whats the problem? Please help...