First page Back Continue Last page Graphics


Notes:

Using the af:quickQuery Component (continued)

The Layout attribute, which specifies the quick query layout to be either horizontal or vertical.

The Label attribute, which specifies the name to be displayed at the top of the search panel. It is usually an af:outputText component.

The af:quickQuery tag supports the following three facets:

The criteriaItems facet specifies the component that displays the search attributes of the search object. This component is usually a af:selectOneChoice, but other components can be specified. You are responsible for connecting the quick query component with the model and implementing the queryListener in the model.

The criterionValue facet specifies the component that displays or accepts the value of the search attribute of the search object. This component is usually an input component, such as af:inputText, but other components can be specified. You are responsible for connecting the quick query component with the model and implementing the queryListener in the model.

The end facet, where you can add a command component to enable users to change from a quick query to a query (advanced mode)

The example shown in the slide has the following source code:

<af:quickQuery id="personsViewCriteriaOneQueryId" label="Search" value="#{bindings.PersonsViewCriteriaOneQuery.queryDescriptor}" queryListener="#{bindings.PersonsViewCriteriaOneQuery.quickSearch}" layout="vertical"> <f:facet name="criteriaItems"> <af:selectOneChoice label="criteriaItems" simple="true" shortDesc="value" value="#{bindings.PersonsViewCriteriaOneQuery.selectedItem.value}"> <f:selectItems value="#{bindings.PersonsViewCriteriaOneQuery.searchableItems}"/> </af:selectOneChoice> </f:facet> <f:facet name="criterionValue"> <af:inputText label="criterionValue" simple="true" shortDesc="value" value="#{bindings.PersonsViewCriteriaOneQuery.selectedItem.criterionValue}"/> </f:facet> <f:facet name="end"> <af:commandLink text="Advanced" rendered=“true"/> </f:facet> </af:quickQuery>