6 Replies Latest reply on May 3, 2010 6:00 AM by Nick Belaevski

    How to submit a page from SugesstionBox?

    null null Newbie

      Hi,

       

      I have converted an JSF component to the Richface's SuggestionBox implementation. I have made the following changes and I am able to get the list of values into it.

       

      <f:subview  id="spOrganizationChoices">

      <h:selectOneMenu  id="cbOrganization"  validator="#{MbnOrganizationChoices.validateOrganization}"

           binding="#{MbnOrganizationChoices.cmbOrganization}"

            value="#{MbnOrganizationChoices.selectedOrgID}"

           onchange="submit()"

            styleClass="filtersValueFont">

               <f:selectItems  value="#{MbnOrganizationChoices.orgList}"/>

           </h:selectOneMenu>

      </f:subview>

       

      Richface Suggestion Box’s  Code:

                   <rich:suggestionbox id="suggestionBoxId" for="text"

                                                 rules="#{SuggestionBox.rules}"                                   

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

                                                onselect="submit()"

                                                 fetchValue="#{result.text}"

                                                 first="#{SuggestionBox.intFirst}"

                                                 minChars="#{SuggestionBox.minchars}"

                                                 shadowOpacity="#{SuggestionBox.shadowOpacity}"

                                                 border="#{SuggestionBox.border}"

                                                 width="#{SuggestionBox.width}"

                                                 height="#{SuggestionBox.height}"

                                                 shadowDepth="#{SuggestionBox.shadowDepth}"

                                                 cellpadding="#{SuggestionBox.cellpadding}"

                                                 usingSuggestObjects="#{SuggestionBox.usingSuggestObjects}">

                         <h:column>

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

                         </h:column>

       

                    <a4j:support ajaxSingle="true" event="onchange"

                               action="#{MyBackBean.refreshData}" reRender="">

                         <f:setPropertyActionListener value="#{result.text}"

                                     target="#{MyBackBean.userID}" />

                         <a4j:ajaxListener type="org.ajax4jsf.ajax.ForceRender" />

                    </a4j:support>

                   </rich:suggestionbox>

       

      But when I select a value from the displayed list, I need to submit the page.

       

      The exisiting JSF implementation has this, but converting into Richfaces doesn't work. Your help on this is highly appreciated. Thanks.

       

      - Thanigai