Differences between revisions 6 and 7
Revision 6 as of 2006-05-17 17:20:42
Size: 962
Editor: GrantSmith
Comment:
Revision 7 as of 2009-09-20 23:01:24
Size: 962
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

Focus Component

Author: Rogério Araújo

A component that controls the focus on the page across submissions, this component is available under sandbox subproject.

Focus currently has only one attribute called "for". In this attribute you must specify the component that will be focused after page load/reload.

For assistance, send email to rogerio.araujo@gmail.com

Example

<html [...] xmlns:s="http://myfaces.apache.org/sandbox">
[...]
    <h:form id="form">
        <h:inputText value="#{value}" id="name" />
        [...]
        <s:focus id="focus" for="#{bean.focus}" />
    </h:form>
[...]
</html>

Implementation notes

  • The Focus component must be placed after all other components. Safest bet is to put it right before the closing </h:form> tag because this component point to another component in jsf tree. This is probably also true for other JSF implementations.

Focus (last edited 2009-09-20 23:01:24 by localhost)