voyent
icecore:defaultAction and ace:autoCompleteEntry  XML
Forum Index -> General Help
Author Message
chrisb-tm

Joined: 26/Jun/2012 15:03:04
Messages: 38
Offline


I am using IceFaces 4.1.

I have a page which is using icecore:defaultAction to perform a search when the user presses Enter. For example:

Code:
 <icecore:defaultAction action="#{recordsSearchController.performSearch}" key="Enter"/>
 


I also have an ace:autoCompleteEntry on the same page.

The problem I have occurs when the user is navigating the autoCompleteEntry's list and selects one with Enter. The item is not being selected, and the search is being performed. The behavior I want is to select the item and not perform the search.

In my debugging of the problem, neither the onKeyDown nor onKeyPress code for the autoCompleteEntry is being called. It looks like it is directly calling the default action.

Is this the designed behavior? It seems like the default action should only occur if something else hasn't handled the Enter key.

Any advice is greatly appreciated.

Thanks.

- Chris


artzambrano

Joined: 21/Mar/2007 00:00:00
Messages: 175
Offline


Hi Chris,

It seems like icecore:defaultAction is just taking precedence over the keydown and keypress events.

I created this JIRA to track this issue:

http://jira.icesoft.org/browse/ICE-11386

Meanwhile, I would recommend having the ace:autoCompleteEntry component in a separate form that doesn't have and icecore:defaultAction tag. Just use ace:ajax with execute="@all" and have it perform a listener similar to your performSearch listener.

Art

Art Zambrano
ICEsoft Technologies Inc.
Bitochen

Joined: 22/Feb/2018 03:12:44
Messages: 1
Offline


Hey,check out this topic:
http://www.icesoft.org/wiki/display/ICE/jsEventListener
May help.There were a couple of useful things on the topic "autoCompleteEntry"
All the best.

Regards Bitochen.
 
Forum Index -> General Help
Go to:   
Powered by JForum 2.1.7ice © JForum Team