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.

8.1. Enabling Insert<br />

8.1.1. Allowing Inserting Data in a Form Page<br />

8.1.2. Building Insert Only Form Pages<br />

Use property Single-Row Insert allowed? <strong>JHeadstart</strong> will generate a ‘New’ button on<br />

the page.<br />

Sometimes you want a page where the user can only enter new records, for example an<br />

application for entering new service requests. In this case, a user must not be able to<br />

query other data.<br />

In such a case, set Layout Style to form, Advanced Search? and Quick Search?<br />

properties to none, and disable Auto Query ? for the group.<br />

When generating, you will get a warning now. To really disable all query functionality<br />

for the group, change the View Object query settings. Go to the View Object and change<br />

the view into an ‘Insert only’ View.<br />

If you test the page by running the page directly from JDeveloper, you will see that it<br />

does not start with a new empty row. This is because with insert-only pages, the creation<br />

of a new row is performed when JSF navigates to a special Start[groupName] outcome,<br />

which occurs if you navigate to the page from a menu 1 tab for example. So always test<br />

the page through clicking a tab, or by creating a home page that uses the<br />

Start[groupName] outcome. If you nevertheless want to start the page directly in insert<br />

mode, you should include a request parameter Start[groupName]=true in the URL that<br />

you use to start the page.<br />

8- 2 Generating Transactional 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!