JBoss Rich Faces SVN: r13336 - in trunk/test-applications/realworld2/web/src/main/webapp/includes: album and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-04-01 06:49:16 -0400 (Wed, 01 Apr 2009)
New Revision: 13336
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/includes/album/albumInfo.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/imageInfo.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/image/imageList.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/images.xhtml
Log:
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/image/imageInfo.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/images.xhtml
===================================================================
(Binary files differ)
15 years, 8 months
JBoss Rich Faces SVN: r13335 - in trunk/test-applications/realworld2/web/src/main: java/org/richfaces/realworld/ui and 6 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-04-01 06:30:06 -0400 (Wed, 01 Apr 2009)
New Revision: 13335
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/ShelfManager.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/tags/templates/album.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/tags/templates/shelf.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/contextMenu/CMForShelf.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/index/login.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/index/menu.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/userPrefs.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/userPrefs/userPrefs.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/includes/userPrefs/userPrefsEdit.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/register.xhtml
Log:
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-01 10:29:45 UTC (rev 13334)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java 2009-04-01 10:30:06 UTC (rev 13335)
@@ -21,6 +21,8 @@
package org.richfaces.realworld.manager;
import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Date;
import java.util.List;
import org.jboss.seam.ScopeType;
@@ -29,28 +31,26 @@
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Out;
import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.core.Events;
import org.jboss.seam.faces.FacesMessages;
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.FlushStrategy;
import org.richfaces.realworld.service.IAlbumAction;
@Name("albumManager")
-(a)Scope(ScopeType.CONVERSATION)
+(a)Scope(ScopeType.EVENT)
@AutoCreate
public class AlbumManager implements Serializable{
private static final long serialVersionUID = 2631634926126857691L;
-
- private String oncomplete = ";";
+ private boolean validationSuccess = false;
@In private IAlbumAction albumAction;
- @In(create=true, required=true) @Out
- private Album album;
-
@In private User user;
@In FileManager fileManager;
@@ -59,23 +59,33 @@
public void addAlbum(Album album){
if(album.getShelf() == null){
- //TODO nick - remove null argument
- //TODO nick - externalize message
- facesMessages.add("Shelf must be not-null", null);
+ facesMessages.addToControl("shelf", "Shelf must be not-null", null);
+ Contexts.getConversationContext().set("album", album);
return;
}
+ validationSuccess = true;
albumAction.addAlbum(album);
- //TODO nick - addDirectory() uses this.album, do we need: this.album = album?
- addDirectory();
+ fileManager.addDirectory(user.getLogin(), album.getId().toString());
model.resetModel(NavigationEnum.ALBUM_PREVIEW, album.getShelf().getOwner(), album.getShelf(), album, null);
+ model.setImages(new ArrayList<Image>());
+ Contexts.getConversationContext().set("album", null);
Events.instance().raiseEvent("albumAdded");
Events.instance().raiseEvent("clearTree");
- setOncomplete();
}
- public void initEdit(Shelf shelf){
- album = new Album();
+ public void createAlbum(Shelf shelf){
+ Album album = new Album();
+ if(shelf == null){
+ if(user.getShelfs().size() > 0){
+ shelf = user.getShelfs().get(0);
+ }
+ if(shelf == null){
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception("You must create at least one shelf before creating album!"));
+ return;
+ }
+ }
album.setShelf(shelf);
+ Contexts.getConversationContext().set("album", album);
}
public void editAlbum(Album album){
@@ -102,24 +112,16 @@
}
return album.getUnvisitedImages();
}
-
- private void setOncomplete() {
- oncomplete = "$('albumModalPanel').component.hide()";
- }
-
- public String getOncomplete() {
- return oncomplete;
- }
-
- public void setOncomplete(String oncomplete) {
- this.oncomplete = oncomplete;
- }
private void deleteDirectory(String albumName) {
fileManager.deleteDirectory(user.getLogin(), albumName);
}
- private void addDirectory() {
- fileManager.addDirectory(user.getLogin(), album.getId().toString());
+ public boolean isValidationSuccess() {
+ return validationSuccess;
}
+
+ public void setValidationSuccess(boolean validationSuccess) {
+ this.validationSuccess = 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-01 10:29:45 UTC (rev 13334)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java 2009-04-01 10:30:06 UTC (rev 13335)
@@ -123,7 +123,6 @@
return true;
}
} catch (Exception nre) {
- facesMessages.add(INVALID_LOGIN_OR_PASSWORD);
return false;
}
return false;
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-01 10:29:45 UTC (rev 13334)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Controller.java 2009-04-01 10:30:06 UTC (rev 13335)
@@ -159,6 +159,10 @@
}
public void showFileUpload(){
+ if(!(user.getShelfs().size() > 0)){
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception("You must create at least one shelf before creating album!"));
+ return;
+ }
model.setMainArea(NavigationEnum.FILE_UPLOAD);
}
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-01 10:29:45 UTC (rev 13334)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/DnDManager.java 2009-04-01 10:30:06 UTC (rev 13335)
@@ -20,6 +20,8 @@
*/
package org.richfaces.realworld.manager;
+import java.util.ArrayList;
+
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.core.Events;
@@ -71,6 +73,7 @@
String newPath = getNewPathOfImage(dragValue, dropValue);
dragValue.setPath(newPath);
dropValue.addImage(dragValue);
+ dropValue.setUnvisitedImages(new ArrayList<Image>());
albumAction.editAlbum(dropValue);
}
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-01 10:29:45 UTC (rev 13334)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/ShelfManager.java 2009-04-01 10:30:06 UTC (rev 13335)
@@ -41,12 +41,12 @@
import org.richfaces.realworld.service.IShelfAction;
@Name("shelfManager")
-(a)Scope(ScopeType.CONVERSATION)
+(a)Scope(ScopeType.EVENT)
@AutoCreate
public class ShelfManager implements Serializable {
private static final long serialVersionUID = 2631634926126857691L;
-
+ private boolean validationSuccess = false;
private List<Shelf> shelfs;
@In
@@ -55,8 +55,6 @@
@In
IShelfAction shelfAction;
- private String oncomplete = ";";
-
@In @Out
Model model;
@@ -64,15 +62,15 @@
User user;
//TODO nick - rename to createShelf
- public void initEdit() {
+ public void createShelf() {
Shelf shelf = new Shelf();
Contexts.getConversationContext().set("shelf", shelf);
}
public void addShelf(Shelf shelf) {
+ validationSuccess = true;
shelfAction.addShelf(shelf);
model.resetModel(NavigationEnum.SHELF_PREVIEW, shelf.getOwner(), shelf, null, null);
- setOncomplete();
Events.instance().raiseEvent("clearTree");
}
@@ -113,22 +111,18 @@
shelfs = null;
}
- private void setOncomplete() {
- oncomplete = "$('shelfModalPanel').component.hide()";
- }
-
- public String getOncomplete() {
- return oncomplete;
- }
-
- public void setOncomplete(String oncomplete) {
- this.oncomplete = oncomplete;
- }
-
public List<Image> getUnvisitedImages(Shelf shelf) {
if (shelf.getCountUnvisitedImages() == 0) {
shelf.setUnvisitedImages(shelfAction.getUnvisitedImages(shelf));
}
return shelf.getUnvisitedImages();
}
+
+ public boolean isValidationSuccess() {
+ return validationSuccess;
+ }
+
+ public void setValidationSuccess(boolean validationSuccess) {
+ this.validationSuccess = validationSuccess;
+ }
}
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-04-01 10:29:45 UTC (rev 13334)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/UserPrefsHelper.java 2009-04-01 10:30:06 UTC (rev 13335)
@@ -67,6 +67,9 @@
model.resetModel(NavigationEnum.ALL_SHELFS, user, model.getSelectedShelf(), model.getSelectedAlbum(), model.getSelectedImage());
}
+ public String goToIndex(){
+ return "index";
+ }
public void cancel() {
user = userAction.resetUser();
avatarData = null;
Modified: trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/tags/templates/album.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/tags/templates/shelf.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/contextMenu/CMForShelf.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/index/login.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/index/menu.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/includes/userPrefs/userPrefsEdit.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/includes/userPrefs.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/register.xhtml
===================================================================
(Binary files differ)
15 years, 8 months
JBoss Rich Faces SVN: r13334 - in trunk/test-applications/realworld2/ejb/src/main: java/org/richfaces/realworld/service and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-04-01 06:29:45 -0400 (Wed, 01 Apr 2009)
New Revision: 13334
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/Comment.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/MetaTag.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/service/AlbumAction.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/resources/import.sql
Log:
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-01 10:21:47 UTC (rev 13333)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Album.java 2009-04-01 10:29:45 UTC (rev 13334)
@@ -48,6 +48,7 @@
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Role;
+import org.jboss.seam.annotations.Scope;
/**
* Class for representing Album Entity EJB3 Entity Bean
@@ -57,7 +58,7 @@
@Entity
@Name("album")
@Table(name = "albums")
-@Role(name = "selectedAlbum", scope = ScopeType.CONVERSATION)
+(a)Scope(ScopeType.CONVERSATION)
public class Album implements Serializable {
private static final long serialVersionUID = -7042878411608396483L;
@@ -168,8 +169,15 @@
}
if (image.getAlbum() != null && !this.equals(image.getAlbum())) {
//TODO nick - use removeImage()
+ 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.getAlbum().removeImage(image);
}
+ this.setUnvisitedImages(new ArrayList<Image>());
image.setAlbum(this);
images.add(image);
}
@@ -203,7 +211,7 @@
}
public User getOwner() {
- return getShelf().getOwner();
+ return getShelf()!=null ? getShelf().getOwner(): null;
}
public List<Image> getImages() {
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Comment.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Comment.java 2009-04-01 10:21:47 UTC (rev 13333)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Comment.java 2009-04-01 10:29:45 UTC (rev 13334)
@@ -37,11 +37,14 @@
import org.hibernate.validator.Length;
import org.hibernate.validator.NotEmpty;
import org.hibernate.validator.NotNull;
+import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
@Entity
@Name("comment")
@Table(name = "comments")
+(a)Scope(ScopeType.EVENT)
public class Comment implements Serializable {
private static final long serialVersionUID = 3429270322123226071L;
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-01 10:21:47 UTC (rev 13333)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Image.java 2009-04-01 10:29:45 UTC (rev 13334)
@@ -54,6 +54,7 @@
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Role;
+import org.jboss.seam.annotations.Scope;
@NamedQueries({
@NamedQuery(
@@ -72,7 +73,7 @@
@Entity
@Name("image")
@Table(name = "Images")
-@Role(name = "selectedImage", scope = ScopeType.CONVERSATION)
+(a)Scope(ScopeType.CONVERSATION)
public class Image implements Serializable {
private static final long serialVersionUID = -7042878411608396483L;
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/MetaTag.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/MetaTag.java 2009-04-01 10:21:47 UTC (rev 13333)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/MetaTag.java 2009-04-01 10:29:45 UTC (rev 13334)
@@ -34,11 +34,14 @@
import org.hibernate.validator.Length;
import org.hibernate.validator.NotEmpty;
import org.hibernate.validator.NotNull;
+import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
@Entity
@Name("metaTag")
@Table(name = "metatags")
+(a)Scope(ScopeType.EVENT)
public class MetaTag implements Serializable {
private static final long serialVersionUID = -9065024051468971330L;
@@ -65,11 +68,6 @@
this.id = id;
}
- public MetaTag(Long id, String tag) {
- this.id = id;
- this.tag = tag;
- }
-
public Long getId() {
return id;
}
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-01 10:21:47 UTC (rev 13333)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/domain/Shelf.java 2009-04-01 10:29:45 UTC (rev 13334)
@@ -30,8 +30,6 @@
@Name("shelf")
@Scope(ScopeType.CONVERSATION)
@Table(name = "shelves")
-//TODO nick - rename table to "shelves"
-//TODO nick - should we store this in conversation?
public class Shelf implements Serializable {
private static final long serialVersionUID = -7042878411608396483L;
@@ -129,9 +127,11 @@
throw new IllegalArgumentException("Null child!");
if (album.getShelf() != null){
//TODO nick - use removeChildAlbum()
+ album.getShelf().setUnvisitedImages(new ArrayList<Image>());
album.getShelf().removeChildAlbum(album);
}
album.setShelf(this);
+ this.setUnvisitedImages(new ArrayList<Image>());
albums.add(album);
}
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-01 10:21:47 UTC (rev 13333)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/AlbumAction.java 2009-04-01 10:29:45 UTC (rev 13334)
@@ -20,6 +20,7 @@
*/
package org.richfaces.realworld.service;
+import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
@@ -56,9 +57,10 @@
public void deleteAlbum(Album album){
if(album.getShelf()!=null){
- album.getShelf().removeChildAlbum(album);
- album.getShelf().setUnvisitedImages(null);
+ album.getShelf().setUnvisitedImages(new ArrayList<Image>());
}
+ album.getShelf().removeChildAlbum(album);
+ em.remove(album);
if(flushStrategy.isDatabaseStoreStrategy()){
em.flush();
}
Modified: trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java 2009-04-01 10:21:47 UTC (rev 13333)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ImageAction.java 2009-04-01 10:29:45 UTC (rev 13334)
@@ -51,6 +51,7 @@
image.getAlbum().setCoveringImage(null);
}
image.getAlbum().removeImage(image);
+ em.remove(image);
if (flushStrategy.isDatabaseStoreStrategy()) {
em.flush();
}
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-01 10:21:47 UTC (rev 13333)
+++ trunk/test-applications/realworld2/ejb/src/main/java/org/richfaces/realworld/service/ShelfAction.java 2009-04-01 10:29:45 UTC (rev 13334)
@@ -59,6 +59,7 @@
public void deleteShelf(Shelf shelf){
user.removeShelf(shelf);
+ em.remove(shelf);
if(flushStrategy.isDatabaseStoreStrategy()){
em.flush();
}
Modified: trunk/test-applications/realworld2/ejb/src/main/resources/import.sql
===================================================================
--- trunk/test-applications/realworld2/ejb/src/main/resources/import.sql 2009-04-01 10:21:47 UTC (rev 13333)
+++ trunk/test-applications/realworld2/ejb/src/main/resources/import.sql 2009-04-01 10:29:45 UTC (rev 13334)
@@ -72,10 +72,7 @@
INSERT INTO comments(comment_id, date, message, image_id, user_id) VALUES (28, '1985-01-08', 'Beautiful ^Flower^...great Macro....Excellent !!!',13, 1);
INSERT INTO comments(comment_id, date, message, image_id, user_id) VALUES (29, '1985-01-08', 'whoah ! wonderful',13, 1);
INSERT INTO comments(comment_id, date, message, image_id, user_id) VALUES (30, '1985-01-08', 'fantastic shot !!!!!!',13, 1);
-INSERT INTO images(image_id, name, path, description, created, album_id, cameraModel, width, size, height, uploaded, allowComments) VALUES (14, 'thumbs.db', 'amarkhel/0/thumbs.db', 'Animals - thumbs.db image', '2009-12-18', 0, 'Sony CyberShot DSC-T77', 1024, 1917, 768, '2009-12-01', true);
-INSERT INTO IMAGES_METATAGS(CI_METATAG_ID, CI_IMAGE_ID) VALUES(0, 14);
-INSERT INTO comments(comment_id, date, message, image_id, user_id) VALUES (31, '1985-01-08', 'fantastic shot !!!!!!',14, 1);
-INSERT INTO comments(comment_id, date, message, image_id, user_id) VALUES (32, '1985-01-08', 'Wonderful.',14, 1);
+
INSERT INTO images(image_id, name, path, description, created, album_id, cameraModel, width, size, height, uploaded, allowComments) VALUES (15, 'turtle.jpg', 'amarkhel/0/turtle.jpg', 'Animals - turtle.jpg image', '2009-12-18', 0, 'Canon PowerShot SX110 IS', 1024, 1917, 768, '2009-12-01', true);
INSERT INTO IMAGES_METATAGS(CI_METATAG_ID, CI_IMAGE_ID) VALUES(0, 15);
INSERT INTO comments(comment_id, date, message, image_id, user_id) VALUES (33, '1985-01-08', 'I Think this is Art!',15, 1);
@@ -231,10 +228,6 @@
INSERT INTO images(image_id, name, path, description, created, album_id, cameraModel, width, size, height, uploaded, allowComments) VALUES (46, '203076.jpg', 'Noname/2/203076.jpg', 'Coasts - 203076.jpg image', '2009-12-18', 2, 'Olympus Stylus mju 1040', 1024, 1917, 768, '2009-12-01', true);
INSERT INTO IMAGES_METATAGS(CI_METATAG_ID, CI_IMAGE_ID) VALUES(2, 46);
INSERT INTO comments(comment_id, date, message, image_id, user_id) VALUES (109, '1985-01-08', 'that is a beautiful flower with great colours ',46, 3);
-INSERT INTO images(image_id, name, path, description, created, album_id, cameraModel, width, size, height, uploaded, allowComments) VALUES (47, 'thumbs.db', 'Noname/2/thumbs.db', 'Coasts - thumbs.db image', '2009-12-18', 2, 'BBK DP810', 1024, 1917, 768, '2009-12-01', true);
-INSERT INTO IMAGES_METATAGS(CI_METATAG_ID, CI_IMAGE_ID) VALUES(2, 47);
-INSERT INTO comments(comment_id, date, message, image_id, user_id) VALUES (110, '1985-01-08', 'love every thing about this picture, really beautiful... :))',47, 3);
-INSERT INTO comments(comment_id, date, message, image_id, user_id) VALUES (111, '1985-01-08', 'Bellísima.!!! saludos.',47, 3);
---------------------------------------------------------------------
-- ALBUM - Flora
@@ -297,11 +290,6 @@
INSERT INTO comments(comment_id, date, message, image_id, user_id) VALUES (136, '1985-01-08', '++Beautiful',61, 1);
INSERT INTO images(image_id, name, path, description, created, album_id, cameraModel, width, size, height, uploaded, allowComments) VALUES (62, '403011.jpg', 'amarkhel/3/403011.jpg', 'Flora - 403011.jpg image', '2009-12-18', 3, 'Konica Minolta', 1024, 1917, 768, '2009-12-01', true);
INSERT INTO IMAGES_METATAGS(CI_METATAG_ID, CI_IMAGE_ID) VALUES(3, 62);
-INSERT INTO images(image_id, name, path, description, created, album_id, cameraModel, width, size, height, uploaded, allowComments) VALUES (63, 'thumbs.db', 'amarkhel/3/thumbs.db', 'Flora - thumbs.db image', '2009-12-18', 3, 'Panasonic', 1024, 1917, 768, '2009-12-01', true);
-INSERT INTO IMAGES_METATAGS(CI_METATAG_ID, CI_IMAGE_ID) VALUES(3, 63);
-INSERT INTO comments(comment_id, date, message, image_id, user_id) VALUES (137, '1985-01-08', 'Bellísima.!!! saludos.',63, 1);
-INSERT INTO comments(comment_id, date, message, image_id, user_id) VALUES (138, '1985-01-08', 'Stunning capture! :-)',63, 1);
-INSERT INTO comments(comment_id, date, message, image_id, user_id) VALUES (139, '1985-01-08', 'Perfecft!',63, 1);
---------------------------------------------------------------------
-- ALBUM - Ices
@@ -397,12 +385,8 @@
INSERT INTO images(image_id, name, path, description, created, album_id, cameraModel, width, size, height, uploaded, allowComments) VALUES (83, '400000.jpg', 'Viking/4/400000.jpg', 'Ices - 400000.jpg image', '2009-12-18', 4, 'Canon Digital IXUS 80 IS (PowerShot SD1100 IS)', 1024, 1917, 768, '2009-12-01', true);
INSERT INTO IMAGES_METATAGS(CI_METATAG_ID, CI_IMAGE_ID) VALUES(4, 83);
INSERT INTO comments(comment_id, date, message, image_id, user_id) VALUES (187, '1985-01-08', 'nice shot =) ',83, 2);
-INSERT INTO images(image_id, name, path, description, created, album_id, cameraModel, width, size, height, uploaded, allowComments) VALUES (84, 'thumbs.db', 'Viking/4/thumbs.db', 'Ices - thumbs.db image', '2009-12-18', 4, 'Pentax Optio E40', 1024, 1917, 768, '2009-12-01', true);
-INSERT INTO IMAGES_METATAGS(CI_METATAG_ID, CI_IMAGE_ID) VALUES(4, 84);
-INSERT INTO comments(comment_id, date, message, image_id, user_id) VALUES (188, '1985-01-08', 'Bellísima.!!! saludos.',84, 2);
-INSERT INTO comments(comment_id, date, message, image_id, user_id) VALUES (189, '1985-01-08', 'Amazing shot..',84, 2);
-INSERT INTO comments(comment_id, date, message, image_id, user_id) VALUES (190, '1985-01-08', 'I Think this is Art!',84, 2);
+
---------------------------------------------------------------------
-- ALBUM - Sport
---------------------------------------------------------------------
@@ -473,8 +457,6 @@
INSERT INTO comments(comment_id, date, message, image_id, user_id) VALUES (224, '1985-01-08', 'Wow!! Macro stupenda!!! Complimenti! ',98, 3);
INSERT INTO images(image_id, name, path, description, created, album_id, cameraModel, width, size, height, uploaded, allowComments) VALUES (99, 'swimmer.jpg', 'Noname/5/swimmer.jpg', 'Sport - swimmer.jpg image', '2009-12-18', 5, 'BBK DP810', 1024, 1917, 768, '2009-12-01', true);
INSERT INTO IMAGES_METATAGS(CI_METATAG_ID, CI_IMAGE_ID) VALUES(5, 99);
-INSERT INTO images(image_id, name, path, description, created, album_id, cameraModel, width, size, height, uploaded, allowComments) VALUES (100, 'thumbs.db', 'Noname/5/thumbs.db', 'Sport - thumbs.db image', '2009-12-18', 5, 'BenQ DC E800', 1024, 1917, 768, '2009-12-01', true);
-INSERT INTO IMAGES_METATAGS(CI_METATAG_ID, CI_IMAGE_ID) VALUES(5, 100);
---------------------------------------------------------------------
-- ALBUM - Underwater
@@ -567,8 +549,6 @@
INSERT INTO comments(comment_id, date, message, image_id, user_id) VALUES (265, '1985-01-08', 'that is a beautiful flower with great colours ',121, 1);
INSERT INTO comments(comment_id, date, message, image_id, user_id) VALUES (266, '1985-01-08', '|Wonderful| coloured flower .... *excellent* macro .... -nice- details!!!',121, 1);
INSERT INTO comments(comment_id, date, message, image_id, user_id) VALUES (267, '1985-01-08', 'really pretty. it looks like there is a lady in the _center_, blowing kisses!!',121, 1);
-INSERT INTO images(image_id, name, path, description, created, album_id, cameraModel, width, size, height, uploaded, allowComments) VALUES (122, 'thumbs.db', 'amarkhel/6/thumbs.db', 'Underwater - thumbs.db image', '2009-12-18', 6, 'Canon Digital IXUS 80 IS (PowerShot SD1100 IS)', 1024, 1917, 768, '2009-12-01', true);
-INSERT INTO IMAGES_METATAGS(CI_METATAG_ID, CI_IMAGE_ID) VALUES(6, 122);
INSERT INTO metatags(metatag_id, tag) VALUES (7, 'butterfly');
INSERT INTO IMAGES_METATAGS(CI_METATAG_ID, CI_IMAGE_ID) ( select 7, image_id from Images where name like '067%');
15 years, 8 months
JBoss Rich Faces SVN: r13333 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: cluts
Date: 2009-04-01 06:21:47 -0400 (Wed, 01 Apr 2009)
New Revision: 13333
Modified:
trunk/docs/userguide/en/src/main/docbook/included/ajaxValidator.xml
trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
trunk/docs/userguide/en/src/main/docbook/included/columns.xml
trunk/docs/userguide/en/src/main/docbook/included/componentControl.xml
trunk/docs/userguide/en/src/main/docbook/included/dataFilterSlider.xml
trunk/docs/userguide/en/src/main/docbook/included/datascroller.xml
trunk/docs/userguide/en/src/main/docbook/included/graphValidator.xml
trunk/docs/userguide/en/src/main/docbook/included/repeat.xml
trunk/docs/userguide/en/src/main/docbook/included/status.xml
trunk/docs/userguide/en/src/main/docbook/included/support.xml
Log:
RF-5117 - code samples for some chapters had been updated
Modified: trunk/docs/userguide/en/src/main/docbook/included/ajaxValidator.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/ajaxValidator.xml 2009-04-01 10:21:24 UTC (rev 13332)
+++ trunk/docs/userguide/en/src/main/docbook/included/ajaxValidator.xml 2009-04-01 10:21:47 UTC (rev 13333)
@@ -64,8 +64,8 @@
<programlisting role="XML"><![CDATA[...
<h:outputText value="Name:" />
<h:inputText value="#{userBean.name}" id="name" required="true">
- <f:validateLength minimum="3" maximum="12"/>
- <rich:ajaxValidator event="onblur"/>
+ <f:validateLength minimum="3" maximum="12"/>
+ <rich:ajaxValidator event="onblur"/>
</h:inputText>
...]]></programlisting>
</section>
@@ -79,8 +79,7 @@
<programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlCalendar;
...
HtmlAjaxValidator myAjaxValidator= new HtmlAjaxValidator();
-...
-]]></programlisting>
+...]]></programlisting>
</section>
<section>
<title>Details of Usage</title>
@@ -113,7 +112,7 @@
<h:outputText value="Name:" />
<h:inputText value="#{userBean.name}" id="name" required="true">
<f:validateLength minimum="3" maximum="12"/>
- <rich:ajaxValidator event="onblur"/>
+ <rich:ajaxValidator event="onblur"/>
</h:inputText>
<rich:message for="name" />
</h:panelGrid>
Modified: trunk/docs/userguide/en/src/main/docbook/included/calendar.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2009-04-01 10:21:24 UTC (rev 13332)
+++ trunk/docs/userguide/en/src/main/docbook/included/calendar.xml 2009-04-01 10:21:47 UTC (rev 13333)
@@ -222,10 +222,10 @@
<property>"ondateselected"</property>
</emphasis> event as it's shown in the example below:</para>
<programlisting role="XML"><![CDATA[...
- <rich:calendar id="date" value="#{bean.dateTest}">
- <a4j:support event="ondateselected" reRender="mainTable"/>
- </rich:calendar>
- ...]]></programlisting>
+<rich:calendar id="date" value="#{bean.dateTest}">
+ <a4j:support event="ondateselected" reRender="mainTable"/>
+</rich:calendar>
+...]]></programlisting>
<note>
<title>Note:</title>
<para>
@@ -238,8 +238,8 @@
</emphasis> could be used for possibility of date selection canceling.
See an example below:</para>
<programlisting role="XML"><![CDATA[...
- <rich:calendar id="date" value="#{bean.dateTest}" ondateselect="if (!confirm('Are you sure to change date?')){return false;}"/>
- ...]]></programlisting>
+<rich:calendar id="date" value="#{bean.dateTest}" ondateselect="if (!confirm('Are you sure to change date?')){return false;}"/>
+...]]></programlisting>
<para>
<emphasis>
<property>"oncurrentdateselected"</property>
@@ -258,8 +258,8 @@
</para>
<programlisting role="XML"><![CDATA[...
<rich:calendar id="date" value="#{bean.dateTest}" oncurrentdateselect="if (!confirm('Are you sure to change month(year)?')){return false;}"
-oncurrentdateselected="alert('month(year) select:'+event.rich.date.toString());"/>
- ...]]></programlisting>
+ oncurrentdateselected="alert('month(year) select:'+event.rich.date.toString());"/>
+...]]></programlisting>
<para>How to use these attributes see also on the <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092275#..."
>RichFaces Users Forum</ulink>.</para>
@@ -2039,8 +2039,7 @@
<para>
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="XML"><![CDATA[<rich:calendar ... inputClass="myFontClass"/>
-]]></programlisting>
+ <programlisting role="XML"><![CDATA[<rich:calendar ... inputClass="myFontClass"/>]]></programlisting>
<para>This is a result:</para>
Modified: trunk/docs/userguide/en/src/main/docbook/included/columns.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/columns.xml 2009-04-01 10:21:24 UTC (rev 13332)
+++ trunk/docs/userguide/en/src/main/docbook/included/columns.xml 2009-04-01 10:21:47 UTC (rev 13333)
@@ -226,8 +226,7 @@
<h:outputText value="#{data.str0}" />
</rich:columns>
</rich:dataTable>
-...
-]]></programlisting>
+...]]></programlisting>
<!--para>As a result the following structure is rendered:</para>
<figure>
@@ -297,20 +296,18 @@
<programlisting role="XML"><![CDATA[...
<rich:dataTable value="#{bean.data}" var="var">
<rich:columns value="#{var.columns}">
- ...
+ ...
</rich:columns>
</rich:dataTable>
-...
-]]></programlisting>
+...]]></programlisting>
<para> This code works properly: </para>
<programlisting role="XML"><![CDATA[...
<c:forEach items="#{bean.data}" var="var">
<rich:columns value="#{var.columns}">
- ...
+ ...
</rich:columns>
</c:forEach>
-...
-]]></programlisting>
+...]]></programlisting>
</note>
Modified: trunk/docs/userguide/en/src/main/docbook/included/componentControl.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/componentControl.xml 2009-04-01 10:21:24 UTC (rev 13332)
+++ trunk/docs/userguide/en/src/main/docbook/included/componentControl.xml 2009-04-01 10:21:47 UTC (rev 13333)
@@ -76,8 +76,7 @@
<programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlComponentControl;
...
HtmlComponentControl myComponentControl = new HtmlComponentControl();
-...
-]]></programlisting>
+...]]></programlisting>
</section>
@@ -114,10 +113,9 @@
</para>
<programlisting role="XML"><![CDATA[...
<h:commandButton value="Show Modal Panel">
- <rich:componentControl for="ccModalPanelID" event="onclick" operation="show"/> <!--attached to the commandButton-->
+ <rich:componentControl for="ccModalPanelID" event="onclick" operation="show"/> <!--attached to the commandButton-->
</h:commandButton>
-...
-]]></programlisting>
+...]]></programlisting>
<para>
On the result page the component is rendered to JavaScript code.
This means, that it is possible to invoke the <emphasis role="bold"><property><rich:componentControl></property></emphasis>
@@ -127,14 +125,12 @@
</para>
<programlisting role="XML"><![CDATA[...
<rich:componentControl name="func" event="onRowClick" for="menu" operation="show" />
-...
-]]></programlisting>
+...]]></programlisting>
<para>
The generated JavaScript function will look as shown below:
</para>
<programlisting role="XML"><![CDATA[function func (event) {
-}
-]]></programlisting>
+}]]></programlisting>
<para>
An important <emphasis role="bold"><property><rich:componentControl></property></emphasis> feature,
is that it allows transferring parameters, with the help of special attribute <emphasis><property>"params"</property></emphasis>.
@@ -144,8 +140,7 @@
</para>
<programlisting role="XML"><![CDATA[...
<rich:componentControl name="func" event="onRowClick" for="menu" operation="show" params=”#{car.model}"/>
-...
-]]></programlisting>
+...]]></programlisting>
<para>
The alternative way for parameters transferring uses <emphasis role="bold"><property><f:param></property></emphasis> attribute.
As the code above, the following code will represent the same functionality.
@@ -155,10 +150,9 @@
</para>
<programlisting role="XML"><![CDATA[...
<rich:componentControl event="onRowClick" for="menu" operation="show">
- <f:param value="#{car.model}" name="model"/>
+ <f:param value="#{car.model}" name="model"/>
</rich:componentControl>
-...
-]]></programlisting>
+...]]></programlisting>
@@ -316,7 +310,8 @@
<f:view>
<h:form>
<br />
- <rich:toolTip id="toolTipFor" followMouse="false" direction="top-right" mode="ajax" value="This is button" horizontalOffset="5" verticalOffset="5" layout="block" />
+ <rich:toolTip id="toolTipFor" followMouse="false" direction="top-right" mode="ajax" value="This is button"
+ horizontalOffset="5" verticalOffset="5" layout="block" />
</h:form>
<h:commandButton id="ButtonID" value="Button">
<rich:componentControl for="toolTipFor" attachTo="ButtonID" operation="show" event="onclick"/>
Modified: trunk/docs/userguide/en/src/main/docbook/included/dataFilterSlider.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dataFilterSlider.xml 2009-04-01 10:21:24 UTC (rev 13332)
+++ trunk/docs/userguide/en/src/main/docbook/included/dataFilterSlider.xml 2009-04-01 10:21:47 UTC (rev 13333)
@@ -50,8 +50,7 @@
<programlisting role="XML"><![CDATA[...
<rich:dataFilterSlider sliderListener="#{mybean.doSlide}" startRange="0"
endRange="50000" increment="10000" handleValue="1" />
-...
-]]></programlisting>
+...]]></programlisting>
</section>
<section>
<title>Creating the Component Dynamically Using Java</title>
@@ -62,8 +61,7 @@
<programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlDataFilterSlider;
...
HtmlDataFilterSlider mySlider = new HtmlDataFilterSlider();
-...
-]]></programlisting>
+...]]></programlisting>
</section>
<section>
<title>Details of Usage</title>
@@ -83,14 +81,12 @@
handleValue="1"
for="carIndex"
forValRef="inventoryList.carInventory"
- filterBy="getMileage"
- />
+ filterBy="getMileage" />
...
<h:dataTable id="carIndex">
- ...
+ ...
</h:dataTable>
-...
-]]></programlisting>
+...]]></programlisting>
<para>In this example other two attributes are used for filtering:</para>
<itemizedlist>
<listitem><para>
Modified: trunk/docs/userguide/en/src/main/docbook/included/datascroller.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/datascroller.xml 2009-04-01 10:21:24 UTC (rev 13332)
+++ trunk/docs/userguide/en/src/main/docbook/included/datascroller.xml 2009-04-01 10:21:47 UTC (rev 13333)
@@ -51,13 +51,12 @@
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[...
- <h:dataTable id="table">
- ...
- </h:dataTable>
- ...
- <rich:datascroller for="table"/>
-...
-]]></programlisting>
+<h:dataTable id="table">
+ ...
+</h:dataTable>
+ ...
+<rich:datascroller for="table"/>
+...]]></programlisting>
</section>
<section>
<title>Creating the Component Dynamically Using Java</title>
@@ -68,8 +67,7 @@
<programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlDatascroller;
...
HtmlDatascroller myScroll = new HtmlDatascroller();
-...
-]]></programlisting>
+...]]></programlisting>
</section>
<section>
<title>Details of Usage</title>
@@ -134,16 +132,15 @@
<emphasis role="bold">Example:</emphasis>
</para>
<programlisting role="XML"><![CDATA[ ...
- <rich:datascroller for="table" maxPages="10">
- <f:facet name="first">
- <h:outputText value="First"/>
- </f:facet>
- <f:facet name="last">
- <h:outputText value="Last"/>
- </f:facet>
- </rich:datascroller>
-...
-]]></programlisting>
+<rich:datascroller for="table" maxPages="10">
+ <f:facet name="first">
+ <h:outputText value="First"/>
+ </f:facet>
+ <f:facet name="last">
+ <h:outputText value="Last"/>
+ </f:facet>
+</rich:datascroller>
+...]]></programlisting>
<figure>
<title><emphasis role="bold">
<property><rich:datascroller></property>
@@ -211,8 +208,7 @@
</h:panelGroup>
</h:panelGrid>
</h:form>
-...
-]]></programlisting>
+...]]></programlisting>
<para> In the example above you can enter the page number you want and set it by
clicking on the <emphasis role="bold">
@@ -280,11 +276,10 @@
<property>"controlsSeparator"</property>
</emphasis> facet. An example is placed below. </para>
<programlisting role="XML"><![CDATA[ ...
- <f:facet name="controlsSeparator">
- <h:graphicImage value="/image/sep.png"/>
- </f:facet>
-...
-]]></programlisting>
+<f:facet name="controlsSeparator">
+ <h:graphicImage value="/image/sep.png"/>
+</f:facet>
+...]]></programlisting>
<para> Starting from 3.2.1 of RichFaces multiple <emphasis role="bold">
<property><rich:datascroller></property>
</emphasis> instances behavior and page bindings are corrected.
Modified: trunk/docs/userguide/en/src/main/docbook/included/graphValidator.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/graphValidator.xml 2009-04-01 10:21:24 UTC (rev 13332)
+++ trunk/docs/userguide/en/src/main/docbook/included/graphValidator.xml 2009-04-01 10:21:47 UTC (rev 13333)
@@ -63,10 +63,10 @@
</para>
<programlisting role="XML"><![CDATA[...
<h:outputText value="Name:" />
- <h:inputText value="#{userBean.name}" id="name" required="true">
- <f:validateLength minimum="3" maximum="12"/>
- <rich:graphValidator event="onblur"/>
- </h:inputText>
+<h:inputText value="#{userBean.name}" id="name" required="true">
+ <f:validateLength minimum="3" maximum="12"/>
+ <rich:graphValidator event="onblur"/>
+</h:inputText>
...]]></programlisting>
</section>
@@ -79,8 +79,7 @@
<programlisting role="JAVA"><![CDATA[import org.richfaces.component.html.HtmlCalendar;
...
HtmlgraphValidator mygraphValidator= new HtmlgraphValidator();
-...
-]]></programlisting>
+...]]></programlisting>
</section>
@@ -134,15 +133,13 @@
<programlisting role="XML"><![CDATA[...
<rich:graphValidator summary="Invalid values: " value="#{dayStatistics}">
-<a4j:repeat value="#{dayStatistics.dayPasstimes}" var="pt" id="table">
-<h:outputText value="#{pt.title}" />
-<rich:inputNumberSpinner minValue="0" maxValue="24" value="#{pt.time}" id="time">
-</rich:inputNumberSpinner>
-<rich:message for="time" />
-</a4j:repeat>
+ <a4j:repeat value="#{dayStatistics.dayPasstimes}" var="pt" id="table">
+ <h:outputText value="#{pt.title}" />
+ <rich:inputNumberSpinner minValue="0" maxValue="24" value="#{pt.time}" id="time" />
+ <rich:message for="time" />
+ </a4j:repeat>
</rich:graphValidator>
-...
-]]></programlisting>
+...]]></programlisting>
<para>Hence, the given above code will provide the functionality that is illustrated on the images below.</para>
Modified: trunk/docs/userguide/en/src/main/docbook/included/repeat.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/repeat.xml 2009-04-01 10:21:24 UTC (rev 13332)
+++ trunk/docs/userguide/en/src/main/docbook/included/repeat.xml 2009-04-01 10:21:47 UTC (rev 13333)
@@ -103,11 +103,10 @@
<programlisting role="XML"><![CDATA[<ul>
<a4j:repeat ...>
<li>...<li/>
- ...
+ ...
<li>...<li/>
</a4j:repeat>
-</ul>
-]]></programlisting>
+</ul>]]></programlisting>
<para>All other general attributes are defined according to the similar
attributes of iterative components (<emphasis role="bold">
<property><h:dataTable></property>
Modified: trunk/docs/userguide/en/src/main/docbook/included/status.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/status.xml 2009-04-01 10:21:24 UTC (rev 13332)
+++ trunk/docs/userguide/en/src/main/docbook/included/status.xml 2009-04-01 10:21:47 UTC (rev 13333)
@@ -51,12 +51,12 @@
<listitem><para>
With <emphasis><property>"Start"</property></emphasis>/<emphasis><property>"Stop"</property></emphasis > facets definition:</para>
<programlisting role="XML"><![CDATA[<a4j:status for="stat2">
- <f:facet name="start">
- <h:graphicImage value="ajax_process.png" />
- </f:facet>
- <f:facet name="stop">
- <h:graphicImage value="ajax_stoped.png" />
- </f:facet>
+ <f:facet name="start">
+ <h:graphicImage value="ajax_process.png" />
+ </f:facet>
+ <f:facet name="stop">
+ <h:graphicImage value="ajax_stoped.png" />
+ </f:facet>
</a4j:status>]]></programlisting>
<para>In this case, the elements are generated for each status and correspond the facets content.</para>
</listitem>
Modified: trunk/docs/userguide/en/src/main/docbook/included/support.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/support.xml 2009-04-01 10:21:24 UTC (rev 13332)
+++ trunk/docs/userguide/en/src/main/docbook/included/support.xml 2009-04-01 10:21:47 UTC (rev 13333)
@@ -130,8 +130,7 @@
<f:selectItem itemValue="First Item" itemLabel="First Item"/>
<f:selectItem itemValue=" Second Item" itemLabel="Second Item"/>
<f:selectItem itemValue=" Third Item" itemLabel="Third Item"/>
- <a4j:support event="onblur" reRender="panel" onsubmit="if(!confirm('Are you sure to change the option ?'))
- {form.reset(); return false;}" oncomplete="alert('Value succesfully stored')"/>
+ <a4j:support event="onblur" reRender="panel" onsubmit="if(!confirm('Are you sure to change the option ?')) {form.reset(); return false;}" oncomplete="alert('Value succesfully stored')"/>
</h:selectOneMenu>]]></programlisting>
<para>In example there is the condition checking (confirm) is used before
request sending and message printing after the request processing is
@@ -235,8 +234,7 @@
</para>
<programlisting role="XML"><![CDATA[<h:form>
<h:inputText value="#{person.name}">
- <a4j:support event="onkeyup" reRender="test"
- requestDelay="1000" ignoreDupResponces="true" eventsQueue="myQueue"/>
+ <a4j:support event="onkeyup" reRender="test" requestDelay="1000" ignoreDupResponces="true" eventsQueue="myQueue"/>
</h:inputText>
<h:outputText value="#{person.name}" id="test"/>
</form>]]></programlisting>
15 years, 8 months
JBoss Rich Faces SVN: r13332 - trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2009-04-01 06:21:24 -0400 (Wed, 01 Apr 2009)
New Revision: 13332
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ProgressBarTest.java
Log:
RF-6523
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ProgressBarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ProgressBarTest.java 2009-03-31 23:54:56 UTC (rev 13331)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ProgressBarTest.java 2009-04-01 10:21:24 UTC (rev 13332)
@@ -60,7 +60,9 @@
writeStatus("Enable polling");
enableProgressBar(progressBarId, true);
- pause(5000, progressBarId);
+ while (progressBarId.indexOf("progressBar1") != -1 && !selenium.isElementPresent(progressBarId + ":remain")) {
+ waitForAjaxCompletion();
+ }
writeStatus("Disable polling");
enableProgressBar(progressBarId, false);
@@ -238,7 +240,9 @@
// enable()
enableProgressBar(progressBarId, true);
- pause(5000, progressBarId);
+ while (progressBarId.indexOf("progressBar1") != -1 && !selenium.isElementPresent(progressBarId + ":remain")) {
+ waitForAjaxCompletion();
+ }
// disable()
writeStatus("Disable polling");
@@ -280,7 +284,9 @@
writeStatus("Enable polling");
enableProgressBar(progressBarId, true);
- pause(5000, progressBarId);
+ while (!selenium.isElementPresent(progressBarId + ":remain")) {
+ waitForAjaxCompletion();
+ }
writeStatus("Disable polling");
enableProgressBar(progressBarId, false);
@@ -321,7 +327,9 @@
writeStatus("Enable polling");
enableProgressBar(progressBarId, true);
- pause(5000, progressBarId);
+ while (progressBarId.indexOf("progressBar1") != -1 && !selenium.isElementPresent(progressBarId + ":remain")) {
+ waitForAjaxCompletion();
+ }
writeStatus("Disable polling");
enableProgressBar(progressBarId, false);
@@ -353,7 +361,9 @@
writeStatus("Enable polling");
enableProgressBar(progressBarId, true);
- pause(5000, progressBarId);
+ while (!selenium.isElementPresent(progressBarId + ":remain")) {
+ waitForAjaxCompletion();
+ }
writeStatus("Disable polling");
enableProgressBar(progressBarId, false);
15 years, 8 months