Building Apps with ADF (Activity Guide) 下载本文

Unauthorized reproduction or distribution prohibited? Copyright? 2013, Oracle and/or its affiliates?

jaY

a s?aPractice for Lesson 11 h e)dimot GuChapter 11 c?eenlcratudoS@ gsin thad?usena ujotase y( ngencaliD nau

tr-nno

efsan

elbra

Unauthorized reproduction or distribution prohibited? Copyright? 2013, Oracle and/or its affiliates?

jaY

a s?ah e)dimot Guc?eenlcratudoS@ gsin thad?usena ujotase y( ngencaliD nau

tr-nno

efsan

elbra

Practices for Lesson 11: Customizing the Application Look-and-Feel Practices Overview

In this practice, you create a search page that allows users to select a skin (from a list), which is then applied to the page. All the style sheets are created for you. You need to include them and the configuration file. You also create a bean that is used to dynamically discover the skin

family, which is configured in the trinidad-skins.xml file, and then return it to a list of skins displayed in a drop-down list.

Unauthorized reproduction or distribution prohibited? Copyright? 2013, Oracle and/or its affiliates?

The practice has the following sections:

? ? ? ?

Including style sheets

Creating a Managed Bean to control skins Adding a drop-down list to select the skin Changing the characteristics of a skin

If you successfully completed all the sections of the previous practice, you can continue to work in the same project. However, if you prefer to start with a “clean” application that contains everything completed up to the start of this lesson, you need to open

<LABS_HOME>\applications\ADFII_ENDOF9\ADFII_EndOf9.jws.

jaY

a s?ah e)dimot Guc?eenlcratudoS@ gsin thad?usena ujotase y( ngencaliD nau

tr-nno

efsan

elbra

Overview

After you have designed and created the style sheets, they must be included within JDeveloper. In this practice, you add skins and a configuration file.

Unauthorized reproduction or distribution prohibited? Copyright? 2013, Oracle and/or its affiliates?

Task

1. Include style sheets and a configuration file.

a. In Windows Explorer, expand D:\labs\files\and select the skins directory. b. Copy the skins directory and paste it into your application at the following location

(…ADFII\ViewController\public_html). This directory contains all the .css style sheet files.

c. To view the files in JDeveloper, select the ViewController project and click Refresh in

the Application Navigator. Alternatively, you can use the View > Refresh menu command.

d. Back in Windows Explorer, copy D:\labs\files\trinidad-skins.xml and paste

it into the (…ADFII\ViewController\public_html\WEB-INF) directory. This file defines the skin families, renders kits, and style sheet names.

e. Back in JDeveloper; refresh the ViewController project to see the new file.

jaY

a s?ah e)d imot Guc?eenl cratudoS@ gsin thad?usena ujotase y( ngencaliD nau

tr-nno

efsan

elbra