PFS (PrimeFaces Selectors) enables using jQuery Selector API when referencing components.
<div class="card">
<h:form>
<p:panel header="Form">
<div class="formgrid grid p-fluid">
<div class="field col-12 md:col-4">
<h:outputLabel for="txt1" value="Text 1"/>
<p:inputText id="txt1" value="#{selectorView.text1}" required="true" label="Text 1">
<f:validateLength minimum="2"/>
</p:inputText>
<p:message for="txt1"/>
<small>Value: <h:outputText value="#{selectorView.text1}"/></small>
</div>
<div class="field col-12 md:col-4">
<h:outputLabel for="txt2" value="Text 2"/>
<p:inputText id="txt2" value="#{selectorView.text2}" required="true" label="Text 2"/>
<p:message for="txt2"/>
<small>Value: <h:outputText value="#{selectorView.text2}"/></small>
</div>
<div class="field col-12 md:col-4">
<h:outputLabel for="txt3" value="Text 3"/>
<h:selectOneMenu id="txt3" value="#{selectorView.text3}" required="true" label="Text 3" styleClass="w-full">
<f:selectItem itemLabel="Select One" itemValue="" noSelectionOption="true"/>
<f:selectItem itemLabel="Option 1" itemValue="1"/>
<f:selectItem itemLabel="Option 2" itemValue="2"/>
<f:selectItem itemLabel="Option 3" itemValue="3"/>
</h:selectOneMenu>
<p:message for="txt3"/>
<small>Value: <h:outputText value="#{selectorView.text3}"/></small>
</div>
</div>
<p:commandButton update="@(form)" value="All Forms" styleClass="mr-2 mb-2"/>
<p:commandButton update="@(form:last)" value="Last Form" styleClass="mr-2 mb-2"/>
<p:commandButton update="@(.p-panel)" value="All Panels" styleClass="mr-2 mb-2"/>
<p:commandButton process="@(.p-panel :input)" update="@(.p-panel)" value="Inputs of Panel" styleClass="mr-2 mb-2"/>
<p:commandButton process="@(.p-panel :input:not(select))" update="@(.p-panel)" value="Inputs Except Select"/>
<p:growl id="messages"/>
</p:panel>
</h:form>
</div>