cornercorner
FeaturesPluginsDocs & SupportCommunityPartners

JSF Pages from Entity class

Author: Jaroslav Pospisil
Version: 1.1
Last update: Sun Dec 08 2006
Introduction: This test specification serves for purpose of testing guide of JSF pages from Entity classes feature. CRUD generator creates basic backing beans for entity classes, selected in wizard and generates also for each of them basic List,Edit,New and Detail pages. This is of course nothing but very crude JSF application,in the end,but it colud be used e.g. for demonstration purposes or for easy input of data into database.
Setup: Make sure you have Sun Java System Application Server 8.2 or Sun Java System Application Server 9 installed on your computer.
NetBeans 5.5.1 will support both servers, so Test JSF pages from Entity class on each one.

Table of Contents

Test suite: Create a New Web Application with JSF Support

Purpose: Create application with JSF support
Setup:

#Test case Description
1Create a New Web Application with JSF Support1. Choose File > NewProject and selecting the Web Application template from the Web category.
2. In the Frameworks page, choose jsf framework.
3. Click finish


Test suite: Create Entity classes

Purpose: Adding Entity classes for JSF pages created later
Setup: Test both ways. In first case is entity class created from existing table in database. In second case is table created from entity class when application is run,of course if it doesn't exist yet.

#Test caseDescription
1Create Entity classes from database 1.Choose File > New File > Persistence > Entity Classes from Database.
2.As datasource select jdbc/sample from the list.IDE will update list of Available tables according to database.
3.Select Add All and click Next.
4.Click Create Persistence Unit and then Create. 5.Provide Package name pkg and click Finish.
2Create Entity classes manually 1.Choose File > New File > Persistence > Entity Class.
2.As Class Name write TestEntity and into Package org.entity.
3.Click FinishFinish.
4.Go to editor and add private String eName; under line with id declaration. 5.Right click and select Refactor > Encapsulate fields and then Next and Do Refactoring - getters and setters will be added. 6.Create another entity classes the same way with different attribute names.


Test suite: Create JSF pages from Entity classes

Purpose: Test of creating JSF pages from Entity classes we created in previous suite.
Setup:

#Test caseDescription
1Creating of JSF pages 1.Right click on a web application.
2.Choose New > File/Folder and selecting JSF Pages from Entity Class from the Persistence category.
3.Click Ad All and Next
4.Click Finish.


Test suite: Run module and check functionality of generated classes

Purpose: Test if the JSF pages were generated correctly and if final applicationm is working.
Setup:

#Test caseDescription
1 Running the web module 1.Right-click on web module in Projects tab and select Run Project
2.Browser will open on page with list of links to pages, where are displayed lists of tables from database. 3.Check all lists,try to add new objects, view, edit, delete.



Generated: Sun Sep 24 2006
Companion
Projects:
MySQL Database Server   GlassFish Community: an Open Source Application Server   Open Solaris  Open JDK: an Open SourceJDK   Mobile & Embedded Community     Sponsored by 
Sponsored by Sun Microsystems