1 Reply Latest reply on Feb 21, 2011 5:27 AM by Ilya Shaikovsky

    autocomplete behavior clarification sought - 4.0.0.M6

    Brendan Healey Master

      I read this post (http://community.jboss.org/message/585236#585236) regarding autocomplete

      which seemed to suggest that if the autocompleteMethod is returning a List<MyClass> then you

      can't store an instance of MyClass in the value=.  Is that a correct interpretation?

       

      Do you have to take the selected text and one way or another convert it to an object instance?

      The showcase deals with a rather simplistic case and wasn't any assistance to me on this

      particular matter.

       

      I tried all kinds of various combinations of converter, itemConverter, fetchValue etc...  with no

      success. I also tried using rich:select but given the inability to delay the server lookup until some

      characters are typed in I was getting back 5000 rows, and the performance wasn't good even on

      a localhost server (this is test data from a production system).

       

      {code:xml}

      <rich:autocomplete id="club"

      var="var"

      minChars="3"

      mode="cachedAjax"

      fetchValue="#{var.name}"

      converter="MyClassConverter"

      layout="list"

      value="#{myBean.}"

      autocompleteMethod="#{myBean.nameSearch}">

      <h:outputText value="#{var.name}"/>

      </rich:autocomplete>

      {code}

       

      So, I'd be grateful if anyone can shed any light on this, i.e. is this a present limitation? if so is

      it planned to be addressed at some point?

       

      Thanks,

      Brendan.