7.3. Templates
Every time you have created a page, a region, a report, or many other entities in APEX, you have accepted the default choice for a very powerful feature, the template. An APEX template is used to provide the look, feel and, in some cases, the functionality of a type of APEX entity.
Templates provide a framework for the target type of entity, a framework that is combined with the items and attributes specified for the entity to produce the result shown to the user. APEX comes with templates for:
Pages
Regions
Reports
Calendars
Lists
Popup List of Values
Labels
Buttons
Breadcrumbs
Templates act as a kind of container for different types of objects. For instance, a page template can include HTML code for the header and footer of a page, as well as HTML that goes before and after any attribute-specified feature of the page. You could even include JavaScript routines in a page template to add functionality to your application pages.
Templates can take advantage of Cascading Style Sheets (CSS), which are used to define the look and feel of HTML pages. The complete understanding and modification of templates is a fairly complex topic, one that is beyond the limited scope of this book. But you can explore the way that templates affect pages, in particular, as well as see the way that templates work with other APEX attributes in the creation of those pages.
Try It Out: Changing a Page TemplateThe quickest way to see templates at work is to change different templates for a region ... |
Get Beginning Oracle® Application Express now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.