[richfaces-svn-commits] JBoss Rich Faces SVN: r13604 - in trunk/test-applications/realworld2/ejb/src/main: java/org/richfaces/realworld/service and 2 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Thu Apr 16 08:26:18 EDT 2009


Author: amarkhel
Date: 2009-04-16 08:26:17 -0400 (Thu, 16 Apr 2009)
New Revision: 13604

Modified:
   trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java
   trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/Constants.java
   trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java
   trunk/test-applications/realworld2/ejb/src/main/resources/META-INF/persistence.xml
   trunk/test-applications/realworld2/ejb/src/main/resources/import.sql
   trunk/test-applications/realworld2/ejb/src/main/resources/realworld-ds.xml
Log:
Fixing bugs

Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java	2009-04-16 11:16:25 UTC (rev 13603)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java	2009-04-16 12:26:17 UTC (rev 13604)
@@ -122,6 +122,9 @@
 	private String password;
 	
 	@Transient
+	@NotNull
+    @NotEmpty
+    @Length(min=3)
 	private String confirmPassword;
 	
 	@Temporal(TemporalType.TIMESTAMP)

Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/Constants.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/Constants.java	2009-04-16 11:16:25 UTC (rev 13603)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/Constants.java	2009-04-16 12:26:17 UTC (rev 13604)
@@ -162,6 +162,7 @@
 	public static final String SHELF_PARAMETER = "shelf";
 	public static final String PATH_PARAMETER = "path";
 	public static final String IMAGE_PATH_EXIST_QUERY = "image-exist";
+	public static final String SEARCH_NO_OPTIONS_ERROR = "You must select at least one search option";
 	private Constants(){
 	}
 }
\ No newline at end of file

Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java	2009-04-16 11:16:25 UTC (rev 13603)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java	2009-04-16 12:26:17 UTC (rev 13604)
@@ -156,6 +156,7 @@
      */
     public void deleteComment(Comment comment) throws RealworldException {
     	try{
+    		em.remove(comment);
     		comment.getImage().removeComment(comment);
     		em.flush();
     	}

Modified: trunk/test-applications/realworld2/ejb/src/main/resources/META-INF/persistence.xml
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/resources/META-INF/persistence.xml	2009-04-16 11:16:25 UTC (rev 13603)
+++ trunk/test-applications/realworld2/ejb/src/main/resources/META-INF/persistence.xml	2009-04-16 12:26:17 UTC (rev 13604)
@@ -22,6 +22,10 @@
          <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
          <property name="hibernate.show_sql" value="true"/>
          <property name="hibernate.format_sql" value="true"/>
+         <property name="hibernate.format_sql" value="true"/>
+         <property name="jboss.entity.manager.factory.jndi.name" 
+          value="java:/realWorldEntityManager"/>
+          <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
       </properties>-->
    </persistence-unit>
     

Modified: trunk/test-applications/realworld2/ejb/src/main/resources/import.sql
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/resources/import.sql	2009-04-16 11:16:25 UTC (rev 13603)
+++ trunk/test-applications/realworld2/ejb/src/main/resources/import.sql	2009-04-16 12:26:17 UTC (rev 13604)
@@ -1,6 +1,6 @@
-INSERT INTO Users(user_id, firstname, secondname, email, login, passwordHash, birthdate, sex, hasAvatar, preDefined) VALUES (1,  'Andrey', 'Markhel', 'amarkhel at exadel.com',  'amarkhel', '8cb2237d0679ca88db6464eac60da96345513964',  '1985-01-08', 0, 0, true);
-INSERT INTO Users(user_id, firstname, secondname, email, login, passwordHash, birthdate, sex, hasAvatar, preDefined) VALUES (2,  'Nick',   'Curtis',  'nkurtis at iba.com',      'Viking',   '8cb2237d0679ca88db6464eac60da96345513964',  '1978-01-08', 1, 0, true);
-INSERT INTO Users(user_id, firstname, secondname, email, login, passwordHash, birthdate, sex, hasAvatar, preDefined) VALUES (3,  'John',   'Smith',   'jsmith at jboss.com',     'Noname',   '8cb2237d0679ca88db6464eac60da96345513964',  '1970-01-08', 1, 0, true);
+INSERT INTO Users(user_id, firstname, secondname, email, login, passwordHash, birthdate, sex, hasAvatar, preDefined) VALUES (1,  'Andrey', 'Markhel', 'amarkhel at exadel.com',  'amarkhel', '8cb2237d0679ca88db6464eac60da96345513964',  '1985-01-08', 0, false, true);
+INSERT INTO Users(user_id, firstname, secondname, email, login, passwordHash, birthdate, sex, hasAvatar, preDefined) VALUES (2,  'Nick',   'Curtis',  'nkurtis at iba.com',      'Viking',   '8cb2237d0679ca88db6464eac60da96345513964',  '1978-01-08', 1, false, true);
+INSERT INTO Users(user_id, firstname, secondname, email, login, passwordHash, birthdate, sex, hasAvatar, preDefined) VALUES (3,  'John',   'Smith',   'jsmith at jboss.com',     'Noname',   '8cb2237d0679ca88db6464eac60da96345513964',  '1970-01-08', 1, false, true);
 
 INSERT INTO shelves(shelf_id, name, description, user_id, created, shared) VALUES (1,  'Nature',  'Nature pictures',  1, '2009-12-18', true);
 INSERT INTO shelves(shelf_id, name, description, user_id, created, shared) VALUES (2,  'Sport',   'Nature pictures',  1, '2009-12-18', true);
@@ -594,3 +594,10 @@
 INSERT INTO metatags(metatag_id, tag) VALUES (29,  'starfish');
 INSERT INTO IMAGES_METATAGS(CI_METATAG_ID, CI_IMAGE_ID) ( select 29, image_id from Images where name like '45021%');
 INSERT INTO IMAGES_METATAGS(CI_METATAG_ID, CI_IMAGE_ID) ( select 29, image_id from Images where name like '45023%');
+UPDATE albums set coveringimage_image_id=0 where album_id = 0;
+UPDATE albums set coveringimage_image_id=15 where album_id = 1;
+UPDATE albums set coveringimage_image_id=30 where album_id = 2;
+UPDATE albums set coveringimage_image_id=45 where album_id = 3;
+UPDATE albums set coveringimage_image_id=60 where album_id = 4;
+UPDATE albums set coveringimage_image_id=80 where album_id = 5;
+UPDATE albums set coveringimage_image_id=95 where album_id = 6;
\ No newline at end of file

Modified: trunk/test-applications/realworld2/ejb/src/main/resources/realworld-ds.xml
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/resources/realworld-ds.xml	2009-04-16 11:16:25 UTC (rev 13603)
+++ trunk/test-applications/realworld2/ejb/src/main/resources/realworld-ds.xml	2009-04-16 12:26:17 UTC (rev 13604)
@@ -7,11 +7,11 @@
 <datasources>
    <local-tx-datasource>
       <jndi-name>realWorldDatasource</jndi-name>
-       <!-- <connection-url>jdbc:postgresql://localhost:5432/realworld</connection-url>
+       <!--<connection-url>jdbc:postgresql://localhost:5432/realworld</connection-url>
       <driver-class>org.postgresql.Driver</driver-class>
       <user-name>realworld</user-name>
       <password>realworld</password>-->
-      <connection-url>jdbc:hsqldb:.</connection-url>
+       <connection-url>jdbc:hsqldb:.</connection-url>
       <driver-class>org.hsqldb.jdbcDriver</driver-class>
       <user-name>sa</user-name>
       <password></password>




More information about the richfaces-svn-commits mailing list