JARCH SHOWCASE
JARCH SHOWCASE
Watermark Watermark displays a hint about input fields by using native placeholder in modern browsers and a javascript based solution in legacy ones for browser compatibility. In case legacy browsers don't need to be supported, placeholder attribute of input components should be preferred.
<a:form>
    <a:messages id="messages" showDetail="true"/>

    <h:panelGrid columns="3" cellpadding="5" style="margin-bottom:10px">
        <h:outputLabel value="Search: "/>
        <a:inputText id="keyword" value="#{watermarkView.keyword}" required="true" label="Keyword"/>
        <a:watermark for="keyword" value="Search with a keyword" id="watermark" />
    </h:panelGrid>

    <a:commandButton id="regular" actionListener="#{watermarkView.search}" value="Regular" ajax="false" />
    <a:commandButton id="ajax" actionListener="#{watermarkView.search}" value="Ajax"
                        onclick="PrimeFaces.cleanWatermarks();" oncomplete="PrimeFaces.showWatermarks();" update="messages" />
</a:form>
                
JARCH, Copyright © 2022 All rights reserved. Running JARCH 24.3.0-SNAPSHOT on PrimeFaces-12.0.0 on Mojarra-2.3.13.