JARCH SHOWCASE
JARCH SHOWCASE
Focus Focus manages element focus in forms. By default first visible and enabled input element(e.g. text, textarea, select) is chosen to receive focus automatically. It is also possible to explicitly declare the component to receive focus via the for attribute. Focus is also aware of failed validations, first invalid input component receives a focus automatically.
Register
<a:form>
    <a:panel id="panel" header="Register">

        <a:focus context="panel"/>

        <a:messages />

        <h:panelGrid columns="3">
            <a:outputLabel for="username" value="Username" />
            <a:inputText id="username" value="#{focusView.username}" required="true" label="Firstname">
                <f:validateLength minimum="2" />
            </a:inputText>
            <a:message for="username" />

            <a:outputLabel for="email" value="Email" />
            <a:inputText id="email" value="#{focusView.email}" required="true" label="Surname"/>
            <a:message for="email" />
        </h:panelGrid>

        <a:commandButton id="submitButton" value="Save" update="@parent" actionListener="#{focusView.save}" />
    </a:panel>
</a:form>
                
JARCH, Copyright © 2022 All rights reserved. Running JARCH 24.3.0-SNAPSHOT on PrimeFaces-12.0.0 on Mojarra-2.3.13.