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.

But if you now run the <strong>JHeadstart</strong> generator, you will lose the new page components and<br />

bindings, so we must find a way to generate them.<br />

6.13.5. Generating the Input Field and Button that Calls the Method<br />

We want <strong>JHeadstart</strong> to leave the increaseSalary and related bindings in the Page<br />

Definition, so we are going to instruct the generator only to overwrite its own <strong>JHeadstart</strong><br />

bindings and leave other bindings alone.<br />

• Go to the Application Definition Editor, and switch to Expert mode (see section<br />

Expert mode). This will ensure that the Generation Settings property category<br />

becomes visible at group level (between Deep Linking and Customization<br />

Settings).<br />

• Go to the Employees group, and uncheck the Clear Page Definition Before<br />

Generation? property.<br />

To get the percentage input field and the increaseSalary button in the generated JSF<br />

page, we are going to customize one of <strong>JHeadstart</strong>'s generator templates. First we need to<br />

find out which template this is. Before making any customizations, ensure that the names<br />

of the used generator templates are included in the sources, as explained in the section<br />

Finding Out Which Generator Templates Are Used.<br />

Then you can open the source of the generated Employees.jspx, and look for<br />

increaseSalary. There is your increaseSalary button with percentage input field in<br />

between the comments explaining which template generated what:<br />

6- 42 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!