4 Replies Latest reply on Apr 16, 2015 6:24 AM by Bhavesh Shah

    rich:suggestion box randomly [ or some times] sets null value onselect event

    Bhavesh Shah Newbie

      Folks, Facing a weird issue with rich:suggestion box. When suggested value is selected it should set that object to specified setter but sometimes it passes null to target's setter method.

      Library: Richfaces - 3.3.3.x

      Below is how suggestionbox implementation looks like. Don't know what's wrong with it.

       

      <rich:suggestionbox width="410" height="200" frequency="1.5"
      suggestionAction="#{myActionBean.suggestEntities}" var="myActionBean" for="txtBox"
        fetchValue="#{myActionBean.lastName}" onsubmit="stopAutoRefreshFunction(); addSpinner('txtBox');" onbeforedomupdate="removeSpinner('txtBox');"
        minChars="2" limitToList="true" ajaxSingle="true" bypassUpdates="true" ignoreDupResponses="true" immediate="true">
         <h:column>
         <h:outputText value="#{myActionBean.lastName}, #{myActionBean.firstName} #{myActionBean.contactDetail} - #{myActionBean.orgName}" />
         </h:column>
      
         <c:choose>
         <c:when test="${param['submitPageOnSelect'] eq 'true'}">
         <a4j:support event="onselect" oncomplete="suggestComponentConfirmLink()" reRender="visibilityMatch">
         <f:setPropertyActionListener value="#{myActionBean}" target="#{myActionBean.tempEntity}" />
         </a4j:support>
         </c:when>
         <c:otherwise>
         <a4j:support event="onselect" action="#{myActionBean.linkEntity}" status="ajaxStatus"  reRender="searchLinkPanel" oncomplete="clearSearchInput(); hideDisplayEntityChangeMessage(); ">
         <f:setPropertyActionListener value="#{myActionBean}" target="#{myActionBean.tempEntity}" />
         </a4j:support>
         </c:otherwise>
         </c:choose>
      </rich:suggestionbox>