1 Reply Latest reply on Mar 20, 2007 4:26 PM by Sergey Smirnov

    suggestionbox: NoSuchMethodError: java.lang.Integer.valueOf(

    Michael Waloschek Newbie

      I've just got excited about RichFaces when this error popped up.

      Using suggestionBox I get:
      java.lang.NoSuchMethodError: java.lang.Integer.valueOf(I)Ljava/lang/Integer;
      at org.richfaces.renderkit.html.SuggestionBoxRenderer$DataTemplateContext.getParameter(SuggestionBoxRenderer.java:390)
      at org.ajax4jsf.framework.renderer.compiler.ElementBase$5.getValue(ElementBase.java:338)
      at org.ajax4jsf.framework.renderer.compiler.ElementBase$ValueGetter.getStringOrDefault(ElementBase.java:426)
      at org.ajax4jsf.framework.renderer.compiler.ElementBase.getString(ElementBase.java:196)
      at org.ajax4jsf.framework.renderer.compiler.AttributeElement.encode(AttributeElement.java:45)
      at org.ajax4jsf.framework.renderer.compiler.ElementBase.encode(ElementBase.java:104)
      at org.ajax4jsf.framework.renderer.compiler.ElementBase.encode(ElementBase.java:104)
      at org.ajax4jsf.framework.renderer.compiler.ElementBase.encode(ElementBase.java:104)
      at org.ajax4jsf.framework.renderer.compiler.RootElement.encode(RootElement.java:64)
      at org.richfaces.renderkit.html.SuggestionBoxRenderer.encodeChildren(SuggestionBoxRenderer.java:182)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:721)
      ...

      The piece of code (following the demo) looks like this:

      <h:form>
      <rich:panel>
      <h:panelGrid columns="4">
      <h:inputText value="#{nakupCenaDetail.vyrTyp}" id="vyrTyp" />
      <rich:suggestionbox id="suggestionBoxId" for="vyrTyp" suggestionAction="#{vyrobekVyhledavac.autocomplete}" var="vyn" fetchValue="#{vyn.nazev}" minChars="2" width="200" height="150">
      <h:column>
      <h:outputText value="#{vyrNazev.nazev}" />
      </h:column>
      </rich:suggestionbox>
      ...
      

      The autocomplete method returns an ArrayList of simple beans.

      I'm using JSF RI 1.1_02-b08, JDK 1.4.2_13 and Tomcat 5.0.28. Seems to me the problem is in Java 1.4 Integer.valueOf usage.
      Anyone please, let me know what I'm doing wrong or if there is a workaround.
      Thanks.