0 Replies Latest reply on Dec 22, 2011 9:41 AM by Edilmar Alves

    RF4: is it possible to create a composite component from autocomplete?

    Edilmar Alves Expert



      I had created a JSF2 composite component from rich:calendar that worked fine.

      Then, I tried to make the same logical for a rich:autocomplete, but I had a problem with autocompleteMethod.

      Here is the code for the component:



          <cc:attribute name="id" /> 

          <cc:attribute name="value" /> 

          <cc:attribute name="autocompleteMethod" method-signature="java.util.List HOWTOPUTAGENERICNAME(java.lang.String)"/> 

          <cc:attribute name="converter" /> 



          <rich:autocomplete id="#{cc.attrs.id}" value="#{cc.attrs.value}"

                mode="cachedAjax" showButton="true" autofill="false"


            <f:converter converterId="#{cc.attrs.converter}"/>




      There are two problems:

      1) I have to put a fixed string in method-signature, and I didn't want this, I would like to create a generic method-signature, to use with many kinds of autocomplete components

      2) Then, I put method-signature fixed just to test, and GlassFish arises this error: "java.lang.IllegalArgumentException: wrong number of arguments"

      I think the argument "event" for autocompleteMethod doesn't work.