3 Replies Latest reply on Oct 3, 2013 3:20 PM by Brian Leathem

    Using rich:autocomplete inside JSF 2 composite component

    Nasir Imtiaz Newbie


      I am trying to use Richfaces 4 rich:autocomplete component inside a JSF 2 composite component by exposing the autocompleteMethod as follows:


      composite component : filter.xhtml

        <composite:attribute name="autocompleteMethod" required="true" method-signature="java.util.List autocompleteMethod(java.lang.String)" />
        <rich:autocomplete autocompleteMethod="#{cc.attrs.autocompleteMethod}" var="result" fetchValue="#{result.name}" mode="ajax" >


      client page

      <util:filter autocompleteMethod="#{geoBean.suggest}" />



      public List<City> suggest(String keyword) {
        List<City> result;
        // Logic to return list of cities goes here...
        return result;


      Now, when i put a breakpoint at the GeoBean.suggest(), i notice that the method is getting called when i type something in the input text, but the keyword received at this point does not show me the typed value. Instead it shows com.sun.faces.context.FacesContextImpl@1376b55 as the value of keyword.


      Kindly help me to figure out what am i missing.




      Richfaces 4.3.3

      JSF 2.1.3