Author: amarkhel
Date: 2009-03-13 15:23:09 -0400 (Fri, 13 Mar 2009)
New Revision: 12958
Added:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileItem.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileWrapper.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/FlushStrategy.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/ImageLoader.java
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/searchWidget.xhtml
Removed:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/fileupload/
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IAlbumAction.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IImageAction.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IShelfAction.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IUserAction.java
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/ShelfAction.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/UserAction.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/listener/CopyFile.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/listener/CopyImagesStuff.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/DnDManager.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/FileUploadManager.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/RegistrationManager.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ShelfManager.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/ISearchOption.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/ImageSearchHelper.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileUploadBean.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/UserPrefsHelper.java
trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/web.xml
trunk/test-applications/realworld2/web/src/main/webapp/img/Thumbs.db
trunk/test-applications/realworld2/web/src/main/webapp/includes/fileUpload/fileUploader.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/imagePreview.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/register/regInfo.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/search.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/albumsResult.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/imageResult.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/tagsResult.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/userResult.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/userPrefs/userPrefs.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/index.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/layout/template3.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/main.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/register.xhtml
Log:
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java
===================================================================
---
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java 2009-03-13
17:09:04 UTC (rev 12957)
+++
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java 2009-03-13
19:23:09 UTC (rev 12958)
@@ -35,27 +35,32 @@
@In(value="entityManager")
EntityManager em;
-
@In @Out
private User user;
- public void addAlbum(Album album) {
+ public void addAlbum(Album album, boolean isFlushNeeded) {
em.persist(album);
user.addAlbum(album);
- em.flush();
+ if(isFlushNeeded){
+ em.flush();
+ }
}
- public void deleteAlbum(Album album){
+ public void deleteAlbum(Album album, boolean isFlushNeeded){
if(album.getShelf()!=null){
album.getShelf().removeChildAlbum(album);
}else{
user.removeAlbum(album);
}
- em.flush();
+ if(isFlushNeeded){
+ em.flush();
+ }
}
- public void editAlbum(Album album){
- em.flush();
+ public void editAlbum(Album album, boolean isFlushNeeded){
+ if(isFlushNeeded){
+ em.flush();
+ }
}
public void flush(){
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IAlbumAction.java
===================================================================
---
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IAlbumAction.java 2009-03-13
17:09:04 UTC (rev 12957)
+++
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IAlbumAction.java 2009-03-13
19:23:09 UTC (rev 12958)
@@ -27,11 +27,11 @@
@Local
public interface IAlbumAction {
- public abstract void addAlbum(Album album);
+ public abstract void addAlbum(Album album, boolean isFlushNeeded);
- public void deleteAlbum(Album album);
+ public void deleteAlbum(Album album, boolean isFlushNeeded);
- public void editAlbum(Album album);
+ public void editAlbum(Album album, boolean isFlushNeeded);
public abstract void flush();
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IImageAction.java
===================================================================
---
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IImageAction.java 2009-03-13
17:09:04 UTC (rev 12957)
+++
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IImageAction.java 2009-03-13
19:23:09 UTC (rev 12958)
@@ -29,15 +29,15 @@
@Local
public interface IImageAction {
- public abstract void deleteImage(Image image);
+ public abstract void deleteImage(Image image, boolean isFlushNeeded);
- public abstract void editImage(Image image);
+ public abstract void editImage(Image image, boolean isFlushNeeded);
- public abstract void addImage(Image image);
+ public abstract void addImage(Image image, boolean isFlushNeeded);
- public void deleteComment(Comment comment);
+ public void deleteComment(Comment comment, boolean isFlushNeeded);
- public void addComment(Comment comment);
+ public void addComment(Comment comment, boolean isFlushNeeded);
public abstract MetaTag getTagByName(String tag);
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IShelfAction.java
===================================================================
---
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IShelfAction.java 2009-03-13
17:09:04 UTC (rev 12957)
+++
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IShelfAction.java 2009-03-13
19:23:09 UTC (rev 12958)
@@ -11,11 +11,11 @@
@Local
public interface IShelfAction {
- public abstract void addShelf(Shelf shelf);
+ public abstract void addShelf(Shelf shelf, boolean isFlushNeeded);
- public void deleteShelf(Shelf shelf);
+ public void deleteShelf(Shelf shelf, boolean isFlushNeeded);
- public void editShelf(Shelf shelf);
+ public void editShelf(Shelf shelf, boolean isFlushNeeded);
public List<Shelf> getShelfs(User user);
}
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IUserAction.java
===================================================================
---
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IUserAction.java 2009-03-13
17:09:04 UTC (rev 12957)
+++
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IUserAction.java 2009-03-13
19:23:09 UTC (rev 12958)
@@ -27,10 +27,10 @@
@Local
public interface IUserAction {
public User login(String username, String password);
- public void register(User user);
+ public void register(User user, boolean isFlushNeeded);
public boolean isUserExist(String login);
- public void updateUser(User user);
- public void resetUser(User user);
+ public void updateUser(User user, boolean isFlushNeeded);
+ public void resetUser(User user, boolean isFlushNeeded);
public void loginAnonymous();
public Long countAlbums(User user);
public Long countImages(User user);
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-03-13
17:09:04 UTC (rev 12957)
+++
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java 2009-03-13
19:23:09 UTC (rev 12958)
@@ -36,12 +36,14 @@
@In(value="entityManager")
EntityManager em;
- public void deleteImage(Image image){
+ public void deleteImage(Image image, boolean isFlushNeeded){
image.getAlbum().removeImage(image);
- em.flush();
+ if(isFlushNeeded){
+ em.flush();
+ }
}
- public void editImage(Image image) {
+ public void editImage(Image image, boolean isFlushNeeded) {
/*image.setImageTags(null);
String[] tokens = image.getMeta().split(",");
for(String token:tokens){
@@ -56,10 +58,12 @@
image.addMetaTag(t);
}
}*/
- em.flush();
+ if(isFlushNeeded){
+ em.flush();
+ }
}
- public void addImage(Image image) {
+ public void addImage(Image image, boolean isFlushNeeded) {
String[] tokens = image.getMeta().split(",");
for(String token:tokens){
MetaTag t =(MetaTag) em.createQuery("from MetaTag t where t.tag
=:token").setParameter("token", token).getSingleResult();
@@ -75,17 +79,23 @@
}
em.persist(image);
image.getAlbum().addImage(image);
- em.flush();
+ if(isFlushNeeded){
+ em.flush();
+ }
}
- public void deleteComment(Comment comment){
+ public void deleteComment(Comment comment, boolean isFlushNeeded){
comment.getImage().removeComment(comment);
- em.flush();
+ if(isFlushNeeded){
+ em.flush();
+ }
}
- public void addComment(Comment comment){
+ public void addComment(Comment comment, boolean isFlushNeeded){
comment.getImage().addComment(comment);
- em.flush();
+ if(isFlushNeeded){
+ em.flush();
+ }
}
public MetaTag getTagByName(String tag) {
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ShelfAction.java
===================================================================
---
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ShelfAction.java 2009-03-13
17:09:04 UTC (rev 12957)
+++
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ShelfAction.java 2009-03-13
19:23:09 UTC (rev 12958)
@@ -43,19 +43,25 @@
@In @Out
private User user;
- public void addShelf(Shelf shelf) {
+ public void addShelf(Shelf shelf, boolean isFlushNeeded) {
em.persist(shelf);
user.addShelf(shelf);
- em.flush();
+ if(isFlushNeeded){
+ em.flush();
+ }
}
- public void deleteShelf(Shelf shelf){
+ public void deleteShelf(Shelf shelf, boolean isFlushNeeded){
user.removeShelf(shelf);
- em.flush();
+ if(isFlushNeeded){
+ em.flush();
+ }
}
- public void editShelf(Shelf shelf){
- em.flush();
+ public void editShelf(Shelf shelf, boolean isFlushNeeded){
+ if(isFlushNeeded){
+ em.flush();
+ }
}
public List<Shelf> getShelfs(User user) {
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/UserAction.java
===================================================================
---
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/UserAction.java 2009-03-13
17:09:04 UTC (rev 12957)
+++
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/UserAction.java 2009-03-13
19:23:09 UTC (rev 12958)
@@ -51,19 +51,25 @@
.getSingleResult();
}
- public void register(User user) {
+ public void register(User user, boolean isFlushNeeded) {
em.persist(user);
- em.flush();
+ if(isFlushNeeded){
+ em.flush();
+ }
}
- public void updateUser(User user) {
- em.flush();
+ public void updateUser(User user, boolean isFlushNeeded) {
+ if(isFlushNeeded){
+ em.flush();
+ }
this.user = user;
}
- public void resetUser(User user) {
+ public void resetUser(User user, boolean isFlushNeeded) {
em.refresh(user);
- em.flush();
+ if(isFlushNeeded){
+ em.flush();
+ }
this.user = user;
}
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/listener/CopyFile.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/listener/CopyFile.java 2009-03-13
17:09:04 UTC (rev 12957)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/listener/CopyFile.java 2009-03-13
19:23:09 UTC (rev 12958)
@@ -24,6 +24,9 @@
private static int override = OVERWRITE_ASK;
public static Long copyFile(File srcFile, File destFile) throws IOException {
+ if(!srcFile.getPath().toLowerCase().endsWith("jpg") &&
!srcFile.getPath().toLowerCase().endsWith("jpeg")){
+ return -1L;
+ }
InputStream in = new FileInputStream(srcFile);
OutputStream out = new FileOutputStream(destFile);
long millis = System.currentTimeMillis();
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/listener/CopyImagesStuff.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/listener/CopyImagesStuff.java 2009-03-13
17:09:04 UTC (rev 12957)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/listener/CopyImagesStuff.java 2009-03-13
19:23:09 UTC (rev 12958)
@@ -48,6 +48,13 @@
if (!uploadDestFolder.exists()) {
uploadDestFolder.mkdirs();
+ }else{
+ for (String f : uploadDestFolder.list()) {
+ File temp = new File(uploadDestFolder, f);
+ temp.delete();
+ }
+ uploadDestFolder.delete();
+ uploadDestFolder.mkdirs();
}
CopyFile.copyDirectory(uploadFolder, uploadDestFolder);
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java 2009-03-13
17:09:04 UTC (rev 12957)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java 2009-03-13
19:23:09 UTC (rev 12958)
@@ -33,6 +33,7 @@
import org.richfaces.realworld.domain.User;
import org.richfaces.realworld.service.Constants;
import org.richfaces.realworld.service.IAlbumAction;
+import org.richfaces.realworld.util.FlushStrategy;
@Name("albumManager")
@Scope(ScopeType.CONVERSATION)
@@ -41,7 +42,7 @@
private static final long serialVersionUID = 2631634926126857691L;
private String oncomplete = ";";
-
+ @In(create=true) FlushStrategy flushStrategy;
@In(create=true, required=true)
private IAlbumAction albumAction;
@@ -57,7 +58,7 @@
@In @Out Model model;
public void addAlbum(Album album){
- albumAction.addAlbum(album);
+ albumAction.addAlbum(album, flushStrategy.isDatabaseStoreStrategy());
addDirectory();
model.setSelectedImage(null);
model.setSelectedAlbum(album);
@@ -72,7 +73,7 @@
}
public void editAlbum(Album album){
- albumAction.editAlbum(album);
+ albumAction.editAlbum(album, flushStrategy.isDatabaseStoreStrategy());
model.setSelectedAlbum(album);
Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT,
NavigationEnum.ALBUM_PREVIEW);
Events.instance().raiseEvent("albumEdited");
@@ -81,7 +82,7 @@
public void deleteAlbum(Album album){
//Update domain model
String string = album.getId().toString();
- albumAction.deleteAlbum(album);
+ albumAction.deleteAlbum(album, flushStrategy.isDatabaseStoreStrategy());
deleteDirectory(string);
model.setSelectedImage(null);
model.setSelectedAlbum(null);
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/DnDManager.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/DnDManager.java 2009-03-13
17:09:04 UTC (rev 12957)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/DnDManager.java 2009-03-13
19:23:09 UTC (rev 12958)
@@ -34,9 +34,10 @@
import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.domain.Shelf;
import org.richfaces.realworld.domain.User;
-import org.richfaces.realworld.fileupload.FileItem;
import org.richfaces.realworld.service.Constants;
import org.richfaces.realworld.service.IAlbumAction;
+import org.richfaces.realworld.ui.FileItem;
+import org.richfaces.realworld.util.FlushStrategy;
@Name("dndManager")
public class DnDManager implements DropListener {
@@ -46,6 +47,7 @@
FileManager fileManager;
@In(create=true)
IAlbumAction albumAction;
+ @In(create=true) FlushStrategy flushStrategy;
public void processDrop(DropEvent dropEvent) {
Dropzone dropzone = (Dropzone) dropEvent.getComponent();
@@ -86,7 +88,9 @@
return;
}else{
dropValue.addAlbum(dragValue);
- albumAction.flush();
+ if(flushStrategy.isDatabaseStoreStrategy()){
+ albumAction.flush();
+ }
Events.instance().raiseEvent("clearTree");
}
}
@@ -100,14 +104,18 @@
String newPath = getNewPathOfImage(dragValue, dropValue);
dragValue.setPath(newPath);
dropValue.addImage(dragValue);
- albumAction.flush();
+ if(flushStrategy.isDatabaseStoreStrategy()){
+ albumAction.flush();
+ }
}
private void handleUploadedImage(FileItem dragValue, Album dropValue) {
String newPath = generateNewPath(dragValue.getName(), dropValue);
dragValue.getImage().setPath(newPath);
dropValue.addImage(dragValue.getImage());
- albumAction.flush();
+ if(flushStrategy.isDatabaseStoreStrategy()){
+ albumAction.flush();
+ }
fileManager.addImage(newPath, dragValue.getFile().getPath());
Events.instance().raiseEvent("fileAdded", dragValue);
}
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/FileUploadManager.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/FileUploadManager.java 2009-03-13
17:09:04 UTC (rev 12957)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/FileUploadManager.java 2009-03-13
19:23:09 UTC (rev 12958)
@@ -10,9 +10,9 @@
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.core.Events;
-import org.richfaces.realworld.fileupload.FileItem;
-import org.richfaces.realworld.fileupload.FileWrapper;
import org.richfaces.realworld.service.Constants;
+import org.richfaces.realworld.ui.FileItem;
+import org.richfaces.realworld.ui.FileWrapper;
@Name("fileUploadManager")
@Scope(ScopeType.CONVERSATION)
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java 2009-03-13
17:09:04 UTC (rev 12957)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java 2009-03-13
19:23:09 UTC (rev 12958)
@@ -35,6 +35,7 @@
import org.richfaces.realworld.service.Constants;
import org.richfaces.realworld.service.IImageAction;
import org.richfaces.realworld.util.DirectLinkHelper;
+import org.richfaces.realworld.util.FlushStrategy;
@Name("imageManager")
@@ -43,7 +44,7 @@
@In(create=true, required=true)
private IImageAction imageAction;
-
+ @In FlushStrategy flushStrategy;
@In(create=true)
FileManager fileManager;
@@ -57,20 +58,20 @@
public void deleteImage(Image image){
String imagePath = image.getPath();
- imageAction.deleteImage(image);
+ imageAction.deleteImage(image, flushStrategy.isDatabaseStoreStrategy());
fileManager.deleteImage(imagePath);
Events.instance().raiseEvent("imageDeleted");
}
public void editImage(Image image){
- imageAction.editImage(image);
+ imageAction.editImage(image, flushStrategy.isDatabaseStoreStrategy());
Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT,
NavigationEnum.ALBUM_IMAGE_PREVIEW);
Events.instance().raiseEvent("imageEdited");
}
@Observer(Constants.ADD_IMAGE_EVENT)
public void addImage(Image image) {
- imageAction.addImage(image);
+ imageAction.addImage(image, flushStrategy.isDatabaseStoreStrategy());
model.setSelectedAlbum(image.getAlbum());
Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT,
NavigationEnum.IMAGE_PREVIEW);
Events.instance().raiseEvent("imageAdded");
@@ -86,12 +87,12 @@
comment.setImage(image);
comment.setDate(new Date());
comment.setMessage(message);
- imageAction.addComment(comment);
+ imageAction.addComment(comment, flushStrategy.isDatabaseStoreStrategy());
Events.instance().raiseEvent(Constants.CLEAR_EDITOR_EVENT, "");
}
public void deleteComment(Comment comment){
- imageAction.deleteComment(comment);
+ imageAction.deleteComment(comment, flushStrategy.isDatabaseStoreStrategy());
}
public String getImageDirectLink(Image image) {
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/RegistrationManager.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/RegistrationManager.java 2009-03-13
17:09:04 UTC (rev 12957)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/RegistrationManager.java 2009-03-13
19:23:09 UTC (rev 12958)
@@ -18,6 +18,7 @@
import org.richfaces.realworld.service.Constants;
import org.richfaces.realworld.service.IUserAction;
import org.richfaces.realworld.ui.PasswordHolder;
+import org.richfaces.realworld.util.FlushStrategy;
@Name("registerManager")
@Scope(ScopeType.CONVERSATION)
@@ -26,6 +27,8 @@
@In("#{messages['login_success']}")
private String LOGIN_SUCCESS;
+ @In FlushStrategy flushStrategy;
+
@In("#{messages['user.exist']}") private String
USER_WITH_THIS_LOGIN_ALREADY_EXIST;
@In("#{messages['user.confirm.error']}") private String
CONFIRM_PASSWORD_NOT_EQUALS_PASSWORD;
@@ -49,7 +52,7 @@
return "";
}
user.setPasswordHash(passwordHolder.hash(user.getPassword()));
- userAction.register(user);
+ userAction.register(user, flushStrategy.isDatabaseStoreStrategy());
facesMessages.add(LOGIN_SUCCESS);
return "main";
}
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ShelfManager.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ShelfManager.java 2009-03-13
17:09:04 UTC (rev 12957)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ShelfManager.java 2009-03-13
19:23:09 UTC (rev 12958)
@@ -36,6 +36,7 @@
import org.richfaces.realworld.domain.User;
import org.richfaces.realworld.service.Constants;
import org.richfaces.realworld.service.IShelfAction;
+import org.richfaces.realworld.util.FlushStrategy;
@Name("shelfManager")
@Scope(ScopeType.CONVERSATION)
@@ -48,15 +49,14 @@
@In(create=true, required=true)
private IShelfAction shelfAction;
private String oncomplete = ";";
-
+ @In FlushStrategy flushStrategy;
@In @Out Model model;
@In
private User user;
public void addShelf(Shelf shelf){
- shelfAction.addShelf(shelf);
- //Update conversation state
+ shelfAction.addShelf(shelf, flushStrategy.isDatabaseStoreStrategy());
model.setSelectedImage(null);
model.setSelectedAlbum(null);
model.setSelectedShelf(shelf);
@@ -65,7 +65,7 @@
}
public void editShelf(Shelf shelf){
- shelfAction.editShelf(shelf);
+ shelfAction.editShelf(shelf, flushStrategy.isDatabaseStoreStrategy());
model.setSelectedShelf(shelf);
Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT,
NavigationEnum.SHELF_PREVIEW);
}
@@ -76,7 +76,7 @@
for(Album a:shelf.getAlbums()){
directoriesToDelete.add(user.getLogin() + "/" +a.getId());
}
- shelfAction.deleteShelf(shelf);
+ shelfAction.deleteShelf(shelf, flushStrategy.isDatabaseStoreStrategy());
deleteDirectories(directoriesToDelete);
model.setSelectedImage(null);
model.setSelectedAlbum(null);
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/ISearchOption.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/ISearchOption.java 2009-03-13
17:09:04 UTC (rev 12957)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/ISearchOption.java 2009-03-13
19:23:09 UTC (rev 12958)
@@ -13,7 +13,7 @@
*/
public abstract class ISearchOption {
- private boolean selected;
+ private boolean selected = true;
private List<?> searchResult;
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/ImageSearchHelper.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/ImageSearchHelper.java 2009-03-13
17:09:04 UTC (rev 12957)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/search/ImageSearchHelper.java 2009-03-13
19:23:09 UTC (rev 12958)
@@ -48,6 +48,16 @@
options.add(new SearchOptionByTag());
}
+ public String getCriteriaString(){
+ StringBuilder s = new StringBuilder();
+ for(ISearchOption option:options) {
+ if(option.getSelected()){
+ s.append(option.getName() + ",");
+ }
+ }
+ return s.toString();
+ }
+
public void search() {
Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT, NavigationEnum.SEARCH);
Iterator<ISearchOption> it = options.iterator();
Copied:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileItem.java
(from rev 12922,
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/fileupload/FileItem.java)
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileItem.java
(rev 0)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileItem.java 2009-03-13
19:23:09 UTC (rev 12958)
@@ -0,0 +1,82 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+package org.richfaces.realworld.ui;
+
+import java.io.File;
+
+import org.richfaces.realworld.domain.Image;
+
+public class FileItem {
+
+ private Image image = new Image();
+
+ private boolean selected;
+
+ private long length;
+
+ private byte[] data;
+
+ private File file;
+
+ private String name;
+
+ public String getName() {
+ return name;
+ }
+ public void setName(String name) {
+ this.name = name;
+ }
+ public byte[] getData() {
+ return data;
+ }
+ public void setData(byte[] data) {
+ this.data = data;
+ }
+
+ public long getLength() {
+ return length;
+ }
+ public void setLength(long length) {
+ this.length = length;
+ }
+
+ public boolean isSelected() {
+ return selected;
+ }
+
+ public void setSelected(boolean selected) {
+ this.selected = selected;
+ }
+
+ public Image getImage() {
+ return image;
+ }
+
+ public void setImage(Image image) {
+ this.image = image;
+ }
+ public File getFile() {
+ return file;
+ }
+ public void setFile(File file) {
+ this.file = file;
+ }
+}
\ No newline at end of file
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileUploadBean.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileUploadBean.java 2009-03-13
17:09:04 UTC (rev 12957)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileUploadBean.java 2009-03-13
19:23:09 UTC (rev 12958)
@@ -36,8 +36,6 @@
import org.richfaces.event.UploadEvent;
import org.richfaces.model.UploadItem;
import org.richfaces.realworld.domain.Image;
-import org.richfaces.realworld.fileupload.FileItem;
-import org.richfaces.realworld.fileupload.FileWrapper;
import org.richfaces.realworld.manager.FileManager;
import org.richfaces.realworld.service.Constants;
Copied:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileWrapper.java
(from rev 12917,
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/fileupload/FileWrapper.java)
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileWrapper.java
(rev 0)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileWrapper.java 2009-03-13
19:23:09 UTC (rev 12958)
@@ -0,0 +1,51 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+package org.richfaces.realworld.ui;
+
+import java.util.ArrayList;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Observer;
+import org.jboss.seam.annotations.Scope;
+
+@Name("fileWrapper")
+(a)Scope(ScopeType.SESSION)
+public class FileWrapper {
+
+ private ArrayList<FileItem> files = new ArrayList<FileItem>();
+ public int getSize() {
+ return getFiles().size();
+ }
+
+ public ArrayList<FileItem> getFiles() {
+ return files;
+ }
+
+ public void setFiles(ArrayList<FileItem> files) {
+ this.files = files;
+ }
+
+ @Observer("fileAdded")
+ public void removeFile(FileItem file){
+ files.remove(file);
+ }
+}
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/UserPrefsHelper.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/UserPrefsHelper.java 2009-03-13
17:09:04 UTC (rev 12957)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/UserPrefsHelper.java 2009-03-13
19:23:09 UTC (rev 12958)
@@ -23,13 +23,14 @@
import org.richfaces.realworld.manager.Model;
import org.richfaces.realworld.service.Constants;
import org.richfaces.realworld.service.IUserAction;
+import org.richfaces.realworld.util.FlushStrategy;
/**
* @author Andrey Markavtsov
*
*/
@Name("userPrefsBean")
-(a)Scope(ScopeType.CONVERSATION)
+(a)Scope(ScopeType.SESSION)
public class UserPrefsHelper {
@In(create=true)
@@ -37,9 +38,9 @@
@In(create=true)
FileManager fileManager;
+ @In FlushStrategy flushStrategy;
+ @In(create=true) @Out Model model;
- @In @Out Model model;
-
@In
User user;
@@ -56,6 +57,7 @@
public void uploadAvatar(UploadEvent event) {
UploadItem item = event.getUploadItem();
avatarData = item.getFile();
+ user.setHasAvatar(true);
}
public void saveUser(User user){
@@ -71,7 +73,7 @@
avatarData = null;
user.setHasAvatar(true);
}
- userAction.updateUser(user);
+ userAction.updateUser(user, flushStrategy.isDatabaseStoreStrategy());
}
public void cancel() {
Added:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/FlushStrategy.java
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/FlushStrategy.java
(rev 0)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/FlushStrategy.java 2009-03-13
19:23:09 UTC (rev 12958)
@@ -0,0 +1,41 @@
+package org.richfaces.realworld.util;
+
+import javax.faces.context.FacesContext;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.AutoCreate;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+
+@Name("flushStrategy")
+(a)Scope(ScopeType.APPLICATION)
+@AutoCreate
+public class FlushStrategy {
+
+ private String strategy;
+
+ public String getStrategy() {
+ if(strategy == null){
+ FacesContext fc = FacesContext.getCurrentInstance();
+ if (fc != null) {
+ String initParameter = fc.getExternalContext().getInitParameter(
+ "storeStrategy");
+ if(initParameter.equals("conversation") ||
initParameter.equals("database")){
+ strategy = initParameter;
+ }else{
+ throw new RuntimeException("Wrong storeStrategy context parameter. It should be
'conversation' or 'database'");
+ }
+
+ }
+ }
+ return strategy;
+ }
+
+ public void setStrategy(String strategy) {
+ this.strategy = strategy;
+ }
+
+ public boolean isDatabaseStoreStrategy(){
+ return getStrategy().equals("database");
+ }
+}
Property changes on:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/FlushStrategy.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Copied:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/ImageLoader.java
(from rev 12922,
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/fileupload/ImageLoader.java)
===================================================================
---
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/ImageLoader.java
(rev 0)
+++
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/util/ImageLoader.java 2009-03-13
19:23:09 UTC (rev 12958)
@@ -0,0 +1,106 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+package org.richfaces.realworld.util;
+
+import java.awt.image.BufferedImage;
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Serializable;
+
+import javax.imageio.ImageIO;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.core.Events;
+import org.richfaces.realworld.manager.FileManager;
+import org.richfaces.realworld.service.Constants;
+
+@Name("imageLoader")
+(a)Scope(ScopeType.CONVERSATION)
+public class ImageLoader implements Serializable{
+
+ private static final long serialVersionUID = -1572789608594870285L;
+
+ @In(create=true)
+ FileManager fileManager;
+ @In("#{messages['file_processing_error']}")
+ private String FILE_PROCESSING_ERROR;
+
+ public synchronized void paintImage(OutputStream out, Object data) throws IOException{
+ if (null == data) {
+ return;
+ }
+ File imageResource = fileManager.getImage(data.toString());
+ if (imageResource != null) {
+ FileInputStream fileInputStream = new FileInputStream(imageResource);
+ BufferedInputStream bufferedInputStream = new BufferedInputStream(fileInputStream);
+ InputStream paintData = bufferedInputStream;
+ if (null == paintData) {
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new
Exception(FILE_PROCESSING_ERROR));
+ return;
+ }
+ try {
+ BufferedImage images = ImageIO.read(paintData);
+ ImageIO.write(images, Constants.JPEG, out);
+ } catch (Exception e) {
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new
Exception(FILE_PROCESSING_ERROR));
+ return;
+ } finally {
+ fileInputStream.close();
+ bufferedInputStream.close();
+ paintData.close();
+ }
+ }
+ }
+
+ public synchronized void paintImageFromFile(OutputStream out, Object data) throws
IOException{
+ if (null == data) {
+ return;
+ }
+ File imageResource = fileManager.getImageFile(data.toString());
+ if (imageResource != null) {
+ FileInputStream fileInputStream = new FileInputStream(imageResource);
+ BufferedInputStream bufferedInputStream = new BufferedInputStream(fileInputStream);
+ InputStream paintData = bufferedInputStream;
+ if (null == paintData) {
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new
Exception(FILE_PROCESSING_ERROR));
+ return;
+ }
+ try {
+ BufferedImage images = ImageIO.read(paintData);
+ ImageIO.write(images, Constants.JPEG, out);
+ } catch (Exception e) {
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new
Exception(FILE_PROCESSING_ERROR));
+ return;
+ } finally {
+ fileInputStream.close();
+ bufferedInputStream.close();
+ paintData.close();
+ }
+ }
+ }
+}
Modified: trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/web.xml 2009-03-13
17:09:04 UTC (rev 12957)
+++ trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/web.xml 2009-03-13
19:23:09 UTC (rev 12958)
@@ -81,9 +81,14 @@
<context-param>
<param-name>uploadRoot</param-name>
- <param-value>d:/Upload/</param-value>
+ <param-value>/srv/www/jboss-portal/server/default/data/Upload/</param-value>
</context-param>
+ <context-param>
+ <param-name>storeStrategy</param-name>
+ <param-value>database</param-value>
+ </context-param>
+
<context-param>
<param-name>facelets.LIBRARIES</param-name>
<param-value>/WEB-INF/tags/realWorld-taglib.xml</param-value>
Modified: trunk/test-applications/realworld2/web/src/main/webapp/img/Thumbs.db
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/fileUpload/fileUploader.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/imagePreview.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/register/regInfo.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/albumsResult.xhtml
===================================================================
---
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/albumsResult.xhtml 2009-03-13
17:09:04 UTC (rev 12957)
+++
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/albumsResult.xhtml 2009-03-13
19:23:09 UTC (rev 12958)
@@ -4,7 +4,7 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
- <a4j:repeat id="albumsList" value="#{result}"
var="album" >
+ <a4j:repeat rendered="#{result.size() > 0}" id="albumsList"
value="#{result}" var="album" >
<h:panelGroup layout="block"
styleClass="preview_box_album_120">
<h:graphicImage styleClass="pr_album_bg"
value="/img/shell/frame_album_200.png" />
<h:panelGrid cellpadding="0">
@@ -42,5 +42,6 @@
<a href="#">#{album.owner.firstName}
#{album.owner.secondName}</a>
</h:panelGroup>
</h:panelGroup>
- </a4j:repeat>
+ </a4j:repeat>
+ <h:outputText rendered="#{result.size() == 0}" value="No results
found" />
</ui:composition>
\ No newline at end of file
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/imageResult.xhtml
===================================================================
---
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/imageResult.xhtml 2009-03-13
17:09:04 UTC (rev 12957)
+++
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/imageResult.xhtml 2009-03-13
19:23:09 UTC (rev 12958)
@@ -4,7 +4,7 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
- <a4j:repeat value="#{result}" var="image">
+ <a4j:repeat rendered="#{result.size() > 0}" value="#{result}"
var="image">
<h:panelGroup layout="block"
styleClass="preview_box_photo_120">
<h:graphicImage styleClass="pr_photo_bg"
value="/img/shell/frame_photo_200.png" />
<h:panelGrid cellpadding="0">
@@ -33,4 +33,5 @@
</h:panelGroup>
</h:panelGroup>
</a4j:repeat>
+ <h:outputText rendered="#{result.size() == 0}" value="No results
found" />
</ui:composition>
\ No newline at end of file
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/tagsResult.xhtml
===================================================================
---
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/tagsResult.xhtml 2009-03-13
17:09:04 UTC (rev 12957)
+++
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/tagsResult.xhtml 2009-03-13
19:23:09 UTC (rev 12958)
@@ -4,7 +4,8 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
- <a4j:repeat id="tagList" value="#{result}"
var="tag">
+ <a4j:repeat rendered="#{result.size() > 0}" id="tagList"
value="#{result}" var="tag">
<a4j:commandLink reRender="mainArea"
actionListener="#{controller.showTag(tag)}"
value="#{tag.tag}"></a4j:commandLink><br/>
</a4j:repeat>
+ <h:outputText rendered="#{result.size() == 0}" value="No results
found" />
</ui:composition>
\ No newline at end of file
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/userResult.xhtml
===================================================================
---
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/userResult.xhtml 2009-03-13
17:09:04 UTC (rev 12957)
+++
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/userResult.xhtml 2009-03-13
19:23:09 UTC (rev 12958)
@@ -4,7 +4,7 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
- <a4j:repeat id="userList" value="#{result}"
var="user">
+ <a4j:repeat rendered="#{result.size() > 0}" id="userList"
value="#{result}" var="user">
<h:panelGroup layout="block"
styleClass="preview_box_photo_120">
<h:graphicImage styleClass="pr_photo_bg"
value="/img/shell/frame_photo_200.png" style="border:none"/>
<h:panelGrid cellpadding="0">
@@ -32,4 +32,5 @@
</h:panelGroup>
</h:panelGroup>
</a4j:repeat>
+ <h:outputText rendered="#{result.size() == 0}" value="No results
found" />
</ui:composition>
\ No newline at end of file
Added:
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/searchWidget.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/searchWidget.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/search.xhtml
===================================================================
(Binary files differ)
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/userPrefs/userPrefs.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/index.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/layout/template3.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/main.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/register.xhtml
===================================================================
(Binary files differ)