[ 
https://issues.jboss.org/browse/RF-13251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12927212#comment-12927212
 ] 

Lukáš Fryč commented on RF-13251:
---------------------------------

Focus (and FocusManager) works with any 
[tabbable|http://api.jqueryui.com/tabbable-selector/] input including 
autocomplete.

I have checked on a modified sample in richfaces-showcase using 
focus-preserving approach:

{code}
<h:form>
        <rich:focus preserve="true" />
        
        <rich:autocomplete id="autocomplete" mode="cachedAjax" minChars="2" 
autocompleteMethod="#{autocompleteBean.autocomplete}" />
        
        <a4j:commandButton render="autocomplete" />
    </h:form>
{code}

When you hit commandButton, the autocomplete is re-rendered and rich:focus then 
brings focus back to the component thas was focused before the request 
(autocomplete).
                
> FocusManager to support complex components like rich:autocomplete
> -----------------------------------------------------------------
>
>                 Key: RF-13251
>                 URL: https://issues.jboss.org/browse/RF-13251
>             Project: RichFaces
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: component-misc
>    Affects Versions: 4.3.4
>            Reporter: Immo Benjes
>            Assignee: Lukáš Fryč
>            Priority: Minor
>
> Currently the FocusManager in Richfaces only works on 'simple' UI components 
> like h:inputText or h:selectOneMenu but not on more complex components like 
> rich:autocomplete.
> It would be good if FocusManager could support complex components or 'real' 
> Ids as generated for that page.
> The use case for the support on autocomplete is like this:
> User has to enter multiple 'entities'. A rich:autocomplete is used to select 
> the entity and add it to a list. After each ajax submit the focus gets lost 
> and the user has to manually set the focus back to the autocomplete input 
> field.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues

Reply via email to