Official homepage: http://www.seamframework.org/Home
Development environment: JBoss Developer Studio (or use eclipse+jbosstools[http://www.jboss.org/tools/download/index.html] is also available).
In the IDE environment, create a new seam project by creating a new seam Web project, and after configuring the database, the model class is automatically created using seam Generate entities.
Unfortunately, seam Generate entities function is not very good, feel the use of it to generate Pojo many database types can not be used (for example, some of the database tables in the text type, etc.), I hope that seam in future versions can be improved in this respect.
The new project is roughly as follows:
The Lib list used is roughly:
Antlr-runtime.jar
Commons-beanutils.jar
Commons-digester.jar
Core.jar
Drools-compiler.jar
Drools-core.jar
Jboss-el.jar
Jboss-seam-debug.jar
Jboss-seam-ioc.jar
Jboss-seam-mail.jar
Jboss-seam-pdf.jar
Jboss-seam-remoting.jar
Jboss-seam-ui.jar
Jboss-seam.jar
Jbpm-jpdl.jar
Jsf-facelets.jar
Mvel14.jar
Richfaces-api.jar
Richfaces-impl.jar
Richfaces-ui.jar
Database is MySQL, the new database Tutorial,ddl as follows: SET foreign_key_checks=0; --------------------------------Table structure for person------------------------------CREATE Table ' person ' (' I d ' Int (one) not null auto_increment, ' name ' varchar is not null, ' sex ' char (1) is not NULL, ' age ' int (one) not NULL, P Rimary KEY (' id ')) engine=myisam auto_increment=2 DEFAULT Charset=utf8; --------------------------------Records------------------------------INSERT into the ' person ' VALUES (' 1 ', ' shenbin ', ' M ', ' 28 ');
Note: You also need to deploy the data source under JBoss:
Tutorial-ds.xml <?xml version= "1.0" encoding= "UTF-8"?> <! Doctype datasources PUBLIC "-//jboss//dtd jboss jca config 1.5//en " " Http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd "> <datasources> <local-tx-datasource> <jndi-name>tutorialDatasource</jndi-name> <connection-url>jdbc:mysql://localhost:3306/tutorial</connection-url> <driver-class>com.mysql.jdbc.Driver</driver-class> <user-name>root</user-name> <password>root</password > <!-- <exception-sorter-class-name> org.jboss.resource. Adapter.jdbc.vendor.MySQLExceptionSorter </exception-sorter-class-name > <metadata> <type-mapping>mySQL</type-mapping> </metadata>--> </local-tx-datasource> </datasources>
After starting the JBoss server, Access: Http://localhost:8080/tutorial/home.seam.
The following is a demo of the test page:
Information about seam (unfortunately the Seam1.2 version of the information, but roughly the same):
Http://www.ibm.com/developerworks/cn/java/j-seam1/?S_TACT=105AGX52&S_CMP=tec.cto
Http://www.ibm.com/developerworks/cn/java/j-seam2/?S_TACT=105AGX52&S_CMP=tec.cto
Http://www.ibm.com/developerworks/cn/java/j-seam3/?S_TACT=105AGX52&S_CMP=tec.cto
Powerful controls:
Http://livedemo.exadel.com/richfaces-demo/richfaces/paint2D.jsf?c=paint2d&tab=usage