<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"xmlns:ui="http://java.sun.com/jsf/facelets"xmlns:f="http://java.sun.com/jsf/core"xmlns:h="http://java.sun.com/jsf/html"xmlns:focus="http://richfaces.org/sandbox/focus"xmlns:rich="http://richfaces.org/rich"><head><title>Focus sample</title></head><body><ui:includesrc="menu.xhtml"/><p>Focus should be placed on username :<ul><li>username gets default priority 0</li><li>email gets priority 1</li></ul></p><h:form><h:panelGridcolumns="3"><h:outputLabelvalue="Username"for="username"/><h:inputTextvalue="#{username}"id="username"required="true"><focus:focus/></h:inputText><h:messagefor="username"/><h:outputLabelvalue="Email"for="email"/><h:inputTextvalue="#{email}"id="email"required="true"/><h:messagefor="email"/></h:panelGrid><h:commandButtonvalue="Submit"/><focus:focusfor="email"/></h:form><rich:insertsrc="/focus_3.xhtml"highlight="html"/></body></html>