Thursday, March 11, 2010

ADF 11g Declarative Components example

Here is a simple example of creating a declarative component to ensure a consistent look and feel for "Address" (Street, City, PostalCode, Country).

Nice definition from an OOW 2009 preso from Lynn M.
Declarative components are -
-Component definitions that are reusable across applications
-When changed, affect all pages that use them
-Made up of any number of other components
-Do not have data binding in their definition
-Published for use in the Component Palette

Now to the lab.

First the SQL to create the demo table -

Drop table myCusts;

Create Table myCusts
(
cust_nr varchar2(20) not null,
cust_name varchar2(40) not null,
cust_email varchar2(40) not null,
cust_telnr varchar2(40) not null,
cust_addressStreet varchar2(40) not null,
cust_addressCity varchar2(40) not null,
cust_addressZip varchar2(10) not null,
cust_addressCountry varchar2(40) not null,
cust_age number(3),
cust_salary number(8),
comments varchar2(255))
;
alter table myCusts add
primary key (cust_nr)
;






























































No comments: