-
1. Re: FocusManager and rich:autocomplete
jhuska Oct 7, 2013 12:43 PM (in response to ibenjes)Hello Immo,
afaik the focus component works only with <h:inputText /> component at the moment. Feel free to issue a feature request. Someone from the community might be interested as well, and will implement it.
-
2. Re: FocusManager and rich:autocomplete
ibenjes Oct 8, 2013 4:10 AM (in response to jhuska)I think it works with e.g. h:selectOneMenu as well but rich:autocomplete creates multiple 'components' which is the problem
-
3. Re: FocusManager and rich:autocomplete
ibenjes Oct 8, 2013 6:08 AM (in response to ibenjes)Feature request created: [RF-13251] FocusManager to support complex components like rich:autocomplete - JBoss Issue Tracker
I don't have much time to look at it at the moment but could someone point me into a rough direction here? What files are involved?
-
4. Re: FocusManager and rich:autocomplete
bleathem Oct 9, 2013 2:16 PM (in response to ibenjes)When I select a suggestion in the autocomplete sample on the showcase, the focus remains within the autocomplete input. How is your use case different such that the autocomplete component loses focus?
http://showcase.richfaces.org/richfaces/component-sample.jsf?demo=autocomplete&skin=blueSky
-
5. Re: FocusManager and rich:autocomplete
ibenjes Oct 10, 2013 5:26 AM (in response to bleathem)Hi Brian,
on the showcase you are not doing an ajax request after an item is selected. For my use case each time an 'entity' is selected via the autocomplete that entity is set on the backing bean via ajax and shown in a list below. It is basically a selectManyList with rich:autocomplete
-
6. Re: FocusManager and rich:autocomplete
bleathem Oct 10, 2013 2:21 PM (in response to ibenjes)Got it - the ajax render causes the autocomplete to lose focus.
Despite the use case in question being better served by an autocompleting select component, I agree with the feature request that the focus component should play nice with the autocomplete one.
-
7. Re: FocusManager and rich:autocomplete
ibenjes Oct 11, 2013 8:49 AM (in response to bleathem)You can't use an autocompleting rich:select component when the initial list is several thousand items long. As far as I know the rich:select item loads all rows pretty much like the h:selectOneMenu. Is there an option to do 'suggestions' like with rich:autocomplete?
Besides that, I wouldn't be surprised if the FocusManager doesn't play nicely with the rich:select either as it creates more than one input field as well (one hidden one normal).
-
8. Re: FocusManager and rich:autocomplete
bleathem Oct 11, 2013 1:12 PM (in response to ibenjes)Immo Benjes wrote:
You can't use an autocompleting rich:select component when the initial list is several thousand items long. As far as I know the rich:select item loads all rows pretty much like the h:selectOneMenu. Is there an option to do 'suggestions' like with rich:autocomplete?
No, this is a currently outstanding feature request for the select component.
[RF-11453] Add autocomplete functionality to the rich:select component - JBoss Issue Tracker
Immo Benjes wrote:
Besides that, I wouldn't be surprised if the FocusManager doesn't play nicely with the rich:select either as it creates more than one input field as well (one hidden one normal).
True, but in this case the interaction would be contained to a single component, and the select component wouldn't lose focus. Hard to say though, since the feature isn't yet implemented
-
9. Re: FocusManager and rich:autocomplete
lfryc Nov 27, 2013 3:18 PM (in response to jhuska)Focus should work for any component that contains anything that is tabbable.