14.01.2013 Views

Oracle JHeadstart Developer's Guide - Downloads - Oracle

Oracle JHeadstart Developer's Guide - Downloads - Oracle

Oracle JHeadstart Developer's Guide - Downloads - Oracle

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

7.2.3. Using Advanced Search<br />

7.2.4. Using a Query Operator<br />

Again, there are two possibilities when generating Advanced Search functionality:<br />

1. The Search region is in the same page as the rest of the group<br />

2. The Search region is in a separate page.<br />

You control this by setting the Advanced Search? property.<br />

There are several properties that will affect the layout of the Advanced Search Region:<br />

1. The Form Width property indicates the width of the Search Region. The default<br />

value is 10% which will left align the items. If you set the value to a higher<br />

number the items will be located further to the right on the page.<br />

Attention: If you use the Form Width property when generating a<br />

search region for a page of Form layout, this property value will<br />

impact the layout of both the search region and the main form page.<br />

2. The Advanced Search Layout Columns property indicates in how many<br />

columns you want to display your items. By default all the items will be<br />

displayed in one column.<br />

3. Regions of the group. If the items you included in the Advanced Search, are also<br />

included in a region, then by default a region will also be applied to the<br />

advanced search area.<br />

Attention: If you don’t want to apply the group regions to the<br />

advanced search area, you can use a variation on the template<br />

default\search\advancedSearchRegion.vm. Comment out the 3<br />

lines just below the comment ‘Optional RegionContainer…’ by<br />

putting ## in front of each line, and uncomment the 3 lines below<br />

the comment ‘Use the following code instead…’ by removing the ##<br />

in front of each line. Then put those 3 lines instead of the<br />

#ADVANCED_SEARCH_ITEMS() call within the panelForm above. See<br />

the comments in the template, and see the section Using Generator<br />

Templates.<br />

On item level the Query Operator can be set. This operator determines how to query the<br />

data. Examples are contains, endsWith and greaterThan.<br />

By default, the ‘StartsWith’ operator is used for String items. In all other cases the<br />

equality operator is used.<br />

You can change this behavior by setting the Query Operator property for an item. See<br />

the help in the Application Definition editor for possible values of this operator.<br />

A special case is the value ‘setByUser’ for the Query Operator. ‘setByUser’ means the<br />

user of the application can at runtime choose the operator to be used.<br />

1. Set the Query Operator property to ‘SetByUser’.<br />

2. Generate the application<br />

3. Go to the ‘Advanced Search’ region in the generated application. You will see<br />

something like this:<br />

<strong>JHeadstart</strong> Developer’s <strong>Guide</strong> Generating Query Behaviors 7 - 9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!