![]() ![]() When adding ICEfaces components to the file, you need the ICEfaces ICE Components palette category. Instead of creating a JSPX file, create a new XHTML file and select the ICEfaces template. Note that the old tutorial uses the class name CustomerBean instead of Customer. Fill in the details and click Finish.įollow the changes to the SessionBean class in the old tutorial but the package for your Customer and CustomerDAO classes will likely be different. The wizard is a little different from the one shown in the old tutorial but not completely – click “Create a new Java class” option on the first page, the next page is a standard new class wizard and then you get taken to a screen similar to the old wizard. To add a new bean, just edit the faces-config.xml file, click the Managed Beans tab then click Add. There is no need to create a package ahead of defining the new session bean, as the new bean wizard will do that, if necessary. For the ICEfaces facet, again, keep the target runtime and deselect the Mobi ICEfaces library. When installing the JSF facet, choose version 2.0, keep the target runtime of MyEclipse Tomcat 7 and set the JSF implementation to Mojarra 2.0.3. To add the JSF and ICEfaces capabilities, use the menu items MyEclipse->Project Facets->Install JavaServer Faces Facet and Install ICEfaces Facet. Now follow the old ICEfaces tutorial, essentially from step 2, but noting the following changes.Other libraries may work and other platforms may work but I tried to follow the tutorial as closely as I could. If the EclipseLink 2.4 libraries don’t show when you select User Libraries, in step 2.3, follow the instructions for downloading that library, so it can be selected. I followed the tutorial’s screenshots in selecting the EclipseLink 2.4 libraries and keeping the target runtime of MyEclipse Tomcat 7. In the generated code, delete references to the Payment object, as the ICEfaces tutorial doesn’t use that and we didn’t generate code for it – this means the constructor for Customer has to be shortened and some other code needs to be deleted. In step 3, select the Customer table, not the Productline table. I also selected MyEclipse Tomcat 7 as the runtime, though I’m not sure if this is crucial. Follow the JPA tutorial, steps 1, 2 and 3 but create a Web Project, rather than a Java project, accepting defaults.In the meantime, I managed to get the tutorial working by using the following steps. Yes, the ICEfaces tutorial is out of date.
0 Comments
Leave a Reply. |