Hi,
I have a xhtml page where i have a search option with rich:suggestionbox and a input text tied to it. The inputtext has onchange event defined.
When I type in some value in the rich suggestion box and move focus to any other field, i get javascript error.
I have pasted the code snippet below.
<h:inputText id="acqCompany"
value="#{dealManagedBean.selectedDeal.parentStock.stockName}"
title="Type here for options">
<a4j:support event="onchange"
actionListener="#{dealControllerBean.getSuggestionComponent}"
action="#{dealControllerBean.resetAutoSuggestValues}"
reRender="acquirerPanel"
status="#{dealManagedBean.selectedDeal.dealStatus == 1105 or dealManagedBean.selectedDeal.dealStatus == 1104 ? 't':'acqCmpnyStatus'}"
eventsQueue="suggestQueue1"
disabled="#{dealManagedBean.selectedDeal.dealStatus == 1105 or dealManagedBean.selectedDeal.dealStatus == 1104 ? 'true':'false'}" />
</h:inputText>
<rich:suggestionbox requestDelay="1000" ajaxSingle="false" eventsQueue="parentStockNameSearchQueue" ignoreDupResponses="true" for="acqCompany"
minChars="3" id="parentCompany"
suggestionAction="#{dealControllerBean.stockSearchByStockName}"
var="parentStockNameDetail"
nothingLabel="Stock Name does not exist" width="600">
<h:column>
<f:facet name="header">
<h:outputText style="font-size: 12;" value="Stock Name" />
</f:facet>
#{parentStockNameDetail.stockName}
</h:column>
<h:column>
<f:facet name="header">
<h:outputText style="font-size: 12;" value="Stock Key" />
</f:facet>
#{parentStockNameDetail.stockKey}
</h:column>
<a4j:support event="onselect"
actionListener="#{dealControllerBean.getSuggestionComponent}"
action="#{dealControllerBean.populateStockDetails}"
reRender="acquirerPanel" status="ajaxLoadingStatus">
<f:setPropertyActionListener value="#{parentStockNameDetail.stockId}"
target="#{dealManagedBean.autoSuggestSelectedValue}" />
</a4j:support>
</rich:suggestionbox>
Please suggest whether I can have onchange event for inputext tied to suggestionbox like above. I am using richfaces 3.3.3 version.
Thanks,
Gomathi