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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Reference: See the Javadoc or source of the JhsSearchBean<br />

7.2.6.3. Combining Quick Search and Advanced Search<br />

If you generate both Quick Search and Advanced Search on the same page, by default<br />

the Quick Search region will be visible and the Advanced Search region will be hidden.<br />

Besides the normal Quick Search fields, there will also be a button called 'Advanced<br />

Search', to switch from Quick Search to Advanced Search.<br />

When the user clicks the Advanced Search button, the Quick Search region is hidden and<br />

the Advanced Search region is shown, together with a button called 'Quick Search'.<br />

Which search region is shown initially, is governed by the JhsSearchBean property<br />

quickSearchMode. The Quick Search and Advanced Search regions both use an EL<br />

expression in the “rendered” property that references the quickSearchMode property in<br />

the search bean.<br />

Partial Page rendering is used to switch between Quick Search and Advanced Search.<br />

The button 'Advanced Search' looks like this:<br />

<br />

When this button is pressed, the switchToAdvancedSearchMode() is executed which<br />

sets the quickSearchMode property of the Search Bean to false. The effect is<br />

that when the user goes to a different page, and later returns to this same page,<br />

the Advanced Search region will still be visible, since the Search Bean is stored<br />

on session scope.<br />

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

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

Saved successfully!

Ooh no, something went wrong!