My code sample is below:
<h:form id="searchForm" styleClass="searchForm">
<p:panelGrid columns="3">
<p:commandButton id="left-overlay-btn" value="" styleClass="xschnapp-search-filter-menu" />
<p:inputText required="true" placeholder="#{cc.attrs.searchTip}" value="#{cc.attrs.queryProperty}" />
<p:commandButton value=" " id="search" action="#{cc.attrs.searchAction}" styleClass="xschnapp-search-action" ajax="false" />
</p:panelGrid>
<p:defaultCommand target="search" />
</h:form>
I have mentioned p:defaultCommand as search, because I intend search button to be pressed while clicking on 3rd column search button. At the moment, since the left-overlay-btn is in the first column then this button is clicked on hitting enter, if I change the search button from column 3 to column 1, then hitting enter do hit search button. But my requirement is to this button in column 3.
Can somebody please help me.