my page code :
<a:form id="login" focus="username" prependId="false">
<rich:panel>
<f:facet name="header">#{messages['label.login.title']}</f:facet>
<p>#{messages['label.login.hint']}</p>
<div class="dialog">
<h:panelGrid columns="2" rowClasses="prop" columnClasses="name,value">
<h:outputLabel for="username">#{messages['label.login.username']}</h:outputLabel>
<h:inputText id="username"
value="#{identity.username}"/>
<h:outputLabel for="password">#{messages['label.login.password']}</h:outputLabel>
<h:inputSecret id="password"
value="#{identity.password}"/>
<h:outputLabel for="rememberMe">#{messages['label.login.rememberMe']}</h:outputLabel>
<h:selectBooleanCheckbox id="rememberMe"
value="#{identity.rememberMe}"/>
</h:panelGrid>
</div>
</rich:panel>
<div class="actionButtons">
<h:commandButton value="#{messages['button.login']}" action="#{identity.login}"/>
</div>
</a:form>this attribute - specifies the focus to be set after some ajax call.