Author: amarkhel
Date: 2009-06-25 10:08:27 -0400 (Thu, 25 Jun 2009)
New Revision: 14723
Modified:
branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/User.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/AlbumManager.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/Controller.java
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/UserManager.java
Log:
Modified:
branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/User.java
===================================================================
---
branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/User.java 2009-06-25
11:50:05 UTC (rev 14722)
+++
branches/community/3.3.X/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/User.java 2009-06-25
14:08:27 UTC (rev 14723)
@@ -127,15 +127,9 @@
private String login;
@Transient
- @NotNull
- @NotEmpty
- @Length(min = 3)
private String password;
@Transient
- @NotNull
- @NotEmpty
- @Length(min = 3)
private String confirmPassword;
@Temporal(TemporalType.TIMESTAMP)
Modified:
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/AlbumManager.java
===================================================================
---
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/AlbumManager.java 2009-06-25
11:50:05 UTC (rev 14722)
+++
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/AlbumManager.java 2009-06-25
14:08:27 UTC (rev 14723)
@@ -58,7 +58,7 @@
@In private IAlbumAction albumAction;
@In private User user;
-
+ @In Model model;
@In FacesMessages facesMessages;
/**
@@ -105,7 +105,10 @@
public void createAlbum(Shelf shelf, boolean isShowAlbumAfterCreate){
Album album = new Album();
if(shelf == null){
- if(user.getShelves().size() > 0){
+ if(model.getSelectedShelf() != null){
+ shelf = model.getSelectedShelf();
+ }
+ else if(user.getShelves().size() > 0){
shelf = user.getShelves().get(0);
}
if(shelf == null){
Modified:
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/Controller.java
===================================================================
---
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/Controller.java 2009-06-25
11:50:05 UTC (rev 14722)
+++
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/Controller.java 2009-06-25
14:08:27 UTC (rev 14723)
@@ -22,6 +22,10 @@
import java.io.Serializable;
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
Modified:
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/UserManager.java
===================================================================
---
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/UserManager.java 2009-06-25
11:50:05 UTC (rev 14722)
+++
branches/community/3.3.X/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/UserManager.java 2009-06-25
14:08:27 UTC (rev 14723)
@@ -75,7 +75,7 @@
//This check is actual only on livedemo server to prevent hacks.
//Prevent hackers to mark user as pre-defined
user.setPreDefined(false);
- user.setPasswordHash(HashUtils.hash(user.getPassword()));
+ //user.setPasswordHash(HashUtils.hash(user.getPassword()));
user = userAction.updateUser();
}catch(Exception e){
Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, Constants.UPDATE_USER_ERROR);
Show replies by date