3 Replies Latest reply on Jun 3, 2009 8:12 AM by knarre knarrjohle

    suggestionbox inside datatable rerender problem

    knarre knarrjohle Newbie

      hi,

      im adding dynamicaly new rows to my datatable, after the focus of the inputfield (with suggestion box) is lost. the problem now is that the suggestion value is set to the bean, but only gets shown after another refresh of the table (after another line gets added)

      <rich:column>
       <f:facet name="header">
       <h:outputText value="Produktname" />
       </f:facet>
       <a4j:region>
       <h:inputText value="#{item.name}" size="30" id="itemInput">
       <a4j:support event="onblur"
       actionListener="#{shoppingBillBean.rowEvent}"
       focus="price"
       status="rowStatus"
       reRender="tablePanel">
       </a4j:support>
       <a4j:status id="rowStatus" onstart="#{rich:component('wait')}.show(),
       #{rich:component('submitButton')}.disable()"
       onstop="#{rich:component('wait')}.hide(),
       #{rich:component('submitButton')}.enable()" />
       </h:inputText>
       </a4j:region>
       <f:facet name="footer">
       <rich:spacer/>
       </f:facet>
       <rich:suggestionbox height="100" width="200"
       suggestionAction="#{shoppingBillBean.autocomplete}"
       var="itemComplete"
       for="itemInput"
       fetchValue="#{itemComplete}"
       nothingLabel="Keine Artikel gefunden"
       ajaxSingle="true">
       <h:column>
       <h:outputText value="#{itemComplete}"/>
       </h:column>
      
       <a4j:support ajaxSingle="true" event="onselect">
       <f:setPropertyActionListener value="#{itemComplete}" target="#{item.name}" />
       </a4j:support>
       </rich:suggestionbox>
       </rich:column>
      


      any ideas how to solve this??

      thank you very much for any suggestions...