1 Reply Latest reply on May 21, 2011 8:14 AM by ilya_shaikovsky

    suggestionbox dynamic nothingLabel - is it possible ?

    valatharv

      Hi,

       

      I am using rich:suggestionbox component (richfaces 3.3.1.GA, jboss-seam-2.0.2.SP1) .

       

      "nothingLabel" value is populated if autocomplete list is empty. Is there a way to provide custom message from backing bean.

       

      for example :

      I am calling web service which returns some list but I want to display custom message as returned from service like "Bad request", "Communication Error" so that it is NOT selectable.


      Is it possible ?

       

      <h:inputText id="testId" value="#{bean.name}"/>

       

      <rich:suggestionbox id="suggestionBoxId" for="testId" tokens=","

                          suggestionAction="#{suggestionBean.autocomplete}" var="result"

                          fetchValue="#{result.name}"

                          nothingLabel="No name found"

                          frequency="0" minChars="1">

                          <h:column>

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

                          </h:column>

      </rich:suggestionbox>

       

      Please suggest.

       

      Regards