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.

6.12.2. Cascading Lists<br />

• You cannot use the token $DEPENDS_ON_ITEM_VALUE$ if the item depends<br />

on multiple other items. Instead, use the following expressions depending on the<br />

layout style and search area of the group:<br />

Item usage Expression<br />

Table layout row.<br />

Form layout bindings..inputValue<br />

Search area search.criteria.<br />

For example, to refer to the value of the JobId in the search area, use the<br />

expression #{searchEmployees.criteria.EmployeesJobId}.<br />

• If in your application you have more than one of the abovementioned item<br />

usages, for example you have the dependency in both form layout and search<br />

area, you will have to create multiple dependent items: one for each usage. Make<br />

sure the copied dependent item is displayed only in table layout, or only in the<br />

form layout, or only in the search area, and use the appropriate expression for<br />

each copied item.<br />

If the displayed values in a dropdown list depend on the chosen value in another<br />

dropdown list, we call them cascading lists.<br />

Here are the basic steps to generate this in a form layout using the Region-Countries<br />

example from the HR schema:<br />

• Create a ViewObject on Countries with a where clause named bind param:<br />

region_id = :p_region_id<br />

• define p_region_id on the Bind Params tab of your VO<br />

• Set the Query Bind Parameter property in the dynamic domain created for the<br />

country item drop down list according to the table below, for example:<br />

p_region_id=#{bindings.CountriesRegionId.inputValue}<br />

Item usage Expression<br />

Table layout row.<br />

Form layout bindings..inputValue<br />

Search area search.criteria.<br />

Attention: If you have the same cascading lists in table and form layout,<br />

and/or in a search area, you need to make separate domains, and separate<br />

items for CountryId: one displayed in table layout with the "table" domain<br />

associated, one in form layout with the "form" domain associated, one in<br />

search are with the "search area" domain associated.<br />

6- 34 Generating User Interface Widgets <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!