5 Replies Latest reply on Jan 2, 2008 3:14 AM by marx3

    SuggestionBox is not working

    kks_krishna Newbie

      HI,

      I am facing a problem for implementing suggestionbox. Please read the following code and help me to find the mistake.

      <rich:column>
       <h:inputText value="#{clinicalDetailsBean.regNo}" styleClass="normal_field_format" id="text"/>
       <rich:suggestionbox id="suggestionBoxId" for="text" tokens=",["
       rules="#{suggestionBox.rules}"
       suggestionAction="#{clinicalDetailsBean.regNoList}" var="result"
       fetchValue="#{result.regNo}"
       border="1"
       width="100"
       height="100"
       nothingLabel="No capitals found" >
       <h:column>
       <f:facet name="header">
       <h:outputText value="123"></h:outputText>
       </f:facet>
       </h:column>
       <h:column>
       <h:outputText value="#{result}" />
       </h:column>
       </rich:suggestionbox>
       </rich:column>
      


        • 1. Re: SuggestionBox is not working
          Ilya Shaikovsky Master

          what did you mean under "not working"? JS error, suggestion action isn't called, empty list show.. or something else?

          check that
          1) server action returns the values you need
          2) no errors in a4j:log

          • 2. Re: SuggestionBox is not working
            cyberanto Newbie

            kks, I assume with "not working" you mean that the backing bean is not updated ... In order to do this, add after the last column statement (but before you close the suggestionbox):

            <a4j:support id="autoUpdateSupport" event="onselect" action="#{clinicalDetailsBean.updateRegNo}"></a4j:support>

            The action can be a dummy action just registering that it got called.

            Also, the use of the header facet in the suggestionbox but without column value seems suspect.

            As an aside, I had problems using non-string values as fetchValues without a converter.

            • 3. Re: SuggestionBox is not working
              marx3 Apprentice

              Do you use ajaxLoadingModalBox? I switched it off and suggestbox has started to work. Probably there is some problem with z-index'es of modal panel and suggestbox list.
              Now I have a problem that I can't choose value from list using up/down cursors. It was possible in earlier version.

              • 4. Re: SuggestionBox is not working
                Ilya Shaikovsky Master

                cyberanto

                As an aside, I had problems using non-string values as fetchValues without a converter.


                And how the component should knows something about complex object without a converter? It's mandatory in this case.

                Also, the use of the header facet in the suggestionbox but without column value seems suspect.


                We didn't renders facets for columns in suggestion list.
                For "not found" label for example you need to use apropriate attribute.

                Marx3
                Now I have a problem that I can't choose value from list using up/down cursors. It was possible in earlier version.

                Known bug.

                • 5. Re: SuggestionBox is not working
                  marx3 Apprentice

                  is it fixed in CVS? If no, can you give me JIRA number to watch?