3 Replies Latest reply on Jun 13, 2011 2:12 PM by vace117

    < rich:suggestionbox > - can it activate w/o typing in the input field?

    vace117

      Hello.

       

      I was looking for a component that would allow me to augment my input field with a suggestion box with some codes and descriptions and allow the user to type any substring of either to narrow down the list. I found <rich:suggestionbox>, which appears to be perfect for this, b/c unlike <rich:comboBox>, it has a 'suggestionAction', thus allowing me to decide how to respond to user text in the input field.

       

      This works great - I think <rich:suggestionbox> is a very cool component, but there is one detail I'm not sure what to do about. In my application experienced users will just start typing either the code or the description and get the suggestions as expected. However, some users will have no idea what to type at all, so they will need to look at the list first. I need to either give them something to click on that will display the suggestions, or perhaps just trigger the activation when the input field has focus.

       

      Can this be done, or am I going to need to do some sort of javascript trickery with faking a keydown event or maybe even adding the onKeyDown listener to the focus event?

       

      Any suggestions would be appreciated.

       

       

       

      Val