Details
-
Type: Bug
-
Status: Open
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: 3.3
-
Fix Version/s: None
-
Component/s: ACE-Components
-
Labels:None
-
Environment:Liferay 6.1.2 on Tomcat 7.40, Java 7
Description
Consider the following snippet:
<ice:form style="display: inline-block;width:100%">
<ace:autoCompleteEntry
id="ace1"
textChangeListener="#{conceptListHandlerTest.textChanged}"
valueChangeListener="#{conceptListHandlerTest.valueChanged}"
listVar="item"
listValue="#{conceptListHandlerTest.selectTerms}"
filterBy="#{item.label}">
<f:facet name="row">
<h:outputText value="#{item.label}"/>
</f:facet>
</ace:autoCompleteEntry>
<ace:autoCompleteEntry
id="ace2"
textChangeListener="#{tagListHandlerTest.textChanged}"
valueChangeListener="#{tagListHandlerTest.valueChanged}"
listVar="item"
listValue="#{tagListHandlerTest.selectTerms}"
filterBy="#{item.label}">
<f:facet name="row">
<h:outputText value="#{item.label}"/>
</f:facet>
</ace:autoCompleteEntry>
</ice:form>
On keypress in 'ace1' two things happen in the following order:
1) firing "tagListHandlerTest.valueChanged" from ace2 (which is INCORRECT)
2) firing "conceptListHandlerTest.textChanged" from ace1 (which is CORRECT)
Prevent firing value change on other autocompleteentry components in the same form.
<ice:form style="display: inline-block;width:100%">
<ace:autoCompleteEntry
id="ace1"
textChangeListener="#{conceptListHandlerTest.textChanged}"
valueChangeListener="#{conceptListHandlerTest.valueChanged}"
listVar="item"
listValue="#{conceptListHandlerTest.selectTerms}"
filterBy="#{item.label}">
<f:facet name="row">
<h:outputText value="#{item.label}"/>
</f:facet>
</ace:autoCompleteEntry>
<ace:autoCompleteEntry
id="ace2"
textChangeListener="#{tagListHandlerTest.textChanged}"
valueChangeListener="#{tagListHandlerTest.valueChanged}"
listVar="item"
listValue="#{tagListHandlerTest.selectTerms}"
filterBy="#{item.label}">
<f:facet name="row">
<h:outputText value="#{item.label}"/>
</f:facet>
</ace:autoCompleteEntry>
</ice:form>
On keypress in 'ace1' two things happen in the following order:
1) firing "tagListHandlerTest.valueChanged" from ace2 (which is INCORRECT)
2) firing "conceptListHandlerTest.textChanged" from ace1 (which is CORRECT)
Prevent firing value change on other autocompleteentry components in the same form.
This doesn't happen only between 2 autocompleteEntry components.
I tested a form with a 'autocompleteEntry' and a 'h:selectOneMenu' component and it has a similar behavior. The scenario is :
1) Press key down / key up to select a value from the autocomplete list and press escape
2) Go the 'selectOneMenu' and select one option.
The autocomplete list for the 'autocompleteEntry' appears and stays visible until the focus goes to the autocomplete component and escape key is pressed.
If 2 'autocompleteEntry' components and a 'selectOneMenu' are available, then the autocomplete lists will appear for both(if the autocomplete list has been visible for both components at least once).
The same behavior is consistent with every component that offers a select option and one or more autocompleteEntry components.
PS: I use icefaces 4.0.0 , java 8 and glassfish 4.1.