Use case - Our requirement was to remove reset and save buttons and show just Search button.
In af:query by default Basic mode gets enabled, which can be updated from ViewCriteria UIHints to basic.
Basic mode for Employee VO will look something like below:
There is no direct way to just hide buttons but we can change displayMode="simple" and UI will look like something below:
Now to implement Search button we can add a command button additional with Execute operation.
<af:panelGroupLayout layout="vertical" id="pgl1">
<af:panelHeader text="EmployeesEO" id="ph1">
<af:query id="qryId1" headerText="Search" disclosed="true"
queryListener="#{bindings.EmployeesViewCriteriaQuery.processQuery}"
queryOperationListener="#{bindings.EmployeesViewCriteriaQuery.processQueryOperation}"
value="#{bindings.EmployeesViewCriteriaQuery.queryDescriptor}"
model="#{bindings.EmployeesViewCriteriaQuery.queryModel}"
displayMode="simple" modeChangeVisible="false" saveQueryMode="hidden"
resultComponentId="::resId1">
</af:query>
<af:commandButton actionListener="#{test.executeMyQuery}"
text="Search"
id="cb1"/>
</af:panelHeader>
*Comments and feedback are most welcomed, Thanks.
In af:query by default Basic mode gets enabled, which can be updated from ViewCriteria UIHints to basic.
Basic mode for Employee VO will look something like below:
There is no direct way to just hide buttons but we can change displayMode="simple" and UI will look like something below:
Now to implement Search button we can add a command button additional with Execute operation.
<af:panelGroupLayout layout="vertical" id="pgl1">
<af:panelHeader text="EmployeesEO" id="ph1">
<af:query id="qryId1" headerText="Search" disclosed="true"
queryListener="#{bindings.EmployeesViewCriteriaQuery.processQuery}"
queryOperationListener="#{bindings.EmployeesViewCriteriaQuery.processQueryOperation}"
value="#{bindings.EmployeesViewCriteriaQuery.queryDescriptor}"
model="#{bindings.EmployeesViewCriteriaQuery.queryModel}"
displayMode="simple" modeChangeVisible="false" saveQueryMode="hidden"
resultComponentId="::resId1">
</af:query>
<af:commandButton actionListener="#{test.executeMyQuery}"
text="Search"
id="cb1"/>
</af:panelHeader>
*Comments and feedback are most welcomed, Thanks.