arya-blue
luna-amber
luna-blue
luna-green
luna-pink
nova-dark
nova-light
saga-blue
vela-blue
MarkText - Wildcard Search
Wildcard search example for pe:markText demonstrating the wildcards attribute.
Search term:
Wildcard Mode:
Searchable Content

The quick brown fox jumps over the lazy dog. Running is essential for fitness. Programming and design go hand in hand.

Backend Data from Mark Event Listener
Last Matched Terms: No data received yet
Last Positions: No data received yet
Source

                <h:panelGrid columns="2" columnClasses="label,value">
        <h:outputText value="Search term:"/>
        <p:inputText id="searchInput" value="#{markTextWildcardController.searchTerm}" placeholder="Enter search term"
                     onkeyup="PF('markTextWidget').updateMark(this.value)">
        </p:inputText>

        <h:outputText value="Wildcard Mode:"/>
        <p:selectOneMenu id="wildcards" value="#{markTextWildcardController.wildcards}"
                         onchange="PF('markTextWidget').wildcards=this.value; PF('markTextWidget').updateMark(PF('markTextWidget').value);">
            <f:selectItem itemValue="disabled" itemLabel="Disabled" />
            <f:selectItem itemValue="enabled" itemLabel="Enabled (no spaces)" />
            <f:selectItem itemValue="withSpaces" itemLabel="Enabled (with spaces)" />
        </p:selectOneMenu>
    </h:panelGrid>

    <p:panel id="searchContainer" header="Searchable Content" style="margin-top: 20px">
        <p>#{markTextWildcardController.processedText}</p>
    </p:panel>

    <p:panel id="backendDataPanel" header="Backend Data from Mark Event Listener" style="margin-top: 20px">
        <h:outputText value="Last Matched Terms: #{empty markTextWildcardController.lastMatchedTerms ? 'No data received yet' : markTextWildcardController.lastMatchedTerms}" />
        <br/>
        <h:outputText value="Last Positions: #{empty markTextWildcardController.lastPositions ? 'No data received yet' : markTextWildcardController.lastPositions}" />
    </p:panel>

    <pe:markText id="markText" widgetVar="markTextWidget" for="searchContainer" value="#{markTextWildcardController.searchTerm}"
                 wildcards="#{markTextWildcardController.wildcards}" styleClass="marktext-highlight" caseSensitive="false">
        <p:ajax event="mark" listener="#{markTextWildcardController.onHighlight}" update="backendDataPanel messages" />
    </pe:markText>
            
Components and more
Documentation pe:
Attributes (move mouse over the names to see data types)
Name Description
No attributes available for this component.
PrimeFaces Extensions Showcase - © 2011-2025,PrimeFaces: 15.0.17,PrimeFaces Extensions: 15.0.17,JSF: Apache MyFaces JSF-2.3 Core Impl 2.3.10,Server: Apache Tomcat (TomEE)/9.0.82 (8.0.16),Build time: 2026-07-09 20:44