JBoss Rich Faces SVN: r13506 - trunk/test-applications/realworld2/web/src/main/webapp.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-04-10 12:46:11 -0400 (Fri, 10 Apr 2009)
New Revision: 13506
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/register.xhtml
Log:
fix modalpanel layouts
Modified: trunk/test-applications/realworld2/web/src/main/webapp/register.xhtml
===================================================================
(Binary files differ)
15 years, 9 months
JBoss Rich Faces SVN: r13505 - trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-04-10 12:45:24 -0400 (Fri, 10 Apr 2009)
New Revision: 13505
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/createShelf.xhtml
Log:
fix modalpanel layouts
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/createShelf.xhtml
===================================================================
(Binary files differ)
15 years, 9 months
JBoss Rich Faces SVN: r13504 - trunk/test-applications/realworld2/web/src/main/webapp/includes/misc.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-04-10 12:44:07 -0400 (Fri, 10 Apr 2009)
New Revision: 13504
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/misc/confirmation.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/misc/errorPanel.xhtml
Log:
fix modal panel layouts
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/misc/confirmation.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/misc/errorPanel.xhtml
===================================================================
(Binary files differ)
15 years, 9 months
JBoss Rich Faces SVN: r13503 - trunk/test-applications/realworld2/web/src/main/webapp/includes/album.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-04-10 12:43:29 -0400 (Fri, 10 Apr 2009)
New Revision: 13503
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/album/createAlbum.xhtml
Log:
fix modal panel layouts, change standard buttons to realworld button
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/album/createAlbum.xhtml
===================================================================
(Binary files differ)
15 years, 9 months
JBoss Rich Faces SVN: r13502 - trunk/test-applications/realworld2/web/src/main/webapp/stylesheet.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-04-10 12:41:34 -0400 (Fri, 10 Apr 2009)
New Revision: 13502
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/stylesheet/realworld.css
Log:
remove odd styles
Modified: trunk/test-applications/realworld2/web/src/main/webapp/stylesheet/realworld.css
===================================================================
--- trunk/test-applications/realworld2/web/src/main/webapp/stylesheet/realworld.css 2009-04-10 15:51:13 UTC (rev 13501)
+++ trunk/test-applications/realworld2/web/src/main/webapp/stylesheet/realworld.css 2009-04-10 16:41:34 UTC (rev 13502)
@@ -198,21 +198,16 @@
}
.name {
- vertical-align: top;
font-weight: bold;
width: 115px;
- float: left;
padding: 5px;
margin-top: 3px;
- clear: left;
}
.value {
- float: left;
padding: 5px;
}
.error {
- float: left;
padding: 5px;
color: red;
}
15 years, 9 months
JBoss Rich Faces SVN: r13501 - in trunk/test-applications/realworld2/web/src/main: java/org/richfaces/realworld/ui and 7 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-04-10 11:51:13 -0400 (Fri, 10 Apr 2009)
New Revision: 13501
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/Authenticator.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.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/FileManager.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/manager/SlideshowManager.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/UserManager.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileWrapper.java
trunk/test-applications/realworld2/web/src/main/webapp/includes/album/albumInfo.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/album/albumsList.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/contextMenu/CMForImage.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/imageList.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/slideshow.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/index/tree.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/userResult.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelfInfo.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/userSharedAlbums.xhtml
Log:
Refactoring
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-04-10 15:50:57 UTC (rev 13500)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java 2009-04-10 15:51:13 UTC (rev 13501)
@@ -112,13 +112,6 @@
Events.instance().raiseEvent(Constants.ALBUM_DELETED_EVENT, album, pathToDelete);
Events.instance().raiseEvent(Constants.CLEAR_TREE_EVENT);
}
-
- public List<Image> getUnvisitedImages(Album album){
- if(album.getCountUnvisitedImages() == 0){
- album.setUnvisitedImages(albumAction.getUnvisitedImages(album));
- }
- return album.getUnvisitedImages();
- }
public boolean isValidationSuccess() {
return validationSuccess;
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java 2009-04-10 15:50:57 UTC (rev 13500)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java 2009-04-10 15:51:13 UTC (rev 13501)
@@ -32,7 +32,6 @@
import org.jboss.seam.annotations.End;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.web.RequestParameter;
import org.jboss.seam.contexts.Contexts;
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java 2009-04-10 15:50:57 UTC (rev 13500)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java 2009-04-10 15:51:13 UTC (rev 13501)
@@ -31,7 +31,6 @@
import org.jboss.seam.annotations.security.Restrict;
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.core.Events;
-import org.richfaces.event.DataScrollerEvent;
import org.richfaces.realworld.domain.Album;
import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.domain.MetaTag;
@@ -58,7 +57,7 @@
}
public void selectImages(){
- model.resetModel(NavigationEnum.ALL_IMAGES, user, null, null, null, user.getAllImages() );
+ model.resetModel(NavigationEnum.ALL_IMAGES, user, null, null, null, user.getImages() );
}
@Restrict("#{s:hasRole('admin')}")
@@ -100,7 +99,7 @@
return;
}
model.resetModel(NavigationEnum.ALBUM_IMAGE_PREVIEW, image.getAlbum().getOwner(), image.getAlbum().getShelf(), image.getAlbum(), image, image.getAlbum().getImages());
- image.getAlbum().visitImage(image, true);
+ image.setVisited(true);
}
@Restrict("#{s:hasRole('admin')}")
@@ -208,13 +207,11 @@
}
public void showSharedAlbums(User user){
- UserManager userManager = (UserManager)Contexts.getEventContext().get("userManager");
- model.resetModel(NavigationEnum.USER_SHARED_ALBUMS, user, null, null, null, userManager.getSharedImages(model.getSelectedUser()));
+ model.resetModel(NavigationEnum.USER_SHARED_ALBUMS, user, null, null, null, user.getSharedImages());
}
public void showSharedImages(User user){
- UserManager userManager = (UserManager)Contexts.getEventContext().get("userManager");
- model.resetModel(NavigationEnum.USER_SHARED_IMAGES, user, null, null, null, userManager.getSharedImages(model.getSelectedUser()));
+ model.resetModel(NavigationEnum.USER_SHARED_IMAGES, user, null, null, null, user.getSharedImages());
}
public void showUser(User user){
@@ -222,13 +219,11 @@
}
public void showUnvisitedImages(Shelf shelf){
- ShelfManager shelfManager = (ShelfManager)Contexts.getEventContext().get("shelfManager");
- model.resetModel(NavigationEnum.SHELF_UNVISITED, shelf.getOwner(), shelf, null, null, shelfManager.getUnvisitedImages(shelf));
+ model.resetModel(NavigationEnum.SHELF_UNVISITED, shelf.getOwner(), shelf, null, null, shelf.getUnvisitedImages());
}
public void showUnvisitedImages(Album album){
- AlbumManager albumManager = (AlbumManager)Contexts.getEventContext().get("albumManager");
- model.resetModel(NavigationEnum.ALBUM_UNVISITED, album.getShelf().getOwner(), album.getShelf(), album, null, albumManager.getUnvisitedImages(album));
+ model.resetModel(NavigationEnum.ALBUM_UNVISITED, album.getShelf().getOwner(), album.getShelf(), album, null, album.getUnvisitedImages());
}
public void showTag(MetaTag metatag){
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-04-10 15:50:57 UTC (rev 13500)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/DnDManager.java 2009-04-10 15:51:13 UTC (rev 13501)
@@ -64,6 +64,7 @@
}
private void handleAlbum(Album dragValue, Shelf dropValue) {
+ String pathOld = dragValue.getPath();
dropValue.addAlbum(dragValue);
try{
albumAction.editAlbum(dragValue);
@@ -71,6 +72,7 @@
Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, Constants.ERROR_IN_DB);
return;
}
+ Events.instance().raiseEvent(Constants.ALBUM_DRAGGED_EVENT, dragValue, pathOld);
Events.instance().raiseEvent(Constants.CLEAR_TREE_EVENT);
}
@@ -78,6 +80,7 @@
if(dragValue.getAlbum().equals(dropValue)){
return;
}
+ String pathOld = dragValue.getFullPath();
dropValue.addImage(dragValue);
try{
albumAction.editAlbum(dropValue);
@@ -85,6 +88,6 @@
Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, Constants.ERROR_IN_DB);
return;
}
- Events.instance().raiseEvent(Constants.DNDUPLOADED_EVENT, dragValue);
+ Events.instance().raiseEvent(Constants.IMAGE_DRAGGED_EVENT, dragValue, pathOld);
}
}
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/FileManager.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/FileManager.java 2009-04-10 15:50:57 UTC (rev 13500)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/FileManager.java 2009-04-10 15:51:13 UTC (rev 13501)
@@ -185,6 +185,34 @@
return file.exists();
}
+ @Observer(Constants.ALBUM_DRAGGED_EVENT)
+ public void renameAlbumDirectory(Album album, String pathOld){
+ File file = getFileByPath(pathOld);
+ File file2 = getFileByPath(album.getPath());
+ if(file2.exists()){
+ if(file2.isDirectory()){
+ FileUtils.deleteDirectory(file2, false);
+ }else{
+ FileUtils.deleteFile(file2);
+ }
+ }
+ file.renameTo(file2);
+ }
+
+ @Observer(Constants.IMAGE_DRAGGED_EVENT)
+ public void renameImageFile(Image image, String pathOld){
+ File file = getFileByPath(pathOld);
+ File file2 = getFileByPath(image.getFullPath());
+ if(file2.exists()){
+ if(file2.isDirectory()){
+ FileUtils.deleteDirectory(file2, false);
+ }else{
+ FileUtils.deleteFile(file2);
+ }
+ }
+ file.renameTo(file2);
+ }
+
private void deleteDirectory(String directory){
final File file = getFileByPath(directory);
FileUtils.deleteDirectory(file, false);
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-04-10 15:50:57 UTC (rev 13500)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ShelfManager.java 2009-04-10 15:51:13 UTC (rev 13501)
@@ -114,13 +114,6 @@
shelfs = null;
}
- public List<Image> getUnvisitedImages(Shelf shelf) {
- if (shelf.getCountUnvisitedImages() == 0) {
- shelf.setUnvisitedImages(shelfAction.getUnvisitedImages(shelf));
- }
- return shelf.getUnvisitedImages();
- }
-
public boolean isValidationSuccess() {
return validationSuccess;
}
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/SlideshowManager.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/SlideshowManager.java 2009-04-10 15:50:57 UTC (rev 13500)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/SlideshowManager.java 2009-04-10 15:51:13 UTC (rev 13501)
@@ -73,7 +73,7 @@
return;
}
this.selectedImage = model.getImages().get(this.slideshowIndex);
- this.selectedImage.getAlbum().visitImage(selectedImage, true);
+ this.selectedImage.setVisited(true);
FileManager fileManager = (FileManager)Contexts.getApplicationContext().get(Constants.FILE_MANAGER_COMPONENT);
if(!fileManager.isFilePresent(this.selectedImage.getFullPath())){
Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, Constants.IMAGE_RECENTLY_DELETED_ERROR);
@@ -92,7 +92,7 @@
}
this.slideshowIndex = model.getImages().indexOf(selectedImage);
this.selectedImage = selectedImage;
- this.selectedImage.getAlbum().visitImage(selectedImage, true);
+ this.selectedImage.setVisited(true);
FileManager fileManager = (FileManager)Contexts.getApplicationContext().get(Constants.FILE_MANAGER_COMPONENT);
if(!fileManager.isFilePresent(this.selectedImage.getFullPath())){
Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, Constants.IMAGE_RECENTLY_DELETED_ERROR);
@@ -134,7 +134,7 @@
}
slideshowIndex++;
selectedImage = model.getImages().get(slideshowIndex);
- this.selectedImage.getAlbum().visitImage(selectedImage, true);
+ this.selectedImage.setVisited(true);
FileManager fileManager = (FileManager)Contexts.getApplicationContext().get(Constants.FILE_MANAGER_COMPONENT);
if(!fileManager.isFilePresent(this.selectedImage.getFullPath())){
Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, Constants.IMAGE_RECENTLY_DELETED_ERROR);
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/UserManager.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/UserManager.java 2009-04-10 15:50:57 UTC (rev 13500)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/UserManager.java 2009-04-10 15:51:13 UTC (rev 13501)
@@ -34,7 +34,6 @@
import org.jboss.seam.core.Events;
import org.richfaces.realworld.domain.Album;
import org.richfaces.realworld.domain.Image;
-import org.richfaces.realworld.domain.Shelf;
import org.richfaces.realworld.domain.User;
import org.richfaces.realworld.service.Constants;
import org.richfaces.realworld.service.IUserAction;
@@ -54,22 +53,6 @@
@In IUserAction userAction;
- public Long countSharedImages(User u) {
- return userAction.countSharedImages(u);
- }
-
- public Long countSharedAlbums(User u) {
- return userAction.countSharedAlbums(u);
- }
-
- public List<Album> getSharedAlbums(User user){
- return userAction.getSharedAlbums(user);
- }
-
- public List<Image> getSharedImages(User user){
- return userAction.getSharedImages(user);
- }
-
@Observer(Constants.EDIT_USER_EVENT)
public void editUser(){
if (avatarData != null) {
@@ -92,24 +75,4 @@
public void cancelEditUser() {
avatarData = null;
}
-
- @Observer(Constants.IMAGE_ADDED_EVENT)
- public void onImageAdded(Image image) {
- user.addImage(image);
- }
-
- @Observer(Constants.IMAGE_DELETED_EVENT)
- public void onImageDeleted(Image image, String path){
- user.removeImage(image);
- }
-
- @Observer(Constants.ALBUM_DELETED_EVENT)
- public void onAlbumDeleted(Album album, String path){
- user.removeAlbum(album);
- }
-
- @Observer(Constants.ALBUM_ADDED_EVENT)
- public void onAlbumAdded(Album album){
- user.addAlbum(album);
- }
}
\ No newline at end of file
Modified: 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/ui/FileWrapper.java 2009-04-10 15:50:57 UTC (rev 13500)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileWrapper.java 2009-04-10 15:51:13 UTC (rev 13501)
@@ -79,8 +79,8 @@
this.files = files;
}
- @Observer(Constants.DNDUPLOADED_EVENT)
- public void removeImage(Image image){
+ @Observer(Constants.IMAGE_DRAGGED_EVENT)
+ public void removeImage(Image image, String pathOld){
files.remove(image);
}
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/album/albumInfo.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/album/albumsList.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/contextMenu/CMForImage.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/image/imageList.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/image/slideshow.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/index/tree.xhtml
===================================================================
(Binary files differ)
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-04-10 15:50:57 UTC (rev 13500)
+++ trunk/test-applications/realworld2/web/src/main/webapp/includes/search/result/userResult.xhtml 2009-04-10 15:51:13 UTC (rev 13501)
@@ -28,7 +28,7 @@
</h:outputText>
</h:panelGroup>
<h:panelGroup layout="block" styleClass="photo_data">
- <a4j:commandLink reRender="tree, mainArea" actionListener="#{controller.showSharedAlbums(searchedUser)}" ><h:outputText value="#{userManager.countSharedAlbums(searchedUser)} albums "/></a4j:commandLink> | <a4j:commandLink reRender="mainArea" actionListener="#{controller.showSharedImages(searchedUser)}"><h:outputText value="#{userManager.countSharedImages(searchedUser)} photos"/></a4j:commandLink>
+ <a4j:commandLink reRender="tree, mainArea" actionListener="#{controller.showSharedAlbums(searchedUser)}" ><h:outputText value="#{searchedUser.sharedAlbums.size} albums "/></a4j:commandLink> | <a4j:commandLink reRender="mainArea" actionListener="#{controller.showSharedImages(searchedUser)}"><h:outputText value="#{searchedUser.sharedImages.size} photos"/></a4j:commandLink>
</h:panelGroup>
</h:panelGroup>
</a4j:repeat>
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/shelf/shelfInfo.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/userSharedAlbums.xhtml
===================================================================
(Binary files differ)
15 years, 9 months
JBoss Rich Faces SVN: r13500 - in trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld: service and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-04-10 11:50:57 -0400 (Fri, 10 Apr 2009)
New Revision: 13500
Modified:
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Album.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Image.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Shelf.java
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/AlbumAction.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/IAlbumAction.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/ShelfAction.java
trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/UserAction.java
Log:
Refactoring
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Album.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Album.java 2009-04-10 15:48:02 UTC (rev 13499)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Album.java 2009-04-10 15:50:57 UTC (rev 13500)
@@ -90,9 +90,6 @@
@Temporal(TemporalType.TIMESTAMP)
private Date created;
- @Transient
- private List<Image> unvisitedImages = new ArrayList<Image>();
-
@OneToOne(cascade = CascadeType.ALL, optional = true)
private Image coveringImage;
@@ -191,15 +188,14 @@
* @return List of unvisited images
*/
public List<Image> getUnvisitedImages() {
+ List<Image> unvisitedImages = new ArrayList<Image>();
+ for(Image i : this.getImages()){
+ if(i.isNew()){
+ unvisitedImages.add(i);
+ }
+ }
return unvisitedImages;
}
-
- /**
- * @param unvisitedImages - List of unvisited images
- */
- public void setUnvisitedImages(List<Image> unvisitedImages) {
- this.unvisitedImages = unvisitedImages;
- }
/**
* @param coveringImage - Image for covering album
@@ -226,9 +222,6 @@
if (image.getAlbum() != null && !this.equals(image.getAlbum())) {
//Remove from previous album
image.getAlbum().removeImage(image);
- }if(!image.isVisited()){//Check, if user already seen this image
- this.getShelf().getUnvisitedImages().add(image);
- this.getUnvisitedImages().add(image);
}
image.setAlbum(this);
images.add(image);
@@ -245,13 +238,6 @@
throw new IllegalArgumentException("Null image");
}
if(image.getAlbum().equals(this)){
- //Remove from unvisited images if needed
- if(image.getAlbum().getUnvisitedImages().contains(image)){
- image.getAlbum().getUnvisitedImages().remove(image);
- }
- if(image.getAlbum().getShelf().getUnvisitedImages().contains(image)){
- image.getAlbum().getShelf().getUnvisitedImages().remove(image);
- }
image.setAlbum(null);
images.remove(image);
}else{
@@ -260,15 +246,6 @@
}
/**
- * This method return count of images of current album
- *
- * @return count of images of this album
- */
- public int getCountImages() {
- return this.getImages() != null ? this.getImages().size() : 0;
- }
-
- /**
* Getter for property owner
*
* @return User object, owner of this album
@@ -318,32 +295,6 @@
}
/**
- * @return count of unvisited images
- */
- public Long getCountUnvisitedImages() {
- return new Long(unvisitedImages.size());
- }
-
- /** This method marks specified image as visited, if isSetVisited parameter is true.
- * If isSetVisited parameter is false(in case of copy images from one album to another),
- * image not marked as visited.
- * Undependently of isSetVisited parameter, removes image from collection of unvisitedImages.
- *
- * @param image - image to mark visited
- * @param isSetVisited - List of unvisited images
- */
- public void visitImage(Image image, boolean isSetVisited) {
- if (unvisitedImages.contains(image)) {
- unvisitedImages.remove(image);
- //Clean unvisitedImages of parent shelf
- if(this.getShelf().getUnvisitedImages().contains(image)){
- this.getShelf().getUnvisitedImages().remove(image);
- }
- }
- image.setVisited(isSetVisited);
- }
-
- /**
* Return relative path of this album in file-system(relative to uploadRoot parameter)
*
*/
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Image.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Image.java 2009-04-10 15:48:02 UTC (rev 13499)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Image.java 2009-04-10 15:50:57 UTC (rev 13500)
@@ -25,7 +25,6 @@
*/
package org.richfaces.realworld.domain;
-import java.io.File;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
@@ -60,14 +59,6 @@
@NamedQueries({
@NamedQuery(
- name = "album-unvisited",
- query = "from Image i where i.album=:album and i.uploaded > :date"
- ),
- @NamedQuery(
- name = "shelf-unvisited",
- query = "from Image i where i.album.shelf = :shelf and i.uploaded > :date"
- ),
- @NamedQuery(
name = "tag-byName",
query = "from MetaTag m where m.tag =:tag"
),
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Shelf.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Shelf.java 2009-04-10 15:48:02 UTC (rev 13499)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Shelf.java 2009-04-10 15:50:57 UTC (rev 13500)
@@ -58,8 +58,7 @@
@OneToMany(mappedBy = "shelf", cascade = {CascadeType.ALL})
@org.hibernate.annotations.OrderBy(clause = "NAME asc")
private List<Album> albums = new ArrayList<Album>();
- @Transient
- private List<Image> unvisitedImages = new ArrayList<Image>();
+
@NotNull
private boolean shared;
@@ -196,30 +195,35 @@
public void setShared(boolean shared) {
this.shared = shared;
}
-
+
+ // ********************** Business Methods ********************** //
+
/**
- * @return count of unvisited images
- */
- public Long getCountUnvisitedImages() {
- return new Long(unvisitedImages.size());
- }
-
- /**
* @return List of unvisited images
*/
public List<Image> getUnvisitedImages() {
+ List<Image> unvisitedImages = new ArrayList<Image>();
+ for(Album a : getAlbums()){
+ for(Image i : a.getImages()){
+ if(i.isNew()){
+ unvisitedImages.add(i);
+ }
+ }
+ }
return unvisitedImages;
}
-
+
/**
- * @param unvisitedImages - List of unvisited images
+ * @return List of images, belongs to this shelf
*/
- public void setUnvisitedImages(List<Image> unvisitedImages) {
- this.unvisitedImages = unvisitedImages;
+ public List<Image> getImages() {
+ List<Image> images = new ArrayList<Image>();
+ for(Album a : getAlbums()){
+ images.addAll(a.getImages());
+ }
+ return images;
}
- // ********************** Business Methods ********************** //
-
/**
* This method add album to collection of albums of current shelf
*
@@ -233,12 +237,6 @@
// remove from previous shelf
album.getShelf().removeAlbum(album);
album.setShelf(this);
- //If album contain new or unvisited images, add to shelf unvisited images
- for(Image i : album.getImages()){
- if(i.isNew()){
- this.getUnvisitedImages().add(i);
- }
- }
albums.add(album);
}
}
@@ -253,10 +251,6 @@
if (album == null)
throw new IllegalArgumentException("Null album!");
if(album.getShelf().equals(this)){
- //Remove from unvisitedImages if needed
- for(Image i : album.getImages()){
- album.visitImage(i, false);
- }
album.setShelf(null);
albums.remove(album);
}else{
@@ -265,30 +259,6 @@
}
/**
- * This method return count of albums of current shelf
- *
- * @return count of albums of current shelf
- */
- public int getCountAlbums() {
- return this.getAlbums() != null ? this.getAlbums().size() : 0;
- }
-
- /**
- * This method return count of images of current shelf
- *
- * @return count of images of this shelf
- */
- public int getCountImages() {
- int result = 0;
- if (getCountAlbums() > 0) {
- for (Album album : getAlbums()) {
- result += album.getCountImages();
- }
- }
- return result;
- }
-
- /**
* This method return first album of current shelf or null if shelf haven't albums.
*
* @return first album of shelf or null
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-10 15:48:02 UTC (rev 13499)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/User.java 2009-04-10 15:50:57 UTC (rev 13500)
@@ -66,30 +66,6 @@
query = "from User u where u.login = :login"
),
@NamedQuery(
- name = "user-sharedAlbums",
- query = "from Album a where a.shelf.owner=:user and a.shelf.shared=true"
- ),
- @NamedQuery(
- name = "user-sharedImages",
- query = "from Image i where i.album.shelf.owner=:user and i.album.shelf.shared=true"
- ),
- @NamedQuery(
- name = "user-countAlbums",
- query = "select count(a) from Album a where a.shelf.owner=:user"
- ),
- @NamedQuery(
- name = "user-countSharedAlbums",
- query = "select count(a) from Album a where a.shelf.owner=:user and a.shelf.shared=true"
- ),
- @NamedQuery(
- name = "user-countImages",
- query = "select count(i) from Image i where i.album.shelf.owner=:user"
- ),
- @NamedQuery(
- name = "user-countSharedImages",
- query = "select count(i) from Image i where i.album.shelf.owner=:user and i.album.shelf.shared=true"
- ),
- @NamedQuery(
name = "user-user",
query = "from User u where u.login = :login"
)
@@ -151,24 +127,12 @@
@NotNull
private Sex sex;
- @Transient
- private Long countImages;
-
- @Transient
- private Long countAlbums;
-
private Boolean hasAvatar;
@OneToMany(mappedBy = "owner", cascade = { CascadeType.ALL})
@org.hibernate.annotations.LazyCollection(org.hibernate.annotations.LazyCollectionOption.EXTRA)
@org.hibernate.annotations.OrderBy(clause = "NAME asc")
private List<Shelf> shelfs = new ArrayList<Shelf>();
-
- @Transient
- private List<Image> images = null;
-
- @Transient
- private List<Album> albums = null;
//----------------Getters, Setters
public String getFirstName() {
@@ -231,22 +195,6 @@
return id;
}
- public Long getCountImages() {
- return countImages;
- }
-
- public void setCountImages(Long countImages) {
- this.countImages = countImages;
- }
-
- public Long getCountAlbums() {
- return countAlbums;
- }
-
- public void setCountAlbums(Long countAlbums) {
- this.countAlbums = countAlbums;
- }
-
public String getConfirmPassword() {
return confirmPassword;
}
@@ -294,7 +242,6 @@
if(!shelfs.contains(shelf)){
shelf.setOwner(this);
shelfs.add(shelf);
- albums.addAll(shelf.getAlbums());
}
}
@@ -311,117 +258,81 @@
if(shelf.getOwner().getLogin().equals(this.getLogin())){
shelf.setOwner(null);
shelfs.remove(shelf);
- albums.removeAll(shelf.getAlbums());
}else{
throw new IllegalArgumentException("Shelf not belongs to this user!");
}
}
-
-/* *//**
- * This method set countAlbums and countImages to null.
- * Used when user delete shelf, album or image and so on... to reset statistics.
- * On next access to this properties, hit to database occur, to retrieve actual data.
- *//*
- public void updateStatistics() {
- countAlbums = null;
- countImages = null;
- }*/
- /**
- * This method return count of shelves, belongs to user
- *
- * @return count of of shelves, belongs to user
- */
- public int getCountShelfs() {
- return this.getShelfs() != null ? this.getShelfs().size() : 0;
- }
-
/**
- * This method return all albums, belongs to user
+ * Return relative path of folder with user's images in file-system(relative to uploadRoot parameter)
*
- * @return albums, belongs to user
*/
- public List<Album> getAllAlbums(){
- if(this.albums == null){
- List<Album> albums = new ArrayList<Album>();
- for(Shelf s:getShelfs()){
- albums.addAll(s.getAlbums());
- }
- this.albums = albums;
+ public String getPath(){
+ if(this.getId() != null){
+ return File.separator + this.getLogin().toString() + File.separator;
}
- return albums;
+ return null;
}
-
+
/**
* This method return all images, belongs to user
*
* @return images, belongs to user
*/
- public List<Image> getAllImages(){
- if(this.images == null){
+ public List<Image> getImages() {
List<Image> images = new ArrayList<Image>();
- for(Shelf s:getShelfs()){
- for(Album a:s.getAlbums()){
+ for (Shelf s : getShelfs()) {
+ for (Album a : s.getAlbums()) {
images.addAll(a.getImages());
}
}
- this.images = images;
- }
- return this.images;
+ return images;
}
-
- public void addAlbum(Album album){
- if(albums == null){
- albums = new ArrayList<Album>();
+
+ /**
+ * This method return all albums, belongs to user
+ *
+ * @return albums, belongs to user
+ */
+ public List<Album> getAlbums() {
+ List<Album> albums = new ArrayList<Album>();
+ for (Shelf s : getShelfs()) {
+ albums.addAll(s.getAlbums());
}
- albums.add(album);
+ return albums;
}
- public void removeAlbum(Album album){
- if(albums == null){
- albums = new ArrayList<Album>();
- }
- albums.remove(album);
- }
-
- public void addImage(Image image){
- if(images == null){
- images = new ArrayList<Image>();
- }
- images.add(image);
- }
-
- public void removeImage(Image image){
- if(images == null){
- images = new ArrayList<Image>();
- }
- images.remove(image);
- }
-
/**
- * Return relative path of folder with user's images in file-system(relative to uploadRoot parameter)
+ * This method return all images, belongs to user
*
+ * @return images, belongs to user
*/
- public String getPath(){
- if(this.getId() != null){
- return File.separator + this.getLogin().toString() + File.separator;
+ public List<Image> getSharedImages() {
+ List<Image> images = new ArrayList<Image>();
+ for (Shelf s : getShelfs()) {
+ if(!s.isShared()){
+ continue;
+ }
+ for (Album a : s.getAlbums()) {
+ images.addAll(a.getImages());
+ }
}
- return null;
- }
-
- public List<Image> getImages() {
return images;
}
- public void setImages(List<Image> images) {
- this.images = images;
- }
-
- public List<Album> getAlbums() {
+ /**
+ * This method return all albums, belongs to user
+ *
+ * @return albums, belongs to user
+ */
+ public List<Album> getSharedAlbums() {
+ List<Album> albums = new ArrayList<Album>();
+ for (Shelf s : getShelfs()) {
+ if(!s.isShared()){
+ continue;
+ }
+ albums.addAll(s.getAlbums());
+ }
return albums;
}
-
- public void setAlbums(List<Album> albums) {
- this.albums = albums;
- }
}
\ No newline at end of file
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-04-10 15:48:02 UTC (rev 13499)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java 2009-04-10 15:50:57 UTC (rev 13500)
@@ -77,15 +77,4 @@
public void editAlbum(Album album){
em.flush();
}
-
- /**
- * Used to retrieve all unvisited images, belongs to specified album.
- *
- * @param album
- * @return List of unvisited images
- */
- @SuppressWarnings("unchecked")
- public List<Image> getUnvisitedImages(Album album){
- return (List<Image>)em.createNamedQuery(Constants.ALBUM_UNVISITED_QUERY).setParameter(Constants.ALBUM_PARAMETER, album).setParameter(Constants.DATE_PARAMETER, ActionTools.getRecentlyDate()).getResultList();
- }
}
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-10 15:48:02 UTC (rev 13499)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/Constants.java 2009-04-10 15:50:57 UTC (rev 13500)
@@ -36,7 +36,8 @@
public static final String CLEAR_EDITOR_EVENT = "clearEditor";
public static final String CLEAR_TREE_EVENT = "clearTree";
public static final String ALBUM_ADDED_EVENT = "albumAdded";
- public static final String DNDUPLOADED_EVENT = "DNDUploadedEvent";
+ public static final String IMAGE_DRAGGED_EVENT = "imageDraggedEvent";
+ public static final String ALBUM_DRAGGED_EVENT = "albumDraggedEvent";
public static final String ADD_IMAGE_EVENT = "addImage";
public static final String SHELF_DELETED_EVENT = "shelfDeleted";
public static final String CLEAR_FILE_UPLOAD_EVENT = "clearFileUpload";
@@ -135,15 +136,8 @@
public static final String PASSWORD_PARAMETER = "password";
public static final String USERNAME_PARAMETER = "username";
public static final String USER_PARAMETER = "user";
- public static final String USER_COUNT_SHARED_IMAGES_QUERY = "user-countSharedImages";
- public static final String USER_COUNT_IMAGES_QUERY = "user-countImages";
- public static final String USER_COUNT_SHARED_ALBUMS_QUERY = "user-countSharedAlbums";
- public static final String USER_COUNT_ALBUMS_QUERY = "user-countAlbums";
- public static final String USER_SHARED_IMAGES_QUERY = "user-sharedImages";
- public static final String USER_SHARED_ALBUMS_QUERY = "user-sharedAlbums";
public static final String DATE_PARAMETER = "date";
public static final String ALBUM_PARAMETER = "album";
- public static final String ALBUM_UNVISITED_QUERY = "album-unvisited";
public static final String COMMA = ",";
public static final int MAX_RESULTS = 20;
public static final String PERCENT = "%";
@@ -166,7 +160,6 @@
public static final String SEARCH_ALBUM_QUERY = "from Album a where lower(a.name) like :name or lower(a.description) like :name";
public static final String USER_SHELVES_QUERY = "user-shelves";
public static final String SHELF_PARAMETER = "shelf";
- public static final String SHELF_UNVISITED_QUERY = "shelf-unvisited";
private Constants(){
}
}
\ No newline at end of file
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-04-10 15:48:02 UTC (rev 13499)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IAlbumAction.java 2009-04-10 15:50:57 UTC (rev 13500)
@@ -42,6 +42,4 @@
public void editAlbum(Album album);
- public List<Image> getUnvisitedImages(Album album);
-
}
\ No newline at end of file
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-04-10 15:48:02 UTC (rev 13499)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IShelfAction.java 2009-04-10 15:50:57 UTC (rev 13500)
@@ -44,6 +44,4 @@
public void editShelf(Shelf shelf);
public List<Shelf> getShelfs(User user);
-
- public List<Image> getUnvisitedImages(Shelf shelf);
}
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-04-10 15:48:02 UTC (rev 13499)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/IUserAction.java 2009-04-10 15:50:57 UTC (rev 13500)
@@ -20,12 +20,8 @@
*/
package org.richfaces.realworld.service;
-import java.util.List;
-
import javax.ejb.Local;
-import org.richfaces.realworld.domain.Album;
-import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.domain.User;
/**
@@ -40,10 +36,4 @@
public void register(User user);
public boolean isUserExist(String login);
public User updateUser();
- public Long countAlbums();
- public Long countImages();
- public Long countSharedImages(User u);
- public Long countSharedAlbums(User user);
- public List<Album> getSharedAlbums(User user);
- public List<Image> getSharedImages(User user);
}
\ No newline at end of file
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-04-10 15:48:02 UTC (rev 13499)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ShelfAction.java 2009-04-10 15:50:57 UTC (rev 13500)
@@ -92,17 +92,4 @@
query.setParameter(Constants.USER_PARAMETER, user.getId() == null ? null : user);
return query.getResultList();
}
-
- /**
- * Used to retrieve all unvisited images, belongs to specified shelf.
- *
- *@param shelf
- *@return List of unvisited images
- */
- @SuppressWarnings("unchecked")
- public List<Image> getUnvisitedImages(Shelf shelf) {
- return (List<Image>) em.createNamedQuery(Constants.SHELF_UNVISITED_QUERY)
- .setParameter(Constants.SHELF_PARAMETER, shelf)
- .setParameter(Constants.DATE_PARAMETER, ActionTools.getRecentlyDate()).getResultList();
- }
}
\ No newline at end of file
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-04-10 15:48:02 UTC (rev 13499)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/UserAction.java 2009-04-10 15:50:57 UTC (rev 13500)
@@ -20,16 +20,12 @@
*/
package org.richfaces.realworld.service;
-import java.util.List;
-
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
-import org.richfaces.realworld.domain.Album;
-import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.domain.User;
/**
@@ -89,58 +85,4 @@
.setParameter(Constants.LOGIN_PARAMETER, login)
.getResultList().size() != 0;
}
-
- /**
- * Used to retrieve all shared albums, belongs to specified user.
- * @param user
- * @return list of shared albums of specified user
- */
- @SuppressWarnings("unchecked")
- public List<Album> getSharedAlbums(User user){
- return (List<Album>)em.createNamedQuery(Constants.USER_SHARED_ALBUMS_QUERY).setParameter(Constants.USER_PARAMETER, user).getResultList();
- }
-
- /**
- * Used to retrieve all shared images, belongs to specified user.
- * @param user
- * @return list of shared images of specified user
- */
- @SuppressWarnings("unchecked")
- public List<Image> getSharedImages(User user){
- return (List<Image>)em.createNamedQuery(Constants.USER_SHARED_IMAGES_QUERY).setParameter(Constants.USER_PARAMETER, user).getResultList();
- }
-
- /**
- * Used to retrieve count of all albums, belongs to specified user.
- * @return count of all albums of current user
- */
- public Long countAlbums(){
- return (Long)em.createNamedQuery(Constants.USER_COUNT_ALBUMS_QUERY).setParameter(Constants.USER_PARAMETER, user).getSingleResult();
- }
-
- /**
- * Used to retrieve count of shared albums, belongs to specified user.
- * @param user
- * @return count of shared albums of specified user
- */
- public Long countSharedAlbums(User user){
- return (Long)em.createNamedQuery(Constants.USER_COUNT_SHARED_ALBUMS_QUERY).setParameter(Constants.USER_PARAMETER, user).getSingleResult();
- }
-
- /**
- * Used to retrieve count of all images, belongs to specified user.
- * @return count of all images of current user
- */
- public Long countImages(){
- return (Long)em.createNamedQuery(Constants.USER_COUNT_IMAGES_QUERY).setParameter(Constants.USER_PARAMETER, user).getSingleResult();
- }
-
- /**
- * Used to retrieve count shared images, belongs to specified user.
- * @param user
- * @return count of shared images of specified user
- */
- public Long countSharedImages(User user){
- return (Long)em.createNamedQuery(Constants.USER_COUNT_SHARED_IMAGES_QUERY).setParameter(Constants.USER_PARAMETER, user).getSingleResult();
- }
}
\ No newline at end of file
15 years, 9 months
JBoss Rich Faces SVN: r13499 - in trunk/docs/common-resources/en/src/main: script and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2009-04-10 11:48:02 -0400 (Fri, 10 Apr 2009)
New Revision: 13499
Modified:
trunk/docs/common-resources/en/src/main/css/html-common.css
trunk/docs/common-resources/en/src/main/css/html-release.css
trunk/docs/common-resources/en/src/main/script/toggle.js
trunk/docs/common-resources/en/src/main/xslt/xhtml-common.xsl
Log:
https://jira.jboss.org/jira/browse/RF-6598 - feedback was fixed. Now it is possible to create Jira task being on a guide page
Modified: trunk/docs/common-resources/en/src/main/css/html-common.css
===================================================================
--- trunk/docs/common-resources/en/src/main/css/html-common.css 2009-04-10 15:23:08 UTC (rev 13498)
+++ trunk/docs/common-resources/en/src/main/css/html-common.css 2009-04-10 15:48:02 UTC (rev 13499)
@@ -175,7 +175,7 @@
display:none;
background: #F5F5F5;
border: 8px solid #7F9DB9;
- height:420px;
+ height:440px;
left:30%;
position:fixed;
text-align:left;
@@ -295,7 +295,7 @@
position:fixed;
bottom:0px;
right:0px;
- height:322px;
+ height:320px;
width: 100px;
overflow: hidden;
cursor:pointer;
Modified: trunk/docs/common-resources/en/src/main/css/html-release.css
===================================================================
--- trunk/docs/common-resources/en/src/main/css/html-release.css 2009-04-10 15:23:08 UTC (rev 13498)
+++ trunk/docs/common-resources/en/src/main/css/html-release.css 2009-04-10 15:48:02 UTC (rev 13499)
@@ -32,6 +32,9 @@
}
h1, h2, h3, h4, h5, h6{
display:inline;
+}
+h3#feedback-header{
+ display:block;
}
.img_marker{
display:inline;
Modified: trunk/docs/common-resources/en/src/main/script/toggle.js
===================================================================
--- trunk/docs/common-resources/en/src/main/script/toggle.js 2009-04-10 15:23:08 UTC (rev 13498)
+++ trunk/docs/common-resources/en/src/main/script/toggle.js 2009-04-10 15:48:02 UTC (rev 13499)
@@ -10,7 +10,8 @@
function showPopup(_popupId) {
document.getElementById(_popupId).style.display = "block";
document.getElementById('timeOutDiv').style.display = "block";
- document.getElementById("feedback-maincontainer").style.display = "block";
+ document.getElementById("feedback-maincontainer").style.display = "block";
+ document.getElementById("guide_words").style.display = "block";
getPlace();
}
@@ -22,7 +23,8 @@
document.getElementById(but).style.display = "inline";
document.getElementById(container).style.left="30%";
document.getElementById(container).style.top="20%";
- document.getElementById(container).style.width="500px";
+ document.getElementById(container).style.width="500px";
+ document.getElementById(container).style.height="440px";
getPlace();
}
@@ -149,4 +151,4 @@
show: function(node) {
node.style.display = "";
}
-};
\ No newline at end of file
+};
Modified: trunk/docs/common-resources/en/src/main/xslt/xhtml-common.xsl
===================================================================
--- trunk/docs/common-resources/en/src/main/xslt/xhtml-common.xsl 2009-04-10 15:23:08 UTC (rev 13498)
+++ trunk/docs/common-resources/en/src/main/xslt/xhtml-common.xsl 2009-04-10 15:48:02 UTC (rev 13499)
@@ -99,7 +99,7 @@
<form onsubmit="return validate_form()" id="feedback-mailform" method="post" action="https://jira.jboss.org/jira/secure/CreateIssueDetails!init.jspa?pid=12310..." target="feedback-iFrame">
<input type="hidden" id="priority" name="priority" value="3" />
<input type="hidden" id="components" name="components" value="12311170" />
- <input type="hidden" id="versions" name="versions" value="12312451" />
+ <input type="hidden" id="versions" name="versions" value="12313100" />
<input type="hidden" id="customfield_12310031" name="customfield_12310031" value="Documentation (Ref Guide, User Guide, etc.)" />
<label for="summary">Summary</label>
15 years, 9 months
JBoss Rich Faces SVN: r13498 - in trunk/test-applications/realworld2: web/src/main/resources and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2009-04-10 11:23:08 -0400 (Fri, 10 Apr 2009)
New Revision: 13498
Added:
trunk/test-applications/realworld2/web/src/main/resources/META-INF/
trunk/test-applications/realworld2/web/src/main/resources/META-INF/MANIFEST.MF
trunk/test-applications/realworld2/web/src/main/resources/META-INF/skins/
trunk/test-applications/realworld2/web/src/main/resources/META-INF/skins/realworld.skin.properties
Removed:
trunk/test-applications/realworld2/web/src/main/webapp/META-INF/
Modified:
trunk/test-applications/realworld2/pom.xml
Log:
Setup for Jboss 5.0
Modified: trunk/test-applications/realworld2/pom.xml
===================================================================
--- trunk/test-applications/realworld2/pom.xml 2009-04-10 15:11:17 UTC (rev 13497)
+++ trunk/test-applications/realworld2/pom.xml 2009-04-10 15:23:08 UTC (rev 13498)
@@ -9,14 +9,14 @@
<parent>
<groupId>org.jboss.seam</groupId>
<artifactId>root</artifactId>
- <version>2.1.0.SP1</version>
+ <version>2.1.1.GA</version>
</parent>
<properties>
<projectName>realworld</projectName>
<richfacesVersion>3.3.1-SNAPSHOT</richfacesVersion>
- <seamVersion>2.1.0.SP1</seamVersion>
- <faceletsVersion>1.1.14</faceletsVersion>
+ <seamVersion>2.1.1.GA</seamVersion>
+ <faceletsVersion>1.1.15.B1</faceletsVersion>
<jbosshome>${project.basedir}/target/installs/jboss-4.2.3.GA/jboss-4.2.3.GA</jbosshome>
<jbosscontext>default</jbosscontext>
<jboss.installer.url>file:E:\apps\jboss\jboss-4.2.3.GA.zip</jboss.installer.url>
Added: trunk/test-applications/realworld2/web/src/main/resources/META-INF/MANIFEST.MF
===================================================================
--- trunk/test-applications/realworld2/web/src/main/resources/META-INF/MANIFEST.MF (rev 0)
+++ trunk/test-applications/realworld2/web/src/main/resources/META-INF/MANIFEST.MF 2009-04-10 15:23:08 UTC (rev 13498)
@@ -0,0 +1,15 @@
+Manifest-Version: 1.0
+Class-Path: avalon-framework-4.1.3.jar
+ commons-beanutils-1.7.0.jar
+ commons-digester-1.8.jar
+ commons-logging-1.1.jar
+ jboss-seam-debug-2.1.0.SP1.jar
+ jboss-seam-jul-2.1.0.SP1.jar
+ jboss-seam-remoting-2.1.0.SP1.jar
+ jboss-seam-ui-2.1.0.SP1.jar
+ jsf-facelets-1.1.14.jar
+ log4j-1.2.14.jar
+ logkit-1.0.1.jar
+ richfaces-impl-3.3.0-SNAPSHOT.jar
+ richfaces-ui-3.3.0-SNAPSHOT.jar
+
Added: trunk/test-applications/realworld2/web/src/main/resources/META-INF/skins/realworld.skin.properties
===================================================================
--- trunk/test-applications/realworld2/web/src/main/resources/META-INF/skins/realworld.skin.properties (rev 0)
+++ trunk/test-applications/realworld2/web/src/main/resources/META-INF/skins/realworld.skin.properties 2009-04-10 15:23:08 UTC (rev 13498)
@@ -0,0 +1,75 @@
+#Colors
+headerBackgroundColor=#B34801
+headerGradientColor=#EA640A
+headerTextColor=#FFFFFF
+headerWeightFont=bold
+
+generalBackgroundColor=#D7D7D7
+generalTextColor=#000000
+generalSizeFont=11px
+generalFamilyFont=Arial, Verdana, sans-serif
+
+controlTextColor=#000000
+controlBackgroundColor=#ffffff
+additionalBackgroundColor=#F2F2F2
+
+shadowBackgroundColor=#000000
+shadowOpacity=1
+
+panelBorderColor=#636363
+subBorderColor=#ffffff
+
+tabBackgroundColor=#FF6700
+tabDisabledTextColor=#E4B98F
+
+trimColor=#FFE2C6
+
+tipBackgroundColor=#FAE6B0
+tipBorderColor=#E5973E
+
+selectControlColor=#E79A00
+
+
+generalLinkColor=#FF6700
+hoverLinkColor=#FFA800
+visitedLinkColor=#FF6700
+
+# Fonts
+headerSizeFont=11px
+headerFamilyFont=Arial, Verdana, sans-serif
+
+tabSizeFont=11
+tabFamilyFont=Arial, Verdana, sans-serif
+
+buttonSizeFont=11
+buttonFamilyFont=Arial, Verdana, sans-serif
+
+
+tableBackgroundColor=#D7D7D7
+tableFooterBackgroundColor=#cccccc
+tableSubfooterBackgroundColor=#f1f1f1
+tableBorderColor=#C0C0C0
+tableBorderWidth=0px
+
+
+#Calendar colors
+calendarWeekBackgroundColor=#F5F5F5
+
+calendarHolidaysBackgroundColor=#FFEBDA
+calendarHolidaysTextColor=#FF7800
+
+calendarCurrentBackgroundColor=#FF7800
+calendarCurrentTextColor=#FFEBDA
+
+calendarSpecBackgroundColor=#E4F5E2
+calendarSpecTextColor=#000000
+
+
+warningColor=#FFE6E6
+warningBackgroundColor=#FF0000
+
+editorBackgroundColor=#D7D7D7
+editBackgroundColor=#FEFFDA
+
+#Gradients
+gradientType=plain
15 years, 9 months
JBoss Rich Faces SVN: r13497 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: ochikvina
Date: 2009-04-10 11:11:17 -0400 (Fri, 10 Apr 2009)
New Revision: 13497
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCSettings.xml
trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
Log:
https://jira.jboss.org/jira/browse/RF-5117 - correcting code samples;
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCSettings.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCSettings.xml 2009-04-10 14:31:21 UTC (rev 13496)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCSettings.xml 2009-04-10 15:11:17 UTC (rev 13497)
@@ -88,12 +88,11 @@
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
- <context-param>
- <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
- <param-value>com.sun.facelets.FaceletViewHandler</param-value>
- </context-param>
-...]]>
- </programlisting>
+<context-param>
+ <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+ <param-value>com.sun.facelets.FaceletViewHandler</param-value>
+</context-param>
+...]]></programlisting>
<para> says that <property>Facelets</property> will officially be the first,
however <code>AjaxViewHandler</code> will be a little ahead
temporarily to do some small, but very important job. </para>
@@ -114,78 +113,77 @@
<para> Your web.xml for <property>Seam 1.2</property> must be like this: </para>
<programlisting role="XML"><![CDATA[<?xml version="1.0" ?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
- version="2.4">
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
- <!-- richfaces -->
+ <!-- richfaces -->
- <filter>
- <display-name>RichFaces Filter</display-name>
- <filter-name>richfaces</filter-name>
- <filter-class>org.ajax4jsf.Filter</filter-class>
- </filter>
+ <filter>
+ <display-name>RichFaces Filter</display-name>
+ <filter-name>richfaces</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
- <filter-mapping>
- <filter-name>richfaces</filter-name>
- <url-pattern>*.seam</url-pattern>
- </filter-mapping>
+ <filter-mapping>
+ <filter-name>richfaces</filter-name>
+ <url-pattern>*.seam</url-pattern>
+ </filter-mapping>
-<!-- Seam -->
+ <!-- Seam -->
- <listener>
- <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
- </listener>
+ <listener>
+ <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
+ </listener>
- <servlet>
- <servlet-name>Seam Resource Servlet</servlet-name>
- <servlet-class>org.jboss.seam.servlet.ResourceServlet</servlet-class>
- </servlet>
+ <servlet>
+ <servlet-name>Seam Resource Servlet</servlet-name>
+ <servlet-class>org.jboss.seam.servlet.ResourceServlet</servlet-class>
+ </servlet>
- <servlet-mapping>
- <servlet-name>Seam Resource Servlet</servlet-name>
- <url-pattern>/seam/resource/*</url-pattern>
- </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Seam Resource Servlet</servlet-name>
+ <url-pattern>/seam/resource/*</url-pattern>
+ </servlet-mapping>
- <filter>
- <filter-name>Seam Filter</filter-name>
- <filter-class>org.jboss.seam.web.SeamFilter</filter-class>
- </filter>
+ <filter>
+ <filter-name>Seam Filter</filter-name>
+ <filter-class>org.jboss.seam.web.SeamFilter</filter-class>
+ </filter>
- <filter-mapping>
- <filter-name>Seam Filter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
+ <filter-mapping>
+ <filter-name>Seam Filter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
- <!-- MyFaces -->
+ <!-- MyFaces -->
- <listener>
- <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
- </listener>
+ <listener>
+ <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
+ </listener>
- <!-- JSF -->
+ <!-- JSF -->
- <context-param>
- <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
- <param-value>client</param-value>
- </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>client</param-value>
+ </context-param>
- <context-param>
- <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
- <param-value>.xhtml</param-value>
- </context-param>
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
- <servlet>
- <servlet-name>Faces Servlet</servlet-name>
- <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>*.seam</url-pattern>
- </servlet-mapping>
-
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.seam</url-pattern>
+ </servlet-mapping>
</web-app>]]></programlisting>
<para>
<property>Seam 2</property> supports RichFaces Filter. Thus your
@@ -193,64 +191,63 @@
<programlisting role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
- xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
- <context-param>
- <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
- <param-value>com.sun.facelets.FaceletViewHandler</param-value>
- </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+ <param-value>com.sun.facelets.FaceletViewHandler</param-value>
+ </context-param>
- <!-- Seam -->
+ <!-- Seam -->
- <listener>
- <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
- </listener>
+ <listener>
+ <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
+ </listener>
- <servlet>
- <servlet-name>Seam Resource Servlet</servlet-name>
- <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
- </servlet>
+ <servlet>
+ <servlet-name>Seam Resource Servlet</servlet-name>
+ <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
+ </servlet>
- <servlet-mapping>
- <servlet-name>Seam Resource Servlet</servlet-name>
- <url-pattern>/seam/resource/*</url-pattern>
- </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Seam Resource Servlet</servlet-name>
+ <url-pattern>/seam/resource/*</url-pattern>
+ </servlet-mapping>
- <filter>
- <filter-name>Seam Filter</filter-name>
- <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
- </filter>
+ <filter>
+ <filter-name>Seam Filter</filter-name>
+ <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
+ </filter>
- <filter-mapping>
- <filter-name>Seam Filter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
+ <filter-mapping>
+ <filter-name>Seam Filter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
- <!-- JSF -->
+ <!-- JSF -->
- <context-param>
- <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
- <param-value>.xhtml</param-value>
- </context-param>
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
- <context-param>
- <param-name>facelets.DEVELOPMENT</param-name>
- <param-value>true</param-value>
- </context-param>
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
- <servlet>
- <servlet-name>Faces Servlet</servlet-name>
- <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>*.seam</url-pattern>
- </servlet-mapping>
-
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.seam</url-pattern>
+ </servlet-mapping>
</web-app>]]></programlisting>
<para> Only one issue still persists while using <property>Seam</property> with
@@ -276,13 +273,12 @@
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
- <servlet>
- <servlet-name>Faces Servlet</servlet-name>
- <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
- <load-on-startup>0</load-on-startup>
- </servlet>
-...
-]]></programlisting>
+<servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>0</load-on-startup>
+</servlet>
+...]]></programlisting>
<para> This is because, EAServer calls servlet <code>init()</code> before the
<code>ServletContextInitializer</code>. Not an EAServer bug,
this is in Servlet 2.3 spec. </para>
@@ -294,12 +290,13 @@
application's class loader from importing the Oracle XML
parser. Use the following notation in
<property>orion-application.xml</property> : </para>
+
<programlisting role="XML"><![CDATA[...
<imported-shared-libraries>
- <remove-inherited name="oracle.xml"/>
- <remove-inherited name="oracle.xml.security"/>
+ <remove-inherited name="oracle.xml"/>
+ <remove-inherited name="oracle.xml.security"/>
</imported-shared-libraries>
-...
-]]></programlisting>
+...]]></programlisting>
+
</section>
</chapter>
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2009-04-10 14:31:21 UTC (rev 13496)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2009-04-10 15:11:17 UTC (rev 13497)
@@ -1629,9 +1629,9 @@
<para>
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="XML">
- <![CDATA[<div class="dr-pnl rich-panel"> ... </div>]]>
- </programlisting>
+ <programlisting role="XML"><![CDATA[<div class="dr-pnl rich-panel">
+ ...
+</div>]]></programlisting>
<para> dr-pnl is a CSS class specified in the framework via skin parameters: </para>
<itemizedlist>
<listitem>
@@ -1658,10 +1658,8 @@
<para>
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="XML">
- <![CDATA[<rich:panel styleClass="customClass" />]]>
- </programlisting>
- <para> Could add some style properties from customClass to one particular panel, as a
+ <programlisting role="XML"><![CDATA[<rich:panel styleClass="customClass" />]]></programlisting>
+ <para>Could add some style properties from customClass to one particular panel, as a
result we get three styles: </para>
<para>
<emphasis role="bold">Example:</emphasis>
@@ -1903,8 +1901,8 @@
</para>
<programlisting role="XML"><![CDATA[...
<context-param>
- <param-name>org.richfaces.SKIN</param-name>
- <param-value>name</param-value>
+ <param-name>org.richfaces.SKIN</param-name>
+ <param-value>name</param-value>
</context-param>
...]]></programlisting>
</listitem>
@@ -1939,10 +1937,8 @@
<para> Create a custom render kit and register it in the faces-config.xml like
this: </para>
<programlisting role="XML"><![CDATA[<render-kit>
- <render-kit-id>NEW_SKIN</render-kit-id>
- <render-kit-class>
- org.ajax4jsf.framework.renderer.ChameleonRenderKitImpl
- </render-kit-class>
+ <render-kit-id>NEW_SKIN</render-kit-id>
+ <render-kit-class>org.ajax4jsf.framework.renderer.ChameleonRenderKitImpl</render-kit-class>
</render-kit>]]></programlisting>
</listitem>
<listitem>
@@ -2026,35 +2022,32 @@
To do this, edit the file properties of the skin. Here is an example of the code for page:
</para>
<programlisting role="XML"><![CDATA[<h:form>
- <div style="display: block; float: left"><h:selectOneRadio
- value="#{skinBean.skin}" border="0" layout="pageDirection"
- title="Changing skin" style="font-size: 8; font-family: comic"
- onchange="submit()">
- <f:selectItem itemLabel="plain" itemValue="plain" />
- <f:selectItem itemLabel="emeraldTown" itemValue="emeraldTown" />
- <f:selectItem itemLabel="blueSky" itemValue="blueSky" />
- <f:selectItem itemLabel="wine" itemValue="wine" />
- <f:selectItem itemLabel="japanCherry" itemValue="japanCherry" />
- <f:selectItem itemLabel="ruby" itemValue="ruby" />
- <f:selectItem itemLabel="classic" itemValue="classic" />
- <f:selectItem itemLabel="laguna" itemValue="laguna" />
- <f:selectItem itemLabel="deepMarine" itemValue="deepMarine" />
- <f:selectItem itemLabel="blueSky Modified" itemValue="blueSkyModify" />
- </h:selectOneRadio>
- </div>
- <div style="display: block; float: left">
- <rich:panelBar height="100" width="200">
- <rich:panelBarItem label="Item 1" style="font-family: monospace; font-size: 12;">
- Changing skin in runtime
- </rich:panelBarItem>
- <rich:panelBarItem label="Item 2"
- style="font-family: monospace; font-size: 12;">
- This is a result of the modification "blueSky" skin
- </rich:panelBarItem>
- </rich:panelBar>
- </div>
-</h:form>]]>
- </programlisting>
+ <div style="display: block; float: left">
+ <h:selectOneRadio value="#{skinBean.skin}" border="0" layout="pageDirection" title="Changing skin" style="font-size: 8; font-family: comic" onchange="submit()">
+ <f:selectItem itemLabel="plain" itemValue="plain" />
+ <f:selectItem itemLabel="emeraldTown" itemValue="emeraldTown" />
+ <f:selectItem itemLabel="blueSky" itemValue="blueSky" />
+ <f:selectItem itemLabel="wine" itemValue="wine" />
+ <f:selectItem itemLabel="japanCherry" itemValue="japanCherry" />
+ <f:selectItem itemLabel="ruby" itemValue="ruby" />
+ <f:selectItem itemLabel="classic" itemValue="classic" />
+ <f:selectItem itemLabel="laguna" itemValue="laguna" />
+ <f:selectItem itemLabel="deepMarine" itemValue="deepMarine" />
+ <f:selectItem itemLabel="blueSky Modified" itemValue="blueSkyModify" />
+ </h:selectOneRadio>
+ </div>
+ <div style="display: block; float: left">
+ <rich:panelBar height="100" width="200">
+ <rich:panelBarItem label="Item 1" style="font-family: monospace; font-size: 12;">
+ Changing skin in runtime
+ </rich:panelBarItem>
+
+ <rich:panelBarItem label="Item 2" style="font-family: monospace; font-size: 12;">
+ This is a result of the modification "blueSky" skin
+ </rich:panelBarItem>
+ </rich:panelBar>
+ </div>
+</h:form>]]></programlisting>
<para>
This is result:
</para>
@@ -2080,10 +2073,7 @@
used. However, if you want to explicitly specify the level of skinning you want to be applied, you need to add a context parameter to your web.xml
with <code>org.richfaces.CONTROL_SKINNING_LEVEL</code> as the parameter name
- and value set to either <code>basic</code> or <code>extended</code>.
-
-
-
+ and value set to either <code>basic</code> or <code>extended</code>.
</para>
<itemizedlist>
<listitem>
@@ -2241,25 +2231,25 @@
<para> There is a snippet with some of them for example: </para>
<programlisting role="XML"><![CDATA[...
<u:selector name=".rich-box-bgcolor-header">
- <u:style name="background-color" skin="headerBackgroundColor" />
+ <u:style name="background-color" skin="headerBackgroundColor" />
</u:selector>
<u:selector name=".rich-box-bgcolor-general">
- <u:style name="background-color" skin="generalBackgroundColor" />
+ <u:style name="background-color" skin="generalBackgroundColor" />
</u:selector>
...
//gradient elements
...
<u:selector name=".rich-gradient-menu">
- <u:style name="background-image">
- <f:resource f:key="org.richfaces.renderkit.html.gradientimages.MenuGradientImage"/>
- </u:style>
- <u:style name="background-repeat" value="repeat-x" />
+ <u:style name="background-image">
+ <f:resource f:key="org.richfaces.renderkit.html.gradientimages.MenuGradientImage"/>
+ </u:style>
+ <u:style name="background-repeat" value="repeat-x" />
</u:selector>
<u:selector name=".rich-gradient-tab">
- <u:style name="background-image">
- <f:resource f:key="org.richfaces.renderkit.html.gradientimages.TabGradientImage"/>
- </u:style>
- <u:style name="background-repeat" value="repeat-x" />
+ <u:style name="background-image">
+ <f:resource f:key="org.richfaces.renderkit.html.gradientimages.TabGradientImage"/>
+ </u:style>
+ <u:style name="background-repeat" value="repeat-x" />
</u:selector>
...]]></programlisting>
<para> To get a better idea of standard component skinning we recommend to explore CSS
@@ -3191,10 +3181,10 @@
CSS format. </para>
<programlisting role="CSS"><![CDATA[...
.rich-component-name {
- background-color: additionalBackgroundColor; /*the value of the constant defined by your skin*/
- border-color: tableBorderColor; /*the value of the constant defined by your skin*/
- border-width: tableBorderWidth /*the value of the constant defined by your skin*/
- border-style: solid;
+ background-color: additionalBackgroundColor; /*the value of the constant defined by your skin*/
+ border-color: tableBorderColor; /*the value of the constant defined by your skin*/
+ border-width: tableBorderWidth; /*the value of the constant defined by your skin*/
+ border-style: solid;
}
...]]></programlisting>
<para> The <emphasis>
@@ -3407,10 +3397,9 @@
<code><f:verbatim> <![CDATA[ ...]]>
</f:verbatim></code> tags.</para>
<para>For example </para>
- <programlisting role="XML">
-<![CDATA[...
+ <programlisting role="XML"><![CDATA[...
.rich-calendar-cell {
- background: #537df8;
+ background: #537df8;
}
...]]></programlisting>
</listitem>
@@ -3419,14 +3408,13 @@
formed in RichFaces. The XCSS tags have to be placed outside
<code><f:verbatim> <![CDATA[ ...]]>
</f:verbatim></code> tags. </para>
- <programlisting role="XML">
- <![CDATA[...
+ <programlisting role="XML"><![CDATA[...
<u:selector name=".rich-calendar-cell">
- <u:style name="border-bottom-color" skin="panelBorderColor"/>
- <u:style name="border-right-color" skin="panelBorderColor"/>
- <u:style name="background-color" skin="tableBackgroundColor"/>
- <u:style name="font-size" skin="generalSizeFont"/>
- <u:style name="font-family" skin="generalFamilyFont"/>
+ <u:style name="border-bottom-color" skin="panelBorderColor"/>
+ <u:style name="border-right-color" skin="panelBorderColor"/>
+ <u:style name="background-color" skin="tableBackgroundColor"/>
+ <u:style name="font-size" skin="generalSizeFont"/>
+ <u:style name="font-family" skin="generalFamilyFont"/>
</u:selector>
...]]></programlisting>
</listitem>
15 years, 9 months