1 Reply Latest reply on Dec 1, 2011 4:16 PM by narvava

    Error while selecting value from rich suggestion box

    narvava Newbie

      Hi All,


      I am using rich suggestion box as combo box due to a requirement. When I select first time value from Suggestion box, it is working fine. But when I try to select the value again from the same suggestion box, I am getting following javascript error.


      I need to implement this very urgently. Could anybody suggest, what could be done to resolve this?


      Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLInputElement.setSelectionRange]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: suggestionbox.js :: <TOP_LEVEL> :: line 7"  data: no]


      Code :

      <h:panelGrid columns="2">

                <h:panelGrid columns="2">

                 <h:panelGrid columns="2" border="0" cellpadding="0"


                  <h:inputText style="margin:0px;width:180px;"

                   id="primaryContact" value="#{sdlRegDetails.primaryContact}" >


                  <h:graphicImage value="/common/images/arrow.png"


                   alt="" />



                <a4j:region id="primaryContactArea">

                <rich:suggestionbox height="100" width="200"

                 usingSuggestObjects="false" immediate="true"


                 var="cnct" for="primaryContact"

                 fetchValue="#{cnct.firstName} #{cnct.lastName}"



                  <h:outputText value="#{cnct.firstName} #{cnct.lastName}"/>


                 <a4j:support event="onselect" ajaxSingle="true" reRender="primaryContact" ignoreDupResponses="true">

                  <f:setPropertyActionListener value="#{cnct.contactId}"

                   target="#{sdlRegDetails.primaryContactId}" />

                  <f:setPropertyActionListener value="#{cnct.firstName} #{cnct.lastName}"

                   target="#{sdlRegDetails.primaryContact}" />