• Settings
    • Locale
    • Change the locale of the datepicker, schedule and client side validation messages.

      Language
      English
      English
      English
      French
      German
      German
      German
      Italian
      Korean
      Spanish
      Catalan
      Dutch
      Portuguese
      Portuguese
      Arabic
      Arabic
      Bulgarian
      Bangla
      Bosnian
      Czech
      Greek
      Estonian
      Persian
      Finnish
      Danish
      Hindi
      Indonesian
      Icelandic
      Croatian
      Japanese
      Hungarian
      Hebrew
      Georgian
      Central Kurdish
      Khmer
      Kyrgyz
      Kazakh
      Lithuanian
      Latvian
      Malay
      Norwegian
      Polish
      Romanian
      Russian
      Slovak
      Slovenian
      Serbian
      Serbian
      Swedish
      Thai
      Turkish
      Ukrainian
      Uzbek
      Vietnamese
      Chinese
      Chinese
  • Resources

Spotlight

Spotlight highlights a certain component on page. In this particular example, panel is highlighted on validation error.

Spotlight Tag Documentation

Spotlight highlights a certain component on page.

NameTypeRequiredDefaultDescription
id String false generated Unique identifier of the component in a namingContainer.
rendered boolean false true Boolean value to specify the rendering of the component, when set to false component will not be rendered.
binding UIComponent false generated An EL expression referring to a server side UIComponent instance in a backing bean.
widgetVar String false generated ('widget_' + componentClientId) Name of the client side widget.
active boolean false false When true, spotlight is activated initially.
blockScroll boolean false false Whether to block scrolling of the document when spotlight is active.
target String false Component to highlight.
Loading...
Tag DocumentationNew DocumentationNew Documentation JSDoc
New User

Usage


<script>
    //<![CDATA[
    function handleForm(xhr, status, args) {
        if (args.validationFailed)
            PF('spot').show();
        else
            PF('spot').hide();
    }

    //]]>
</script>


<div class="card">
    <h:form>
        <p:growl id="growl"/>

        <p:panel id="pnl" header="New User">
            <p:messages id="messages"/>
            <h:panelGrid columns="3" id="grid" cellpadding="7">
                <p:outputLabel for="username" value="Username"/>
                <p:inputText id="username" value="#{spotlightView.username}" required="true">
                    <f:validateLength minimum="2"/>
                </p:inputText>
                <p:message for="username"/>

                <p:outputLabel for="email" value="Surname:"/>
                <p:inputText id="email" value="#{spotlightView.email}" required="true"/>
                <p:message for="email"/>
            </h:panelGrid>

            <p:commandButton value="Save" icon="pi pi-check" action="#{spotlightView.save}" update="growl grid"
                             oncomplete="handleForm(xhr, status, args)" styleClass="mt-3"/>
        </p:panel>

        <p:spotlight target="pnl" widgetVar="spot"/>
    </h:form>
</div>