Tuesday, September 15, 2020

Migrating the view layer

Convert project to Facelets


1. Open the application which you would like to migrate

2. Select the view controller project and right click, from the menu select Convert to Facelets

3. Select Change Page Extensions and click preview in log

4.  


5. If everything goes well all the files would be converted into facelets and success message should be displayed.

6. Go to view controller and you should notice all the .jspx files are converted into .jsf files and .jsff stays the same.

7. This converter changes the tags in the header of the pages and fragments, adapts the libraries in the ViewController project.

8. New headline in a page based on Facelets:

<ui:composition xmlns:af=http://xmlns.oracle.com/adf/faces/rich xmlns:f="http://java.sun.com/jsf/core" xmlns:dvt="http://xmlns.oracle.com/dss/adf/faces" xmlns:ui="http://java.sun.com/jsf/facelets">


Old headline in a page based in JSP:


<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:af="http://xmlns.oracle.com/adf/faces/rich" xmlns:f="http://java.sun.com/jsf/core" xmlns:dvt="http://xmlns.oracle.com/dss/adf/faces" xmlns


Properties File

You have to take care about the used resource bundles inside a page. 

After conversion sometimes the entry of the variable which point to the correct resource bundle file is missing or the resource bundle is not recognized (highlighted with yellow warning in jdeveloper). 

If the resource bundle entry is available and the warning is issued, then delete the <c:set> entry of the resource bundle at the top of the page fragment.

You have to add one label of a component via the “Select Resource” wizard – afterward the entry is available again.

A new entry is added with the resource bundle and the values from properties file should be recognised by jdeveloper.

No comments:

Post a Comment