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.

When you have selected a row in the LOV, and the LOV window is closed, the<br />

returnListener method returnedFromLov() is executed. This method calls method<br />

copyReturnValues() in the same bean class (LovItemBean), which reads the<br />

returnValues property, and copies back the values.<br />

When you have checked the Use LOV For Validation? checkbox on the item’s List of<br />

Values element in the Application Definition Editor, the valueChangeListener and<br />

autoSubmit properties are generated, like in the above example. These two properties<br />

cause the page to be submitted when the user tabs out the LOV item after changing the<br />

value, and JSF calls the valueChangeListener method validateWithLov(). This method<br />

uses the SearchBean of the LOV page (provided through the lovSearchBean managed<br />

property) to execute a query against the LOV ViewObject Usage. When the query returns<br />

exactly one row, validation is successful and the copyReturnValues() method is called<br />

to copy back the values. When zero or more than one row is returned by the query, the<br />

LOV window is launched.<br />

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

<strong>JHeadstart</strong> Developer’s <strong>Guide</strong> Generating User Interface Widgets 6- 21

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

Saved successfully!

Ooh no, something went wrong!