View Source

h1. Creating New NetBeans Project without Plugin by creating Libraries:-
\\
\\
{panel}List of topics covered in this tutorial:

# [Acquiring an ICEfaces release|#getice]
# [Create Netbeans libraries| #createLibs]
# [Creating a Dynamic Web Project with JSF 2.2|#creating]

{panel}
\\
----
h3. Development Tools Used

The following tools are used in this tutorial. Note that Netbeans 8 and Tomcat 8 require Java7:
* [Netbeans|https://netbeans.org/downloads/] IDE for Java EE Developers
* [Tomcat 8.x|http://tomcat.apache.org/download-70.cgi] Web Server
* [Java7.x|http://www.oracle.com/technetwork/java/javase/downloads/]
\\
\\
----
h3.{anchor:getice} Download ICEfaces 4
* [ICEfaces downloads | http://www.icesoft.org/java/downloads/icefaces-downloads.jsf] Download ICEfaces 4.0.0
\\
----
\\
h3.{anchor:createLibs}Create Netbeans Libraries
\\
\\
You will want to group create your Netbeans ICEfaces libraries based on your project requirements. This tutorial has grouped the icefaces.jar with the icefaces-ace.jar, and left icefaces-mobi.jar and icepush.jar in their own defined library. If you know you are going to want the mobile components without ace, then you would include the icefaces.jar with the icefaces-mobi.jar. If you are unsure, then you may want to have separate libraries for each of the 4 jars. Both icefaces-mobi.jar and icefaces-ace.jar require icefaces.jar.
Start up Netbeans, then choose Tools and then Libraries:-
\\
\\
!CreateIFLib1.png!
\\
\\


h3.{anchor:creating}Creating a Dynamic Web Project with JSF 2.2 using maven
Step 1 Simply start up Netbeans and then create a Maven -> Web Project
\\
\\
!createMavenWebProject.png!
\\
\\
!createMavenWebProject2.png!
\\
\\
!createMavenWebProject3.png!
\\
\\
Step 2 Add JSF Framework
\\
\\
!addFrameworkJSF.png!
\\
\\
Check the release notes of the particular ICEfaces bundle you have downloaded to determine which versions are supported. Reviewing [ICEfaces-4.0.0-RC1 release notes |http://www.icesoft.org/wiki/display/ICE/ICEfaces+4.0.0.RC1+Release+Notes] indicates Mojarra 2.2.7 is supported, so that would be the version we will include in this project.
[Here | http://www.icesoft.org/wiki/display/ICE/ICEfaces+Release+Notes] is the link to the release notes page, to be used for 4.0.0 and any future releases.
\\
\\
!addFrameworkJSF2.2.png!
\\
\\
Step 3 Add ICEfaces
\\
\\
!addICEfaces.png!
\\
\\
Step 4 Modify Pom.xml for correct version of ICEfaces.
Note that Netbeans incorrectly adds ICEfaces-3.1.0 which is an open source version of ICEfaces for JSF 2.1 (not 2.2). In order to work with JSF 2.2, then you need a minimum of ICEFaces-4.0.0-RC1. Open pom.xml in the project folder and then highlight the version of ICEfaces. Netbeans (assuming you have internet) will then let you know which versions are available from the existing maven repositories registered to it. This tutorial is being written a few days before 4.0.0.GA is released, so the latest version currently available is 4.0.0-RC1. We will select it (for now). Ensure all the ICEfaces jars you are using for this project are the same version!
\\
\\
!modifyPom.png!
\\
\\
Step 5. Remove any reference to compat components (ice namespace). Open welcomeIcefaces.xhtml and remove the highlighted (some are commented out) lines as the following image:-
\\
\\
!getRidOfICEcomps.png!
\\
\\
Step 6. Run it!
\\
\\
!runIt1.png!
\\
\\
Click on the 'ICEfaces Welcome Page' link to view the welcomeToIcefaces.jsf page
\\
\\
!runIt2.png!
\\
\\