Get the App
SLTechnology News&Howtos  ›  Database  › 

Using Oracle ADF Faces in existing jsf web applications

Shulou Source: shulou.com Published: 2022-06-01 10:03:44 09月29日 Update

Oracle ADF Faces(adfFaces) provides rich UI components that simplify your web application development. You can understand the use of adfFaces by studying sample code, the sample code package.

adfFaces defines an API and a basic set of tags to build a web-based user interface, which is based on the JSF framework and extends UI components. This article shows how to use the UI components provided by adfFaces in an existing JSF application.

First, to run the sample code, the minimum environment requirements are J2SE 1.4, Servlet 2.3, JSP 1.2, JSF 1.1, ADF Faces EA13,JSTL 1.0, JDBC-enabled database, or Oracle Toplink.

This article will build on the example described in another article, replacing JSF interfaces with adfFaces for data access. See link for previous examples.

Similar to JSF,adfFaces provides an open API for your Java classes and two JSP tag libraries (HTML & CORE) for pages. In addition,adfFaces also includes a set of resources (images,js,css) for internal use by UI components.

Download the resource package, copy adf-faces-api-ea13.jar, adf-faces-impl-ea13.jar and share-1_1_18.jar into your web project lib library (usually WEB-INF\lib\), unzip adf-faces-install-ea13.zip(including images,js and css) into your web application directory.

Configuration of server-side web.xml:

FacesServlet javax.faces.webapp.FacesServlet 1 FacesServlet /faces/* FacesServlet *.faces... AdfFacesFilter oracle.adf.view.faces.webapp.AdfFacesFilter AdfFacesFilter FacesServlet

Create adf-faces-config.xml, specify additional parameters in this descriptor

true #{prefs.proxy.accessibilityMode} #{prefs.proxy.lookAndFeel}

Follow these steps to modify your existing jsp page

1. Import adfFaces tag library

a) The core library contains UI components, buttons, input boxes, lists, menus, tables, trees, panels, etc.

b) HTML library contains HTML element tags

2. HTML tags using adfFaces, and

...

3. Renaming old jsf tags and attributes

adfFaces provides a set of tags similar to standard jsf, and extends a number of additional tags for use. The two can be mixed, but it is recommended to use the same tags for uniform code style, such as JSF below.

can be converted into

Among them, through the setting of the attributes rows and secret, it can be used to display single lines, multiple lines, and password input.

Use the adfFaces panel tab, which can be used to quickly implement a variety of panel combinations, not detailed here.

Tags: Tags components code applications examples examples pictures attributes interfaces data resources panels pages input minimum two elements parameters can be passed basic Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS OPPO Reno Xiaomi Docker Apple