JBoss Rich Faces SVN: r14085 - trunk/framework/impl/src/main/javascript/jquery.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-05-08 12:43:07 -0400 (Fri, 08 May 2009)
New Revision: 14085
Modified:
trunk/framework/impl/src/main/javascript/jquery/jquery-1.3.2.js
Log:
https://jira.jboss.org/jira/browse/RF-7056
Modified: trunk/framework/impl/src/main/javascript/jquery/jquery-1.3.2.js
===================================================================
--- trunk/framework/impl/src/main/javascript/jquery/jquery-1.3.2.js 2009-05-08 16:41:25 UTC (rev 14084)
+++ trunk/framework/impl/src/main/javascript/jquery/jquery-1.3.2.js 2009-05-08 16:43:07 UTC (rev 14085)
@@ -4339,53 +4339,74 @@
this[0][ method ];
};
});
-// Create innerHeight, innerWidth, outerHeight and outerWidth methods
-jQuery.each([ "Height", "Width" ], function(i, name){
- var tl = i ? "Left" : "Top", // top or left
- br = i ? "Right" : "Bottom", // bottom or right
- lower = name.toLowerCase();
-
- // innerHeight and innerWidth
- jQuery.fn["inner" + name] = function(){
- return this[0] ?
- jQuery.css( this[0], lower, false, "padding" ) :
- null;
+(function() {
+ var safariCompatMode;
+ var getCompatMode = function() {
+ var compatMode = document.compatMode;
+ if (!compatMode && jQuery.browser.safari) {
+ if (!safariCompatMode) {
+ //detect compatMode as described in http://code.google.com/p/doctype/wiki/ArticleCompatMode
+ var width = jQuery(document.createElement("div")).attr('style', 'position:absolute;width:0;height:0;width:1')
+ .css('width');
+ safariCompatMode = compatMode = (width == '1px' ? 'BackCompat' : 'CSS1Compat');
+ } else {
+ compatMode = safariCompatMode;
+ }
+ }
+
+ return compatMode;
};
-
- // outerHeight and outerWidth
- jQuery.fn["outer" + name] = function(margin) {
- return this[0] ?
- jQuery.css( this[0], lower, false, margin ? "margin" : "border" ) :
- null;
- };
- var type = name.toLowerCase();
+
+ // Create innerHeight, innerWidth, outerHeight and outerWidth methods
+ jQuery.each([ "Height", "Width" ], function(i, name){
- jQuery.fn[ type ] = function( size ) {
- // Get window width or height
- return this[0] == window ?
- // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
- document.compatMode == "CSS1Compat" && document.documentElement[ "client" + name ] ||
- document.body[ "client" + name ] :
+ var tl = i ? "Left" : "Top", // top or left
+ br = i ? "Right" : "Bottom", // bottom or right
+ lower = name.toLowerCase();
- // Get document width or height
- this[0] == document ?
- // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
- Math.max(
- document.documentElement["client" + name],
- document.body["scroll" + name], document.documentElement["scroll" + name],
- document.body["offset" + name], document.documentElement["offset" + name]
- ) :
+ // innerHeight and innerWidth
+ jQuery.fn["inner" + name] = function(){
+ return this[0] ?
+ jQuery.css( this[0], lower, false, "padding" ) :
+ null;
+ };
- // Get or set width or height on the element
- size === undefined ?
- // Get width or height on the element
- (this.length ? jQuery.css( this[0], type ) : null) :
+ // outerHeight and outerWidth
+ jQuery.fn["outer" + name] = function(margin) {
+ return this[0] ?
+ jQuery.css( this[0], lower, false, margin ? "margin" : "border" ) :
+ null;
+ };
+
+ var type = name.toLowerCase();
- // Set the width or height on the element (default to pixels if value is unitless)
- this.css( type, typeof size === "string" ? size : size + "px" );
- };
+ jQuery.fn[ type ] = function( size ) {
+ // Get window width or height
+ return this[0] == window ?
+ // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
+ getCompatMode() == "CSS1Compat" && document.documentElement[ "client" + name ] ||
+ document.body[ "client" + name ] :
-});
+ // Get document width or height
+ this[0] == document ?
+ // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
+ Math.max(
+ document.documentElement["client" + name],
+ document.body["scroll" + name], document.documentElement["scroll" + name],
+ document.body["offset" + name], document.documentElement["offset" + name]
+ ) :
+
+ // Get or set width or height on the element
+ size === undefined ?
+ // Get width or height on the element
+ (this.length ? jQuery.css( this[0], type ) : null) :
+
+ // Set the width or height on the element (default to pixels if value is unitless)
+ this.css( type, typeof size === "string" ? size : size + "px" );
+ };
+
+ });
+}());
})();
15 years
JBoss Rich Faces SVN: r14084 - in trunk/examples/photoalbum/source/web: src/main/java/org/richfaces/photoalbum/manager and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-05-08 12:41:25 -0400 (Fri, 08 May 2009)
New Revision: 14084
Modified:
trunk/examples/photoalbum/source/web/pom.xml
trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/AlbumManager.java
trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/Controller.java
trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/ImageManager.java
trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/ShelfManager.java
trunk/examples/photoalbum/source/web/src/main/resources/messages_en.properties
trunk/examples/photoalbum/source/web/src/main/resources/org/richfaces/photoalbum/editor/advanced.properties
trunk/examples/photoalbum/source/web/src/main/webapp/includes/album/albumEditInfo.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/album/albumInfo.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/imageEditInfo.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/imageInfo.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/imageScroller.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/shelf/shelfEditInfo.xhtml
trunk/examples/photoalbum/source/web/src/main/webapp/includes/shelf/shelfInfo.xhtml
Log:
Modified: trunk/examples/photoalbum/source/web/pom.xml
===================================================================
--- trunk/examples/photoalbum/source/web/pom.xml 2009-05-08 16:41:10 UTC (rev 14083)
+++ trunk/examples/photoalbum/source/web/pom.xml 2009-05-08 16:41:25 UTC (rev 14084)
@@ -66,6 +66,12 @@
<scope>provided</scope>
</dependency>
<dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-commons-annotations</artifactId>
+ <version>3.3.0.ga</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0</version>
Modified: trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/AlbumManager.java
===================================================================
--- trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/AlbumManager.java 2009-05-08 16:41:10 UTC (rev 14083)
+++ trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/AlbumManager.java 2009-05-08 16:41:25 UTC (rev 14084)
@@ -26,6 +26,8 @@
*/
import java.io.Serializable;
+import org.hibernate.validator.ClassValidator;
+import org.hibernate.validator.InvalidValue;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.In;
@@ -72,7 +74,7 @@
return;
}
//Album name must be unique in shelf
- if(user.hasAlbumWithName(album.getName())){
+ if(user.hasAlbumWithName(album)){
Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, Constants.SAME_ALBUM_EXIST_ERROR);
return;
}
@@ -117,11 +119,31 @@
/**
* Method, that invoked when user click 'Edit album' button. Only registered users can edit albums.
* @param album - edited album
- *
+ * @param editFromInplace - indicate whether edit process was initiated by inplaceInput component
*/
@Restrict("#{s:hasRole('admin')}")
- public void editAlbum(Album album){
+ public void editAlbum(Album album, boolean editFromInplace){
try{
+ if(user.hasAlbumWithName(album)){
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, Constants.SAME_ALBUM_EXIST_ERROR);
+ if(editFromInplace){
+ albumAction.resetAlbum(album);
+ }
+ return;
+ }
+ if(editFromInplace){
+ //We need validate album name manually
+ ClassValidator<Album> shelfValidator = new ClassValidator<Album>(Album.class );
+ InvalidValue[] validationMessages = shelfValidator.getInvalidValues(album, "name");
+ if(validationMessages.length > 0 ){
+ for(InvalidValue i : validationMessages){
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, i.getMessage());
+ }
+ //If error occured we need refresh album to display correct value in inplaceInput
+ albumAction.resetAlbum(album);
+ return;
+ }
+ }
albumAction.editAlbum(album);
}catch(Exception e){
Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, Constants.ALBUM_SAVING_ERROR);
Modified: trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/Controller.java
===================================================================
--- trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/Controller.java 2009-05-08 16:41:10 UTC (rev 14083)
+++ trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/Controller.java 2009-05-08 16:41:25 UTC (rev 14084)
@@ -97,6 +97,7 @@
}
public void showImage(Image image){
+ pushEvent(Constants.CLEAR_EDITOR_EVENT);
if(!canViewImage(image)){
pushEvent(Constants.ADD_ERROR_EVENT, Constants.HAVENT_ACCESS);
return;
@@ -280,6 +281,10 @@
return index / 5 + 1;
}
+ public void setPage(Integer page){
+
+ }
+
public boolean isUserImage(Image image){
if(image == null || image.getOwner() == null) {
return false;
Modified: trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/ImageManager.java
===================================================================
--- trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/ImageManager.java 2009-05-08 16:41:10 UTC (rev 14083)
+++ trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/ImageManager.java 2009-05-08 16:41:25 UTC (rev 14084)
@@ -31,6 +31,8 @@
import javax.faces.context.FacesContext;
import javax.servlet.http.HttpServletRequest;
+import org.hibernate.validator.ClassValidator;
+import org.hibernate.validator.InvalidValue;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.In;
@@ -41,6 +43,7 @@
import org.richfaces.photoalbum.domain.Comment;
import org.richfaces.photoalbum.domain.Image;
import org.richfaces.photoalbum.domain.MetaTag;
+import org.richfaces.photoalbum.domain.Shelf;
import org.richfaces.photoalbum.domain.User;
import org.richfaces.photoalbum.service.Constants;
import org.richfaces.photoalbum.service.IImageAction;
@@ -77,12 +80,32 @@
/**
* Method, that invoked when user click 'Edit image' button. Only registered users can edit images.
* @param image - image to edit
- *
+ * @param editFromInplace - indicate whether edit process was initiated by inplaceInput component
*/
@Restrict("#{s:hasRole('admin')}")
- public void editImage(Image image, boolean metatagsChanged) {
+ public void editImage(Image image, boolean editFromInplace) {
try{
- imageAction.editImage(image, metatagsChanged);
+ if(user.hasImageWithName(image)){
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, Constants.SAME_IMAGE_EXIST_ERROR);
+ if(editFromInplace){
+ imageAction.resetImage(image);
+ }
+ return;
+ }
+ if(editFromInplace){
+ //We need validate image name manually
+ ClassValidator<Image> shelfValidator = new ClassValidator<Image>(Image.class );
+ InvalidValue[] validationMessages = shelfValidator.getInvalidValues(image, "name");
+ if(validationMessages.length > 0 ){
+ for(InvalidValue i : validationMessages){
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, i.getMessage());
+ }
+ //If error occured we need refresh image to display correct value in inplaceInput
+ imageAction.resetImage(image);
+ return;
+ }
+ }
+ imageAction.editImage(image, editFromInplace);
}catch(Exception e){
Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, Constants.IMAGE_SAVING_ERROR);
imageAction.resetImage(image);
Modified: trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/ShelfManager.java
===================================================================
--- trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/ShelfManager.java 2009-05-08 16:41:10 UTC (rev 14083)
+++ trunk/examples/photoalbum/source/web/src/main/java/org/richfaces/photoalbum/manager/ShelfManager.java 2009-05-08 16:41:25 UTC (rev 14084)
@@ -28,6 +28,8 @@
import java.io.Serializable;
import java.util.List;
+import org.hibernate.validator.ClassValidator;
+import org.hibernate.validator.InvalidValue;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.In;
@@ -73,7 +75,7 @@
*/
@Restrict("#{s:hasRole('admin')}")
public void addShelf(Shelf shelf) {
- if(user.hasShelfWithName(shelf.getName())){
+ if(user.hasShelfWithName(shelf)){
Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, Constants.SAME_SHELF_EXIST_ERROR);
return;
}
@@ -88,13 +90,34 @@
}
/**
- * Method, that invoked when user click 'Edit shelf' button. Only registered users can edit shelves.
+ * Method, that invoked when user click 'Edit shelf' button or by inplaceInput component. Only registered users can edit shelves.
* @param shelf - shelf to edit
+ * @param editFromInplace - indicate whether edit process was initiated by inplaceInput component
*
*/
@Restrict("#{s:hasRole('admin')}")
- public void editShelf(Shelf shelf) {
+ public void editShelf(Shelf shelf, boolean editFromInplace) {
try{
+ if(user.hasShelfWithName(shelf)){
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, Constants.SAME_SHELF_EXIST_ERROR);
+ if(editFromInplace){
+ shelfAction.resetShelf(shelf);
+ }
+ return;
+ }
+ if(editFromInplace){
+ //We need validate shelf name manually
+ ClassValidator<Shelf> shelfValidator = new ClassValidator<Shelf>(Shelf.class );
+ InvalidValue[] validationMessages = shelfValidator.getInvalidValues(shelf, "name");
+ if(validationMessages.length > 0 ){
+ for(InvalidValue i : validationMessages){
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, i.getMessage());
+ }
+ //If error occured we need refresh shelf to display correct value in inplaceInput
+ shelfAction.resetShelf(shelf);
+ return;
+ }
+ }
shelfAction.editShelf(shelf);
}catch(Exception e){
Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, Constants.SHELF_SAVING_ERROR);
Modified: trunk/examples/photoalbum/source/web/src/main/resources/messages_en.properties
===================================================================
--- trunk/examples/photoalbum/source/web/src/main/resources/messages_en.properties 2009-05-08 16:41:10 UTC (rev 14083)
+++ trunk/examples/photoalbum/source/web/src/main/resources/messages_en.properties 2009-05-08 16:41:25 UTC (rev 14084)
@@ -264,7 +264,7 @@
all_new_images=All new images
in_album=in album
public_shelves=Pre-defined Shelves
-all_images=All images
+all_images=All images
related_to_tag=related to tag
my_all_albums=My all albums
my_all_photos=My all images
Modified: trunk/examples/photoalbum/source/web/src/main/resources/org/richfaces/photoalbum/editor/advanced.properties
===================================================================
--- trunk/examples/photoalbum/source/web/src/main/resources/org/richfaces/photoalbum/editor/advanced.properties 2009-05-08 16:41:10 UTC (rev 14083)
+++ trunk/examples/photoalbum/source/web/src/main/resources/org/richfaces/photoalbum/editor/advanced.properties 2009-05-08 16:41:25 UTC (rev 14084)
@@ -1,7 +1,7 @@
theme="advanced"
-plugins="save,insertdatetime,paste"
+plugins="insertdatetime"
theme_advanced_buttons1 : "bold,italic,underline,strikethrough"
-theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,separator,bullist,numlist,separator,undo,redo,separator,cleanup,help,code,separator,insertdate,inserttime,separator,forecolor,backcolor"
+theme_advanced_buttons2 : "bullist,numlist,separator,undo,redo,separator,cleanup,help,code,separator,insertdate,inserttime,separator,forecolor,backcolor"
theme_advanced_buttons3 : "hr,sub,sup"
theme_advanced_toolbar_location : "top"
theme_advanced_toolbar_align : "left"
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/album/albumEditInfo.xhtml
===================================================================
(Binary files differ)
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/album/albumInfo.xhtml
===================================================================
(Binary files differ)
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/imageEditInfo.xhtml
===================================================================
(Binary files differ)
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/imageInfo.xhtml
===================================================================
(Binary files differ)
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/imageScroller.xhtml
===================================================================
--- trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/imageScroller.xhtml 2009-05-08 16:41:10 UTC (rev 14083)
+++ trunk/examples/photoalbum/source/web/src/main/webapp/includes/image/imageScroller.xhtml 2009-05-08 16:41:25 UTC (rev 14084)
@@ -34,7 +34,7 @@
</a4j:outputPanel>
</a4j:repeat>
- <rich:datascroller page="#{controller.getPage()}" styleClass="image-scroller" lastPageMode="full"
+ <rich:datascroller page="#{controller.page}" styleClass="image-scroller" lastPageMode="full"
for="repeat" reRender="imagesTable" boundaryControls="hide"
stepControls="hide">
<f:facet name="pages">
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/shelf/shelfEditInfo.xhtml
===================================================================
--- trunk/examples/photoalbum/source/web/src/main/webapp/includes/shelf/shelfEditInfo.xhtml 2009-05-08 16:41:10 UTC (rev 14083)
+++ trunk/examples/photoalbum/source/web/src/main/webapp/includes/shelf/shelfEditInfo.xhtml 2009-05-08 16:41:25 UTC (rev 14084)
@@ -76,7 +76,7 @@
<td valign="top">
</td>
<td valign="top" align="right" colspan="2" style="padding : 10px;">
- <richx:commandButton id="saveButton" style="float: left" value="#{messages['save']}" actionListener="#{shelfManager.editShelf(model.selectedShelf)}" reRender="treePanel, mainArea" />
+ <richx:commandButton id="saveButton" style="float: left" value="#{messages['save']}" actionListener="#{shelfManager.editShelf(model.selectedShelf, false)}" reRender="treePanel, mainArea" />
<richx:commandButton id="cancelButton" value="#{messages['cancel']}" immediate="true" actionListener="#{controller.cancelEditShelf()}" reRender="mainArea" />
</td>
</tr>
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/includes/shelf/shelfInfo.xhtml
===================================================================
(Binary files differ)
15 years
JBoss Rich Faces SVN: r14083 - in trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum: service and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-05-08 12:41:10 -0400 (Fri, 08 May 2009)
New Revision: 14083
Modified:
trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/User.java
trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/Constants.java
Log:
Modified: trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/User.java
===================================================================
--- trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/User.java 2009-05-08 16:04:43 UTC (rev 14082)
+++ trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/domain/User.java 2009-05-08 16:41:10 UTC (rev 14083)
@@ -361,6 +361,51 @@
return albums;
}
+ /**
+ * This method check, if user already have shelf with given name
+ *
+ * @param shelf - shelf to check
+ * @return boolean value, that indicated if shelf with the same name exist
+ */
+ public boolean hasShelfWithName(Shelf shelf) {
+ for(Shelf s : getShelves()){
+ if(!s.equals(shelf) && s.getName().equals(shelf.getName())){
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * This method check, if parent shelf contain album with the same name as given album
+ *
+ * @param album - album to check
+ * @return boolean value, that indicate if album with the same name exist
+ */
+ public boolean hasAlbumWithName(Album album) {
+ for(Album a : album.getShelf().getAlbums()){
+ if(!a.equals(album) && a.getName().equals(album.getName())){
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * This method check, if containing album already have image with the same name
+ *
+ * @param image - image to check
+ * @return boolean value, that indicate if image with the same name exist
+ */
+ public boolean hasImageWithName(Image image) {
+ for(Image i : image.getAlbum().getImages()){
+ if(!i.equals(image) && i.getName().equals(image.getName())){
+ return true;
+ }
+ }
+ return false;
+ }
+
public boolean equals(final Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
@@ -379,22 +424,4 @@
result = 31 * result + (login != null ? login.hashCode() : 0);
return result;
}
-
- public boolean hasShelfWithName(String name) {
- for(Shelf s : getShelves()){
- if(s.getName().equals(name)){
- return true;
- }
- }
- return false;
- }
-
- public boolean hasAlbumWithName(String name) {
- for(Album a : getAlbums()){
- if(a.getName().equals(name)){
- return true;
- }
- }
- return false;
- }
}
\ No newline at end of file
Modified: trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/Constants.java
===================================================================
--- trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/Constants.java 2009-05-08 16:04:43 UTC (rev 14082)
+++ trunk/examples/photoalbum/source/ejb/src/main/java/org/richfaces/photoalbum/service/Constants.java 2009-05-08 16:41:10 UTC (rev 14083)
@@ -53,7 +53,8 @@
public static final String USER_DELETED_EVENT = "userDeletedEvent";
//Errors(Internationalization pending)
- public static final String SAME_ALBUM_EXIST_ERROR = "You already have album with given name.";
+ public static final String SAME_IMAGE_EXIST_ERROR = "You already have image with given name in selected album";
+ public static final String SAME_ALBUM_EXIST_ERROR = "You already have album with given name in selected shelf";
public static final String SAME_SHELF_EXIST_ERROR = "You already have shelf with given name.";
public static final String AVATAR_SAVING_ERROR = "Error while saving avatar to disk";
public static final String YOU_CAN_T_ADD_IMAGES_TO_THAT_ALBUM_ERROR = "You can't add images to that album";
15 years
JBoss Rich Faces SVN: r14082 - in trunk/ui/pickList/src/main/java/org/richfaces: renderkit and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-05-08 12:04:43 -0400 (Fri, 08 May 2009)
New Revision: 14082
Modified:
trunk/ui/pickList/src/main/java/org/richfaces/component/UIPickList.java
trunk/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java
Log:
https://jira.jboss.org/jira/browse/RF-7034
Modified: trunk/ui/pickList/src/main/java/org/richfaces/component/UIPickList.java
===================================================================
--- trunk/ui/pickList/src/main/java/org/richfaces/component/UIPickList.java 2009-05-08 15:04:49 UTC (rev 14081)
+++ trunk/ui/pickList/src/main/java/org/richfaces/component/UIPickList.java 2009-05-08 16:04:43 UTC (rev 14082)
@@ -64,7 +64,6 @@
}
-
@Override
public Converter getConverter() {
@@ -86,20 +85,6 @@
return null;
}
- private static final Converter noOpConverter = new Converter() {
-
- public Object getAsObject(FacesContext context, UIComponent component,
- String value) {
- return value;
- }
-
- public String getAsString(FacesContext context, UIComponent component,
- Object value) {
- return value != null ? value.toString() : "";
- }
-
- };
-
public Converter getConverterForValue(FacesContext context) {
Converter converter = null;
ValueExpression expression = this.getValueExpression("value");
@@ -108,11 +93,8 @@
Class<?> containerClass = ELUtils.getContainerClass(context, expression);
converter = getConverterForType(context, containerClass);
- if (converter == null && String.class.equals(containerClass)) {
- converter = noOpConverter;
- }
}
-
+
return converter;
}
Modified: trunk/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java
===================================================================
--- trunk/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java 2009-05-08 15:04:49 UTC (rev 14081)
+++ trunk/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java 2009-05-08 16:04:43 UTC (rev 14082)
@@ -192,22 +192,20 @@
}
String hiddenClientId = picklist.getClientId(context) + HIDDEN_SUFFIX;
- Map <String, String[]> paramValuesMap = context.getExternalContext().getRequestParameterValuesMap();
+ Map <String, String> paramMap = context.getExternalContext().getRequestParameterMap();
if (picklist.isDisabled()) {
return;
}
- if (paramValuesMap.containsKey(hiddenClientId)) {
-
- String[] valuesInline = (String[]) paramValuesMap.get(hiddenClientId);
-
- if (valuesInline[0].trim().equals("")) {
+ String value = paramMap.get(hiddenClientId);
+ if (value != null) {
+ if (value.trim().equals("")) {
((EditableValueHolder) picklist).setSubmittedValue(new String[] {});
} else {
- String[] reqValues = valuesInline[0].split(",");
+ String[] reqValues = value.split(",");
((EditableValueHolder) picklist).setSubmittedValue(reqValues);
}
@@ -391,12 +389,14 @@
Converter converter = pickList.getConverter();
List <String> lookupList = new ArrayList<String>();
+ List <Object> values = getValuesList(pickList);
- if(converter != null) {
- List <Object> values = getValuesList(pickList);
- for(Object value: values) {
- lookupList.add(converter.getAsString(context, pickList, value));
- }
+ for (Object value: values) {
+ if(converter != null) {
+ lookupList.add(converter.getAsString(context, pickList, value));
+ } else {
+ lookupList.add(value != null ? value.toString() : "");
+ }
}
encodeHiddenField(context, pickList, lookupList);
15 years
JBoss Rich Faces SVN: r14081 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2009-05-08 11:04:49 -0400 (Fri, 08 May 2009)
New Revision: 14081
Modified:
trunk/docs/userguide/en/src/main/docbook/included/inplaceInput.xml
Log:
RF-6810: editing and verifying a listing.
Modified: trunk/docs/userguide/en/src/main/docbook/included/inplaceInput.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/inplaceInput.xml 2009-05-08 14:34:09 UTC (rev 14080)
+++ trunk/docs/userguide/en/src/main/docbook/included/inplaceInput.xml 2009-05-08 15:04:49 UTC (rev 14081)
@@ -303,8 +303,8 @@
<programlisting role="XML"><![CDATA[...
<rich:inplaceInput defaultLabel="Click here to edit" showControls="true" controlsHorizontalPosition="left" controlsVerticalPosition="bottom" id="inplaceInput">
<f:facet name="controls">
- <button onclick="#{rich:component('inplaceInput')}.save();" type="button">Save</button>
- <button onclick="#{rich:component('inplaceInput')}.cancel();" type="button">Cancel</button>
+ <h:commandButton value="Save" onclick="#{rich:component('inplaceInput')}.save();" type="button" />
+ <h:commandButton value="Cancel" onclick="#{rich:component('inplaceInput')}.cancel();" type="button" />
</f:facet>
</rich:inplaceInput>
...]]> </programlisting>
15 years
JBoss Rich Faces SVN: r14080 - in trunk/docs/realworld_app_guide/en/src/main/docbook: includes and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2009-05-08 10:34:09 -0400 (Fri, 08 May 2009)
New Revision: 14080
Added:
trunk/docs/realworld_app_guide/en/src/main/docbook/includes/a4j_status.xml
Removed:
trunk/docs/realworld_app_guide/en/src/main/docbook/includes/datascroller.xml
Modified:
trunk/docs/realworld_app_guide/en/src/main/docbook/includes/albumView.xml
trunk/docs/realworld_app_guide/en/src/main/docbook/includes/button.xml
trunk/docs/realworld_app_guide/en/src/main/docbook/master.xml
Log:
added new chapters
https://jira.jboss.org/jira/browse/RF-5768
Added: trunk/docs/realworld_app_guide/en/src/main/docbook/includes/a4j_status.xml
===================================================================
--- trunk/docs/realworld_app_guide/en/src/main/docbook/includes/a4j_status.xml (rev 0)
+++ trunk/docs/realworld_app_guide/en/src/main/docbook/includes/a4j_status.xml 2009-05-08 14:34:09 UTC (rev 14080)
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<section id="a4j_status">
+ <title>The <emphasis role="bold"><property><a4j:status></property></emphasis> component</title>
+ <para>
+
+ <emphasis role="bold"><property><a4j:status></property></emphasis>
+ is a component, designed to create some visual effect during Ajax request. The comportment is usually attached to a certain request, which implies time consuming processing, so that the end user is aware the page is not hung up,
+ it's responding to her actions: the user sees the processing progress (the component is frequently used to indicate file uploading process).
+ </para>
+ <para>
+ However, in the Photo Album application the <emphasis role="bold"><property><a4j:status></property></emphasis> component is triggered on any Ajax request: to demonstrate the component itself and partially to display for the user that on every click on a link or a button something is happening, as all actions in the application occur on a single page which is not typical for usual web-workflow, when on each action the user navigates to a new page.
+ </para>
+ <para>
+
+ By default, <emphasis role="bold"><property><a4j:status></property></emphasis> works for each Ajax components inside the local region. This means if you have no region defined on the page (the whole view is a region) and have only one <emphasis role="bold"><property><a4j:status></property></emphasis> on the page, the <emphasis role="bold"><property><a4j:status></property></emphasis> will be activated during Ajax request by any of the Ajax component located on the page.
+ </para>
+ <para>
+ As there are no regions defined explicitly in the application, <emphasis role="bold"><property><a4j:status></property></emphasis> is located in the main template (template.xhtml) for all pages:
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ ...
+ <body class="main-body">
+ ...
+ <ui:include src="/includes/index/status.xhtml" />
+ </body>
+</html>
+
+...]]></programlisting>
+ <para>
+ Hence the default behavior of the component meets that application's requirements: the component is shown on every single Ajax request.
+ </para>
+ <para>
+ This is the page with the <emphasis role="bold"><property><a4j:status></property></emphasis> component:
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:richx="http://richfaces.org/richx">
+ <a4j:status layout="block" stopStyle="display: none;"
+ startStyle="height: 52px; width: 79px; position: absolute; top: 0px; left: 278px;">
+ <f:facet name="start">
+ <h:panelGroup>
+ <h:graphicImage style="position: absolute; top: 0px; left: 0px;"
+ height="79" width="52" alt="" value="/img/shell/ai.png" />
+ <h:graphicImage style="position: absolute; top: 26px; left: 13px;"
+ height="26" width="26" alt="" value="/img/shell/ai.gif" />
+ </h:panelGroup>
+ </f:facet>
+ </a4j:status>
+</ui:composition>
+...]]></programlisting>
+ <para>
+ The <code>startStyle="height: 52px; width: 79px; position: absolute; top: 0px; left: 278px;"</code>, attribute specifies what is displayed on the page after the request initiation, which means in our case that it is positioned absolutely: 278 pixels from the left border of the page and 0 pixels from the top, its width is 79px and the height is 52px.
+ </para>
+
+ <para>
+ The <code>stopStyle="display: none;"</code> attribute is responsible for displaying the component on the page when the request is finished, in our case the it will be hidden.
+
+ </para>
+ <para>
+ As we need to show only the beginning of the request, we customize only the <code><f:facet name="start"></code> which is just an image(you can insert any image you like).
+ </para>
+ <para>
+
+ If you would like to get more details about the <emphasis role="bold"><property><a4j:status></property></emphasis> please visit <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/status.jsf?c=status">Live Demo</ulink> web page and <ulink url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/...">RichFaces Developer Guide</ulink>.
+ </para>
+</section>
Modified: trunk/docs/realworld_app_guide/en/src/main/docbook/includes/albumView.xml
===================================================================
--- trunk/docs/realworld_app_guide/en/src/main/docbook/includes/albumView.xml 2009-05-08 13:31:51 UTC (rev 14079)
+++ trunk/docs/realworld_app_guide/en/src/main/docbook/includes/albumView.xml 2009-05-08 14:34:09 UTC (rev 14080)
@@ -161,27 +161,168 @@
<section id="imagesScroller">
<title>Images Scroller</title>
- <para>
- Work in progress...
- </para>
+ <para>
+ The Images Scroller implementation in the Photo Album application is basically <emphasis role="bold"><property><a4j:repeat></property></emphasis> with the value attribute bound to <code>#{model.selectedAlbum.images}</code>, which is a collection of images of the selected album and the <emphasis role="bold"><property><rich:dataScroller>></property></emphasis> component tied to the <emphasis role="bold"><property><a4j:repeat></property></emphasis> .
+ </para>
+
+ <para>
+ The source code you can find in the includes/images/imageScroller.xhtml file.
+ Now let's go deeper into the details. The main component here is <emphasis role="bold"><property><a4j:repeat></property></emphasis>:
+
+ </para>
+
+ <programlisting role="XML"><![CDATA[...
+<a4j:repeat value="#{model.selectedAlbum.images}" rows="5"
+ var="img" id="repeat" rowKeyVar="rk">
+
+ <a4j:outputPanel layout="block"
+ styleClass="preview_box_photo_nav #{model.selectedImage == img ? 'preview_box_photo_current' : 'preview_box_photo_default'}">
+ <h:panelGroup layout="block" styleClass="preview_box_photo_80">
+ <h:graphicImage styleClass="pr_photo_bg"
+ value="/img/shell/frame_photo_80.png" />
+ <h:panelGrid cellpadding="0" cellspacing="2">
+ <h:panelGroup layout="block">
+ <a4j:mediaOutput element="img"
+ createContent="#{imageLoader.paintImage}"
+ value="#{fileManager.transformPath(img.fullPath, '_small80')}">
+ </a4j:mediaOutput>
+ <br />
+ </h:panelGroup>
+ </h:panelGrid>
+ <h:panelGroup layout="block" styleClass="photo_name">
+ <h:outputText value="#{img.name}" />
+ </h:panelGroup>
+ <h:panelGroup layout="block" styleClass="photo_data">
+ <h:outputText value="#{rk + 1}" />
+ </h:panelGroup>
+ </h:panelGroup>
+
+ <a4j:support event="onclick" rendered="#{model.selectedImage != img}"
+ reRender="mainArea,treePanel, imagesTable" action="#{controller.showImage(img)}" />
+ </a4j:outputPanel>
+</a4j:repeat>
+...]]></programlisting>
+
+ <para>
+ Each element of the
+
+ <emphasis role="bold"><property><a4j:repeat></property></emphasis> has a corresponding <emphasis role="bold"><property><a4j:outputPanel></property></emphasis> with the <emphasis role="bold"><property><a4j:mediaOutput></property></emphasis> as a nested element. <emphasis role="bold"><property><a4j:mediaOutput></property></emphasis> renders the thumbnail of the image. As the rows attribute is set to "5" (<code>rows="5"</code>), only 5 images are displayed on the page at a time.
+
+ </para>
+
+ <para>
+ As you've noticed, the currently selected image in the images scroller has different style, namely: a red frame around thumbnail, which is implemented with this code:
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<a4j:outputPanel layout="block"
+styleClass="preview_box_photo_nav #{model.selectedImage == img ? 'preview_box_photo_current' : 'preview_box_photo_default'}">
+...]]></programlisting>
+ <para>
+ As you can see from the code snippet,
+ identification of whether the currently selected image is the same image displayed by the <emphasis role="bold"><property><a4j:repeat></property></emphasis> is performed in the styleClass, if it returns "true", different style is applied.
+ </para>
+ <para>
+ Each <emphasis role="bold"><property><a4j:repeat></property></emphasis> has a corresponding <emphasis role="bold"><property><a4j:support></property></emphasis> configured like this:
+ </para>
+ <programlisting role="XML"><![CDATA[...
+ <a4j:support event="onclick"
+ rendered="#{model.selectedImage != img}"
+ reRender="mainArea,treePanel, imagesTable"
+ action="#{controller.showImage(img)}" />
+
+...]]></programlisting>
+
+ <para>
+ On every click <emphasis role="bold"><property><a4j:support></property></emphasis> calls <code> #{controller.showImage(img)}</code> method that sets the current image, thumbnail of which has just been clicked on. For more details please see Controller.java class.
+ </para>
+
+ <para>
+ To implement thumbnails scrolling effect the <emphasis role="bold"><property><rich:datascroller></property></emphasis> is attached to the <emphasis role="bold"><property><a4j:repeat></property></emphasis>:
+ </para>
+
+ <programlisting role="XML"><![CDATA[...
+<rich:datascroller page="#{controller.getPage()}"
+ styleClass="image-scroller" lastPageMode="full" for="repeat" reRender="imagesTable"
+ boundaryControls="hide" stepControls="hide">
+ <f:facet name="pages">
+ <h:outputText />
+ </f:facet>
+ <f:facet name="fastforward">
+ <h:graphicImage styleClass="image-scroller-right-arrow"
+ value="img/shell/arr_right.png" />
+ </f:facet>
+ <f:facet name="fastforward_disabled">
+ <h:graphicImage styleClass="image-scroller-right-arrow"
+ value="img/shell/arr_right_dis.png" />
+ </f:facet>
+ <f:facet name="fastrewind">
+ <h:graphicImage styleClass="image-scroller-left-arrow"
+ value="img/shell/arr_left.png" />
+ </f:facet>
+ <f:facet name="fastrewind_disabled">
+ <h:graphicImage styleClass="image-scroller-left-arrow"
+ value="img/shell/arr_left_dis.png" />
+ </f:facet>
+</rich:datascroller>
+
+...]]></programlisting>
+ <para>
+ The page attribute identifies which page should be displayed right now. For instance, if you have only 20 images and the current image has the 12<superscript>th</superscript> index in the collection, then the 3<superscript>rd</superscript> page will be displayed:
+
+ </para>
+ <programlisting role="XML"><![CDATA[...
+public Integer getPage(){
+ final Integer index = model.getSelectedAlbum().getIndex(model.getSelectedImage());
+ return index / 5 + 1;
+ }
+
+...]]></programlisting>
+
+ <para>
+ The <code>lastPageMode="full" </code> attribute ensures that 5 thumbnails are always shown on the page. If this attribute hadn't been configured like this, in case the 19th thumbnail out of 20 had been selected then only 2 last thumbnails would have been displayed.
+ </para>
+
+ <para>
+ As you can see, <emphasis role="bold"><property><rich:dataScroller></property></emphasis> has a slightly different look-and-feel, the trick is in the redefinition of <property>fastforward</property>, <property>fastforward_disabled</property>, <property>fastrewind</property> and <property>fastrewind_disabled</property> facets on which places we display our images. We didn't redefine other facets because they are not rendered to the page which is achieved with <code>boundaryControls="hide"</code> and <code>stepControls="hide</code> attributes of <emphasis role="bold"><property><rich:dataSroller></property></emphasis>.
+ </para>
+ <para>
+ To get more details about the <emphasis role="bold"><property><a4j:repeat></property></emphasis> and <emphasis role="bold"><property><rich:dataScroller></property></emphasis> components please visit <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/dataTableScroller.js">Live Demo</ulink> web page and <ulink url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/..." >RichFaces Developer Guide</ulink>
+
+ </para>
</section>
<section id="slideshow">
<title>Slideshow</title>
- <para>The slide-show feature in the Photo Album Demo can be enabled by clicking "Start Slideshow" link from two different places in the application:
+ <para>The slideshow feature in the Photo Album Demo can be enabled by clicking on <emphasis role="bold">"Start Slideshow"</emphasis> link from two different places in the application:
1) from user's album preview (<code>/web/src/main/webapp/image/albumInfo.xhtml</code>) and 2) from a particular photo preview (<code>src/main/webapp/image/imageInfo.xhtml</code>).
Both of two mentioned XHTML files include slideshow with the help of Facelets <<emphasis role="bold"><property>ui:include</property></emphasis> tag
(for more information about <<emphasis role="bold"><property>ui:include</property></emphasis> see Facelets Reference Guide —
<ulink url="http://www.jsftoolbox.com/documentation/facelets/01-Introduction/index.jsf">http://www.jsftoolbox.com/documentation/facelets/01-Introduction/index.jsf</ulink>).
</para>
-
<para>
- The <code>startSlideshow()</code> method of <code>SlideshowManager.java</code> has two implementations.
- The first implementation is designed to activate the slide-show from an album preview (<code>/image/albumInfo.xhtml</code>) when no photo is selected in the current image list.
- The method iterates over all photos of a particular album starting from the first one in the list. Look at the <code>SlideshowManager.java</code> listing below:
+ The components that implement the slideshow functionality are:
</para>
- <programlisting role="JAVA"><![CDATA[...
+ <itemizedlist>
+ <listitem><para><emphasis role="bold"><property><rich:modalPanelgt;</property></emphasis> located in <code>web/src/main/webapp/includes/image/slideshow.xhtml</code> that is hidden by default as the attribute <code>showWhenRendered="#{slideshow.active}"</code> and the active property of SlideshowManager.java is set to "false" by default.</para></listitem>
+ <listitem><para><emphasis role="bold"><property><a4j:poll></property></emphasis> located in <code>includes/misc/slideShowPooler.xhtml</code> which is also inactive due to the mentioned active property ( <code>active=#{slideshow.active}</code>)</para></listitem>
+ </itemizedlist>
+
+ <para>
+
+ After activation, <emphasis role="bold"><property><a4j:poll></property></emphasis> will send asynchronous requests to the server with some certain interval, as the result of these requests modal panel will display the next image in the row.
+ </para>
+
+<para>
+ Now let's have a look at the details of the slideshow implementation.
+</para>
+
+ <para>
+ The <code>startSlideshow()</code> method of <code>SlideshowManager.java</code> is invoked when no photo is selected in the current image list. The method iterates over all photos of a particular album starting from the first one in the list. Look at the <code>SlideshowManager.java</code> listing below:
+ </para>
+
+<programlisting role="JAVA"><![CDATA[...
+ ...
public void startSlideshow(){
active = true;
this.slideshowIndex = 0;
@@ -193,14 +334,13 @@
this.selectedImage = model.getImages().get(this.slideshowIndex);
this.selectedImage.getAlbum().visitImage(selectedImage, true);
}
-...]]></programlisting>
-
- <para>
- The second implementation of the <code>startSlideshow()</code> method is activated when a link to slide-show is clicked from a particular photo preview.
- This method iterates over the rest of photos starting from the current selected one:
- </para>
- <programlisting role="JAVA"><![CDATA[...
-public void startSlideshow(Image selectedImage){
+...]]></programlisting>
+ <para>
+ The second variation of the <code>startSlideshow()</code> method is activated when a link to slide-show is clicked from a particular photo preview. This method iterates over the rest of photos starting from the current selected one:
+
+ </para>
+ <programlisting role="JAVA"><![CDATA[...
+ public void startSlideshow(Image selectedImage){
active = true;
if(model.getImages() == null || model.getImages().size() < 1){
stopSlideshow();
@@ -211,69 +351,72 @@
this.selectedImage = selectedImage;
this.selectedImage.getAlbum().visitImage(selectedImage, true);
}
-...]]></programlisting>
+...]]></programlisting>
<para>
- Both implementations of <code>startSlideshow()</code> method set active property to true.
- This <code>true</code> makes two important slide-show parts (slide-show modal panel and slide-show poller) render.
+ Both variants of <code>startSlideshow()</code> method set the <code>active</code> property to "true" as a result the poller is activated and modal panel becomes visible.
+
</para>
- <para>
- The slide-show modal panel is kept in the <code>web/src/main/webapp/includes/image/slideshow.xhtml</code> file and referred from the corresponding pages with the help of <emphasis role="bold"><property><ui:include></property></emphasis> Facelets tag:
- </para>
-
- <programlisting role="XML"><![CDATA[...
+ <para>
+ The slideshow modal panel is kept in the <code>web/src/main/webapp/includes/image/slideshow.xhtml</code> file and referred from the corresponding pages with the help of <ui:include> Facelets tag:
+ </para>
+ <programlisting role="XML"><![CDATA[...
<ui:include src="/includes/image/slideshow.xhtml"/>
-...]]></programlisting>
-
- <para>
- Have a look at <code>web/src/main/webapp/includes/image/slideshow.xhtml</code> file:
- </para>
-
- <programlisting role="XML"><![CDATA[...
+...]]></programlisting>
+ <para>
+ Have a look at <code>web/src/main/webapp/includes/image/slideshow.xhtml</code> file:
+ </para>
+ <programlisting role="XML"><![CDATA[...
<ui:composition xmlns="http://www.w3.org/1999/xhtml"...>
+
<rich:modalPanel showWhenRendered="#{slideshow.active}"
+
domElementAttachment="parent"
+
id="slideShowModalPanel"
+
width="650"
+
onshow="showPictureEffect();"
+
height="650">
+
<f:facet name="controls">
+
<h:panelGroup>
+
<h:graphicImage value="/img/modal/close.png" style="cursor:pointer" id="hidelink">
+
<a4j:support event="onclick" actionListener="#{slideshow.stopSlideshow}" reRender="slideShowForm, mainArea, tree" />
+
</h:graphicImage>
+
</h:panelGroup>
+
</f:facet>
+
...
+
</rich:modalPanel>
+
</ui:composition>
-...]]></programlisting>
-
- <para>
- The modal panel is always rendered on the page in a hidden state.
- Activating the slide-show renders the main area, so the slide-show modal panel appears in the closest to an observer layer.
- </para>
- <programlisting role="XML"><![CDATA[...
-<a4j:commandLink styleClass="slideshow-link"
- actionListener="#{slideshow.startSlideshow()}"
- reRender="slideShowForm, mainArea">
- ...
-</a4j:commandLink>
-...]]></programlisting>
- <para>
- Slide-show poller is enabled if the slide-show is activated:
- </para>
- <programlisting role="XML"><![CDATA[...
+...]]></programlisting>
+ <para>
+
+ This is the source code of <code>includes/misc/slideShowPooler.xhtml</code>:
+ </para>
+
+ <programlisting role="XML"><![CDATA[...
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:s="http://jboss.com/products/seam/taglib"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:rich="http://richfaces.org/rich"
- xmlns:a4j="http://richfaces.org/a4j"
- xmlns:richx="http://richfaces.org/richx">
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:richx="http://richfaces.org/richx">
<a4j:form id="slideShowForm">
<a4j:poll reRender="slideshowImage"
actionListener="#{slideshow.showNextImage()}"
@@ -283,67 +426,41 @@
oncomplete="showPictureEffect();"/>
</a4j:form>
</ui:composition>
-...]]></programlisting>
- <para>
- The slide-show poller sends the request for the next image (<code>showNextImage()</code> method) each four seconds.
- The interval is defined in the interval property of the <code>SlideshowManager.java</code> and refers to a <code>INITIAL.DELAY</code> constant (<code>constants.java</code>).
- When the <emphasis role="bold"><property><a4j:poll></property></emphasis> component receives a new image it renders the slideShowImage area (<code>/web/src/main/webapp/image/slideshow.xhtml</code>):
- </para>
- <programlisting role="XML"><![CDATA[...
-<h:panelGroup id="slideshowImage">
- <a4j:mediaOutput id="imgSlideShow"
- element="img"
- styleClass="main-image"
- createContent="#{imageLoader.paintImage}"
- style="opacity: 0.1"
- value="#{slideshow.selectedImage != null? fileManager.transformPath(slideshow.selectedImage.path, '_medium'):null}">
- <rich:toolTip followMouse="true"
- direction="top-right"
- showDelay="500"
- styleClass="tooltip">
- <span style="white-space: nowrap"> #{slideshow.selectedImage.description} </span>
- </rich:toolTip>
- </a4j:mediaOutput>
-</h:panelGroup>
-...]]></programlisting>
-
- <para>
- The <emphasis role="bold"><property>a4j:mediaOtuput</property></emphasis> component has a value attribute that takes a path to photos as a value and renders photos with the help of a <emphasis><property>createContent</property></emphasis> attribute. The showNextImage works cyclically.
- </para>
-
- <para>
- There is <emphasis role="bold"><property>rich:effect</property></emphasis> that makes rendering process look more effective (<code>web/src/main/webapp/includes/image/slideshow.xhtml</code>):
- </para>
- <programlisting role="XML"><![CDATA[...
-<rich:effect name="hidePictureEffect" type="Opacity" params="duration:0.4, from:1.0, to:0.0" for="imgSlideShow" />
-<rich:effect name="showPictureEffect" type="Opacity" params="duration:0.4, from:0.1, to:1.0" for="imgSlideShow" />
-...]]></programlisting>
-
- <para>
- The described above example implements a modal panel with photos that change each other in the order they are stored in an album.
- </para>
- <figure>
- <title>Slide show</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/slide_show.png"/>
- </imageobject>
- </mediaobject>
- </figure>
-
- <para>
- To quit the slide-show user clicks "Close window" button on the slide-show panel and <code>stopSlideshow()</code> method is activated.
- </para>
- <programlisting role="JAVA"><![CDATA[...
+...]]></programlisting>
+
+ <para>
+ The slideshow poller sends the request for the next image (<code>showNextImage()</code> method) each four seconds.
+ The interval is defined in the interval property of the <code>SlideshowManager.java</code> and refers to a <code>INITIAL.DELAY</code> constant (<code>constants.java</code>).
+ </para>
+ <para>
+ The described above example implements a modal panel with photos that rotate them in the order they are stored in an album.
+ </para>
+ <figure>
+ <title>Image size control</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/slide_show.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>
+ To stop the slide-show user clicks <emphasis role="bold">Close window</emphasis> button on the slide-show panel and <code>stopSlideshow()</code> method is invoked.
+ </para>
+<programlisting role="XML"><![CDATA[...
@Observer("stopSlideshow")
public void stopSlideshow(){
active = false;
this.selectedImage = null;
this.slideshowIndex = 0;
}
-...]]></programlisting>
-
+ ...]]></programlisting>
+
<para>
+ The <code>active</code> field is set to "false" again, consequently the poller becomes inactive and the modal panel becomes invisible too.
+ </para>
+ </section>
+ <para>
Vizit following pages at RichFaces Live Demo for more information, examples and sources on the components used in the application and described in this chapter:
</para>
@@ -392,4 +509,3 @@
</itemizedlist>
</section>
-</section>
Modified: trunk/docs/realworld_app_guide/en/src/main/docbook/includes/button.xml
===================================================================
--- trunk/docs/realworld_app_guide/en/src/main/docbook/includes/button.xml 2009-05-08 13:31:51 UTC (rev 14079)
+++ trunk/docs/realworld_app_guide/en/src/main/docbook/includes/button.xml 2009-05-08 14:34:09 UTC (rev 14080)
@@ -11,156 +11,33 @@
</para>
<programlisting role="XML"><![CDATA[...
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:s="http://jboss.com/products/seam/taglib" xmlns:c="http://java.sun.com/jstl/core"
- xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich"
- xmlns:a4j="http://richfaces.org/a4j" xmlns:richx="http://richfaces.org/richx">
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:c="http://java.sun.com/jstl/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:richx="http://richfaces.org/richx">
<a4j:loadScript src="/scripts/buttons.js" />
<richx:actionMapper>
- <a4j:outputPanel layout="block" style="#{style}"
- styleClass="photoalbumButton #{styleClass}" lang="#{lang}" dir="#{dir}"
- title="#{title}" rendered="#{empty rendered or rendered}"
- onmousedown="RF_RW_DEMO.toPressed(this)" onmouseup="RF_RW_DEMO.toReleased(this)"
- onmouseout="RF_RW_DEMO.toReleased(this)">
-
- <h:graphicImage value="/img/shell/button.png" alt="" />
- <h:graphicImage value="/img/shell/button_press.png"
- style="display: none;" alt="" />
-
- <div>#{value}</div>
-
- <a4j:commandButton accesskey="#{accesskey}"
- ajaxSingle="#{ajaxSingle}" alt="#{alt}" type="image" image="/img/shell/spacer.gif"
- actionListener="#{mappedActionListener}" action="#{mappedAction}"
- bypassUpdates="#{bypassUpdates}" data="#{data}" disabled="#{disabled}"
- eventsQueue="#{eventsQueue}" focus="#{focus}" ignoreDupResponses="#{ignoreDupResponses}"
- immediate="#{immediate}" limitToList="#{limitToList}"
- onbeforedomupdate="#{onbeforedomupdate}" timeout="#{timeout}"
- tabindex="#{tabindex}" status="#{status}" similarityGroupingId="#{similarityGroupingId}"
- reRender="#{reRender}" requestDelay="#{requestDelay}" process="#{process}"
- oncomplete="#{oncomplete}" onblur="#{onblur}" onclick="#{onclick}"
- ondblclick="#{ondblclick}" onfocus="#{onfocus}" onkeydown="#{onkeydown}"
- onkeypress="#{onkeypress}" onkeyup="#{onkeyup}" onmousedown="#{onmousedown}"
- onmousemove="#{onmousemove}" onmouseout="#{onmouseout}" onmouseover="#{onmouseover}"
- onmouseup="#{onmouseup}" />
-
+ <a4j:outputPanel layout="block" style="#{style}" styleClass="photoalbumButton #{styleClass}" lang="#{lang}" dir="#{dir}" title="#{title}"
+ rendered="#{empty rendered or rendered}"
+ onmousedown="RF_RW_DEMO.toPressed(this)" onmouseup="RF_RW_DEMO.toReleased(this)" onmouseout="RF_RW_DEMO.toReleased(this)">
+ <h:graphicImage value="/img/shell/button.png" alt="" />
+ <h:graphicImage value="/img/shell/button_press.png" style="display: none;" alt="" />
+ <div>#{value}</div>
+ <a4j:commandButton accesskey="#{accesskey}" ajaxSingle="#{ajaxSingle}" alt="#{alt}" type="image" image="/img/shell/spacer.gif"
+ actionListener="#{mappedActionListener}" action="#{mappedAction}" bypassUpdates="#{bypassUpdates}" data="#{data}" disabled="#{disabled}"
+ eventsQueue="#{eventsQueue}" focus="#{focus}" ignoreDupResponses="#{ignoreDupResponses}" immediate="#{immediate}" limitToList="#{limitToList}"
+ onbeforedomupdate="#{onbeforedomupdate}" timeout="#{timeout}" tabindex="#{tabindex}" status="#{status}" similarityGroupingId="#{similarityGroupingId}"
+ reRender="#{reRender}" requestDelay="#{requestDelay}" process="#{process}" oncomplete="#{oncomplete}"
+ onblur="#{onblur}" onclick="#{onclick}" ondblclick="#{ondblclick}" onfocus="#{onfocus}" onkeydown="#{onkeydown}" onkeypress="#{onkeypress}" onkeyup="#{onkeyup}"
+ onmousedown="#{onmousedown}" onmousemove="#{onmousemove}" onmouseout="#{onmouseout}" onmouseover="#{onmouseover}" onmouseup="#{onmouseup}" />
</a4j:outputPanel>
</richx:actionMapper>
-
</ui:composition>
-<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:s="http://jboss.com/products/seam/taglib" xmlns:c="http://java.sun.com/jstl/core"
- xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich"
- xmlns:a4j="http://richfaces.org/a4j" xmlns:richx="http://richfaces.org/richx">
- <a4j:loadScript src="/scripts/buttons.js" />
- <richx:actionMapper>
- <a4j:outputPanel layout="block" style="#{style}"
- styleClass="photoalbumButton #{styleClass}" lang="#{lang}" dir="#{dir}"
- title="#{title}" rendered="#{empty rendered or rendered}"
- onmousedown="RF_RW_DEMO.toPressed(this)" onmouseup="RF_RW_DEMO.toReleased(this)"
- onmouseout="RF_RW_DEMO.toReleased(this)">
- <h:graphicImage value="/img/shell/button.png" alt="" />
- <h:graphicImage value="/img/shell/button_press.png"
- style="display: none;" alt="" />
-
- <div>#{value}</div>
-
- <a4j:commandButton accesskey="#{accesskey}"
- ajaxSingle="#{ajaxSingle}" alt="#{alt}" type="image" image="/img/shell/spacer.gif"
- actionListener="#{mappedActionListener}" action="#{mappedAction}"
- bypassUpdates="#{bypassUpdates}" data="#{data}" disabled="#{disabled}"
- eventsQueue="#{eventsQueue}" focus="#{focus}" ignoreDupResponses="#{ignoreDupResponses}"
- immediate="#{immediate}" limitToList="#{limitToList}"
- onbeforedomupdate="#{onbeforedomupdate}" timeout="#{timeout}"
- tabindex="#{tabindex}" status="#{status}" similarityGroupingId="#{similarityGroupingId}"
- reRender="#{reRender}" requestDelay="#{requestDelay}" process="#{process}"
- oncomplete="#{oncomplete}" onblur="#{onblur}" onclick="#{onclick}"
- ondblclick="#{ondblclick}" onfocus="#{onfocus}" onkeydown="#{onkeydown}"
- onkeypress="#{onkeypress}" onkeyup="#{onkeyup}" onmousedown="#{onmousedown}"
- onmousemove="#{onmousemove}" onmouseout="#{onmouseout}" onmouseover="#{onmouseover}"
- onmouseup="#{onmouseup}" />
-
- </a4j:outputPanel>
- </richx:actionMapper>
-
-</ui:composition><ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:s="http://jboss.com/products/seam/taglib" xmlns:c="http://java.sun.com/jstl/core"
- xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich"
- xmlns:a4j="http://richfaces.org/a4j" xmlns:richx="http://richfaces.org/richx">
- <a4j:loadScript src="/scripts/buttons.js" />
- <richx:actionMapper>
- <a4j:outputPanel layout="block" style="#{style}"
- styleClass="photoalbumButton #{styleClass}" lang="#{lang}" dir="#{dir}"
- title="#{title}" rendered="#{empty rendered or rendered}"
- onmousedown="RF_RW_DEMO.toPressed(this)" onmouseup="RF_RW_DEMO.toReleased(this)"
- onmouseout="RF_RW_DEMO.toReleased(this)">
-
- <h:graphicImage value="/img/shell/button.png" alt="" />
- <h:graphicImage value="/img/shell/button_press.png"
- style="display: none;" alt="" />
-
- <div>#{value}</div>
-
- <a4j:commandButton accesskey="#{accesskey}"
- ajaxSingle="#{ajaxSingle}" alt="#{alt}" type="image" image="/img/shell/spacer.gif"
- actionListener="#{mappedActionListener}" action="#{mappedAction}"
- bypassUpdates="#{bypassUpdates}" data="#{data}" disabled="#{disabled}"
- eventsQueue="#{eventsQueue}" focus="#{focus}" ignoreDupResponses="#{ignoreDupResponses}"
- immediate="#{immediate}" limitToList="#{limitToList}"
- onbeforedomupdate="#{onbeforedomupdate}" timeout="#{timeout}"
- tabindex="#{tabindex}" status="#{status}" similarityGroupingId="#{similarityGroupingId}"
- reRender="#{reRender}" requestDelay="#{requestDelay}" process="#{process}"
- oncomplete="#{oncomplete}" onblur="#{onblur}" onclick="#{onclick}"
- ondblclick="#{ondblclick}" onfocus="#{onfocus}" onkeydown="#{onkeydown}"
- onkeypress="#{onkeypress}" onkeyup="#{onkeyup}" onmousedown="#{onmousedown}"
- onmousemove="#{onmousemove}" onmouseout="#{onmouseout}" onmouseover="#{onmouseover}"
- onmouseup="#{onmouseup}" />
-
- </a4j:outputPanel>
- </richx:actionMapper>
-
-</ui:composition>
-<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:s="http://jboss.com/products/seam/taglib" xmlns:c="http://java.sun.com/jstl/core"
- xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich"
- xmlns:a4j="http://richfaces.org/a4j" xmlns:richx="http://richfaces.org/richx">
- <a4j:loadScript src="/scripts/buttons.js" />
- <richx:actionMapper>
- <a4j:outputPanel layout="block" style="#{style}"
- styleClass="photoalbumButton #{styleClass}" lang="#{lang}" dir="#{dir}"
- title="#{title}" rendered="#{empty rendered or rendered}"
- onmousedown="RF_RW_DEMO.toPressed(this)" onmouseup="RF_RW_DEMO.toReleased(this)"
- onmouseout="RF_RW_DEMO.toReleased(this)">
-
- <h:graphicImage value="/img/shell/button.png" alt="" />
- <h:graphicImage value="/img/shell/button_press.png"
- style="display: none;" alt="" />
-
- <div>#{value}</div>
-
- <a4j:commandButton accesskey="#{accesskey}"
- ajaxSingle="#{ajaxSingle}" alt="#{alt}" type="image" image="/img/shell/spacer.gif"
- actionListener="#{mappedActionListener}" action="#{mappedAction}"
- bypassUpdates="#{bypassUpdates}" data="#{data}" disabled="#{disabled}"
- eventsQueue="#{eventsQueue}" focus="#{focus}" ignoreDupResponses="#{ignoreDupResponses}"
- immediate="#{immediate}" limitToList="#{limitToList}"
- onbeforedomupdate="#{onbeforedomupdate}" timeout="#{timeout}"
- tabindex="#{tabindex}" status="#{status}" similarityGroupingId="#{similarityGroupingId}"
- reRender="#{reRender}" requestDelay="#{requestDelay}" process="#{process}"
- oncomplete="#{oncomplete}" onblur="#{onblur}" onclick="#{onclick}"
- ondblclick="#{ondblclick}" onfocus="#{onfocus}" onkeydown="#{onkeydown}"
- onkeypress="#{onkeypress}" onkeyup="#{onkeyup}" onmousedown="#{onmousedown}"
- onmousemove="#{onmousemove}" onmouseout="#{onmouseout}" onmouseover="#{onmouseover}"
- onmouseup="#{onmouseup}" />
-
- </a4j:outputPanel>
- </richx:actionMapper>
-
-</ui:composition>
...]]></programlisting>
<para>
The <emphasis role="bold"> <property><richx:actionMapper></property></emphasis>
Deleted: trunk/docs/realworld_app_guide/en/src/main/docbook/includes/datascroller.xml
===================================================================
--- trunk/docs/realworld_app_guide/en/src/main/docbook/includes/datascroller.xml 2009-05-08 13:31:51 UTC (rev 14079)
+++ trunk/docs/realworld_app_guide/en/src/main/docbook/includes/datascroller.xml 2009-05-08 14:34:09 UTC (rev 14080)
@@ -1,132 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<section id="CustomDataScroller">
- <title>Custom Data Scroller</title>
- <para>
- The custom data scroller implementation in the Photo Album application is basically <emphasis role="bold"><property><a4j:repeat></property></emphasis> with the value attribute bound to <code>#{model.selectedAlbum.images}</code>, which is a collection of images of the selected album and the <emphasis role="bold"><property><rich:dataScroller>></property></emphasis> component tied to the <emphasis role="bold"><property><a4j:repeat></property></emphasis> .
- </para>
-
- <para>
- The source code you can find in the includes/images/imageScroller.xhtml file.
- Now let's go deeper into the details. The main component here is <emphasis role="bold"><property><a4j:repeat></property></emphasis>:
-
- </para>
-
- <programlisting role="XML"><![CDATA[...
-<a4j:repeat value="#{model.selectedAlbum.images}" rows="5"
- var="img" id="repeat" rowKeyVar="rk">
-
- <a4j:outputPanel layout="block"
- styleClass="preview_box_photo_nav #{model.selectedImage == img ? 'preview_box_photo_current' : 'preview_box_photo_default'}">
- <h:panelGroup layout="block" styleClass="preview_box_photo_80">
- <h:graphicImage styleClass="pr_photo_bg"
- value="/img/shell/frame_photo_80.png" />
- <h:panelGrid cellpadding="0" cellspacing="2">
- <h:panelGroup layout="block">
- <a4j:mediaOutput element="img"
- createContent="#{imageLoader.paintImage}"
- value="#{fileManager.transformPath(img.fullPath, '_small80')}">
- </a4j:mediaOutput>
- <br />
- </h:panelGroup>
- </h:panelGrid>
- <h:panelGroup layout="block" styleClass="photo_name">
- <h:outputText value="#{img.name}" />
- </h:panelGroup>
- <h:panelGroup layout="block" styleClass="photo_data">
- <h:outputText value="#{rk + 1}" />
- </h:panelGroup>
- </h:panelGroup>
-
- <a4j:support event="onclick" rendered="#{model.selectedImage != img}"
- reRender="mainArea,treePanel, imagesTable" action="#{controller.showImage(img)}" />
- </a4j:outputPanel>
-</a4j:repeat>
-...]]></programlisting>
-
- <para>
- Each element of the
-
- <emphasis role="bold"><property><a4j:repeat></property></emphasis> has a corresponding <emphasis role="bold"><property><a4j:outputPanel></property></emphasis> with the <emphasis role="bold"><property><a4j:mediaOutput></property></emphasis> as a nested element. <emphasis role="bold"><property><a4j:mediaOutput></property></emphasis> renders the thumbnail of the image. As the rows attribute is set to "5" (<code>rows="5"</code>), only 5 images are displayed on the page at a time.
-
- </para>
-
- <para>
- As you've noticed, the currently selected image in the data scroller has different style, namely: a red frame around thumbnail, which is implemented with this code:
- </para>
- <programlisting role="XML"><![CDATA[...
-<a4j:outputPanel layout="block"
-styleClass="preview_box_photo_nav #{model.selectedImage == img ? 'preview_box_photo_current' : 'preview_box_photo_default'}">
-...]]></programlisting>
- <para>
- As you can see from the code snippet,
- identification of whether the currently selected image is the same image displayed by the <emphasis role="bold"><property><a4j:repeat></property></emphasis> is performed in the styleClass, if it returns "true", different style is applied.
- </para>
- <para>
- Each <emphasis role="bold"><property><a4j:repeat></property></emphasis> has a corresponding <emphasis role="bold"><property><a4j:support></property></emphasis> configured like this:
- </para>
- <programlisting role="XML"><![CDATA[...
- <a4j:support event="onclick"
- rendered="#{model.selectedImage != img}"
- reRender="mainArea,treePanel, imagesTable"
- action="#{controller.showImage(img)}" />
-
-...]]></programlisting>
-
- <para>
- On every click <emphasis role="bold"><property><a4j:support></property></emphasis> calls <code> #{controller.showImage(img)}</code> method that sets the current image, thumbnail of which has just been clicked on. For more details please see Controller.java class.
- </para>
-
- <para>
- To implement thumbnails scrolling effect the <emphasis role="bold"><property><rich:datascroller></property></emphasis> is attached to the <emphasis role="bold"><property><a4j:repeat></property></emphasis>:
- </para>
-
- <programlisting role="XML"><![CDATA[...
-<rich:datascroller page="#{controller.getPage()}"
- styleClass="image-scroller" lastPageMode="full" for="repeat" reRender="imagesTable"
- boundaryControls="hide" stepControls="hide">
- <f:facet name="pages">
- <h:outputText />
- </f:facet>
- <f:facet name="fastforward">
- <h:graphicImage styleClass="image-scroller-right-arrow"
- value="img/shell/arr_right.png" />
- </f:facet>
- <f:facet name="fastforward_disabled">
- <h:graphicImage styleClass="image-scroller-right-arrow"
- value="img/shell/arr_right_dis.png" />
- </f:facet>
- <f:facet name="fastrewind">
- <h:graphicImage styleClass="image-scroller-left-arrow"
- value="img/shell/arr_left.png" />
- </f:facet>
- <f:facet name="fastrewind_disabled">
- <h:graphicImage styleClass="image-scroller-left-arrow"
- value="img/shell/arr_left_dis.png" />
- </f:facet>
-</rich:datascroller>
-
-...]]></programlisting>
- <para>
- The page attribute identifies which page should be displayed right now. For instance, if you have only 20 images and the current image has the 12<superscript>th</superscript> index in the collection, then the 3<superscript>rd</superscript> page will be displayed:
-
- </para>
- <programlisting role="XML"><![CDATA[...
-public Integer getPage(){
- final Integer index = model.getSelectedAlbum().getIndex(model.getSelectedImage());
- return index / 5 + 1;
- }
-
-...]]></programlisting>
-
- <para>
- The <code>lastPageMode="full" </code> attribute ensures that 5 thumbnails are always shown on the page. If this attribute hadn't been configured like this, in case the 19th thumbnail out of 20 had been selected then only 2 last thumbnails would have been displayed.
- </para>
-
- <para>
- As you can see, <emphasis role="bold"><property><rich:dataScroller></property></emphasis> has a slightly different look-and-feel, the trick is in the redefinition of <property>fastforward</property>, <property>fastforward_disabled</property>, <property>fastrewind</property> and <property>fastrewind_disabled</property> facets on which places we display our images. We didn't redefine other facets because they are not rendered to the page which is achieved with <code>boundaryControls="hide"</code> and <code>stepControls="hide</code> attributes of <emphasis role="bold"><property><rich:dataSroller></property></emphasis>.
- </para>
- <para>
- To get more details about the <emphasis role="bold"><property><a4j:repeat></property></emphasis> and <emphasis role="bold"><property><rich:dataScroller></property></emphasis> components please visit <ulink url="http://livedemo.exadel.com/richfaces-demo/richfaces/dataTableScroller.js">Live Demo</ulink> web page and <ulink url="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/..." >RichFaces Developer Guide</ulink>
-
- </para>
-</section>
Modified: trunk/docs/realworld_app_guide/en/src/main/docbook/master.xml
===================================================================
--- trunk/docs/realworld_app_guide/en/src/main/docbook/master.xml 2009-05-08 13:31:51 UTC (rev 14079)
+++ trunk/docs/realworld_app_guide/en/src/main/docbook/master.xml 2009-05-08 14:34:09 UTC (rev 14080)
@@ -18,9 +18,9 @@
<!ENTITY contextMenu SYSTEM "includes/contextMenu.xml">
<!ENTITY tooltips SYSTEM "includes/tooltips.xml">
<!ENTITY hiw SYSTEM "includes/hiw.xml">
- <!ENTITY validators SYSTEM "includes/validators.xml">
- <!ENTITY datascroller SYSTEM "includes/datascroller.xml">
+ <!ENTITY validators SYSTEM "includes/validators.xml">
<!ENTITY button SYSTEM "includes/button.xml">
+ <!ENTITY a4j_status SYSTEM "includes/a4j_status.xml">
]>
@@ -81,9 +81,9 @@
&uploadImages;
&contextMenu;
&tooltips;
- &validators;
- &datascroller;
+ &validators;
&button;
+ &a4j_status;
<!-- &hiw; -->
&userPreferencesView;
&errorsReports;
15 years
JBoss Rich Faces SVN: r14079 - trunk/examples/photoalbum/source/web/src/main/webapp/layout.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2009-05-08 09:31:51 -0400 (Fri, 08 May 2009)
New Revision: 14079
Modified:
trunk/examples/photoalbum/source/web/src/main/webapp/layout/template.xhtml
Log:
RF-7005
Modified: trunk/examples/photoalbum/source/web/src/main/webapp/layout/template.xhtml
===================================================================
(Binary files differ)
15 years
JBoss Rich Faces SVN: r14078 - in trunk/samples/richfaces-demo/src/main: webapp/richfaces/editor/examples and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-05-08 09:27:08 -0400 (Fri, 08 May 2009)
New Revision: 14078
Added:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/editor/InputResetBean.java
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/editor/EditorBean.java
trunk/samples/richfaces-demo/src/main/webapp/richfaces/editor/examples/editor.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-7028
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/editor/EditorBean.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/editor/EditorBean.java 2009-05-08 11:51:31 UTC (rev 14077)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/editor/EditorBean.java 2009-05-08 13:27:08 UTC (rev 14078)
@@ -3,8 +3,13 @@
import java.util.ArrayList;
import java.util.List;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
import javax.faces.model.SelectItem;
+import javax.faces.validator.ValidatorException;
+import org.jboss.seam.ui.validator.FormattedTextValidator;
+
public class EditorBean {
private String currentConfiguration = CONFIGS_PACKAGE + "simple";
@@ -69,6 +74,9 @@
this.useSeamText = useSeamText;
}
-
-
+ public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException {
+ if (useSeamText) {
+ new FormattedTextValidator().validate(context, component, value);
+ }
+ }
}
Added: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/editor/InputResetBean.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/editor/InputResetBean.java (rev 0)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/editor/InputResetBean.java 2009-05-08 13:27:08 UTC (rev 14078)
@@ -0,0 +1,54 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.demo.editor;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIInput;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ValueChangeEvent;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+
+/**
+ * @author Nick Belaevski
+ * @since 3.3.1
+ */
+@Name("inputResetBean")
+(a)Scope(ScopeType.EVENT)
+public class InputResetBean {
+
+ @In
+ private FacesContext facesContext;
+
+ public void processValueChange(ValueChangeEvent valueChangeEvent) {
+ if (facesContext.getMaximumSeverity() != null) {
+ UIComponent component = valueChangeEvent.getComponent();
+ if (component instanceof UIInput) {
+ UIInput input = (UIInput) component;
+ input.resetValue();
+ }
+ }
+ }
+}
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/editor/examples/editor.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/editor/examples/editor.xhtml 2009-05-08 11:51:31 UTC (rev 14077)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/editor/examples/editor.xhtml 2009-05-08 13:27:08 UTC (rev 14078)
@@ -6,56 +6,75 @@
xmlns:rich="http://richfaces.org/rich"
xmlns:s="http://jboss.com/products/seam/taglib">
<style>
+
.column {
width: 400px;
+}
+
+.column, .column2 {
vertical-align: top;
}
+
+.column2 {
+ padding-left: 100px;
+}
</style>
+
<h:form id="form">
- <h:panelGrid columns="2" width="100%" columnClasses="column,column">
+ <h:panelGrid columns="2" width="100%" columnClasses="column,column2">
<h:panelGroup style="height:320px;width:400px;" layout="block">
<rich:editor configuration="#{editorBean.currentConfiguration}"
- id="editor" width="400" height="300"
+ id="editor" width="400" height="300" validator="#{editorBean.validate}"
viewMode="#{editorBean.viewMode}" value="#{editorBean.value}" useSeamText="#{editorBean.useSeamText}">
<a4j:support event="onchange" reRender="result" ajaxSingle="true"
requestDelay="1000"
- onsubmit="if (! #{rich:element('form:editorvalue')}) return false;" />
+ onsubmit="if (!#{rich:element('form:editorvalue')} && !#{editorBean.useSeamText}) return false;" />
</rich:editor>
</h:panelGroup>
- <rich:panel>
+ <rich:panel id="controls" style="width: 400px;">
<f:facet name="header">
<h:outputText value="Editor Settings" />
</f:facet>
<h:panelGrid columns="2">
<h:outputText value="Select Editor Theme" />
<h:selectOneRadio value="#{editorBean.currentConfiguration}"
- layout="pageDirection">
+ layout="pageDirection" valueChangeListener="#{inputResetBean.processValueChange}">
<f:selectItems value="#{editorBean.configurations}" />
- <a4j:support event="onclick" reRender="editor" requestDelay="500"
+ <a4j:support event="onclick" reRender="editor,controls" requestDelay="500"
eventsQueue="settingsQueue" similarityGroupingId="settings" />
</h:selectOneRadio>
<h:outputText value="Toggle Modes" escape="false"/>
<h:selectOneRadio value="#{editorBean.viewMode}"
- layout="pageDirection">
+ layout="pageDirection" valueChangeListener="#{inputResetBean.processValueChange}">
<f:selectItem itemLabel="WYSIWYG mode" itemValue="visual" />
<f:selectItem itemLabel="Text Area(Disables Preview)" itemValue="source" />
- <a4j:support event="onclick" reRender="editor" requestDelay="500"
+ <a4j:support event="onclick" reRender="editor,controls" requestDelay="500"
eventsQueue="settingsQueue" similarityGroupingId="settings" />
</h:selectOneRadio>
<h:outputText value="Toggle Preview: " />
- <h:selectBooleanCheckbox value="#{editorBean.liveUpdatesEnabled}">
- <a4j:support event="onclick" reRender="result" requestDelay="500"
+ <h:selectBooleanCheckbox value="#{editorBean.liveUpdatesEnabled}"
+ valueChangeListener="#{inputResetBean.processValueChange}">
+ <a4j:support event="onclick" reRender="result,controls" requestDelay="500"
eventsQueue="settingsQueue" similarityGroupingId="settings" />
</h:selectBooleanCheckbox>
<h:outputText value="Use Seam Text: " />
<h:selectBooleanCheckbox value="#{editorBean.useSeamText}">
- <a4j:support event="onclick" reRender="editor,result" requestDelay="500"
+ <a4j:support event="onclick" reRender="editor,result,controls" requestDelay="500" ajaxSingle="true"
eventsQueue="settingsQueue" similarityGroupingId="settings" action="#{editorBean.resetValue}"/>
</h:selectBooleanCheckbox>
</h:panelGrid>
</rich:panel>
+
<a4j:outputPanel layout="block" id="result">
- <rich:panel rendered="#{editorBean.liveUpdatesEnabled}">
+
+ <a4j:outputPanel style="color: red;"
+ rendered="#{facesContext.maximumSeverity != null and editorBean.useSeamText}">
+ <h:outputText value="SeamText: "/>
+ </a4j:outputPanel>
+ <rich:message for="editor" style="color: red;" />
+
+ <rich:panel rendered="#{editorBean.liveUpdatesEnabled}"
+ style="#{facesContext.maximumSeverity != null ? 'display: none;' : ''}">
<f:facet name="header">
<h:outputText value="Preview" />
</f:facet>
@@ -63,6 +82,7 @@
cols="55" rows="20"/>
</rich:panel>
</a4j:outputPanel>
+ <h:outputText />
</h:panelGrid>
</h:form>
15 years
JBoss Rich Faces SVN: r14077 - in trunk/examples/photoalbum: source and 7 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2009-05-08 07:51:31 -0400 (Fri, 08 May 2009)
New Revision: 14077
Added:
trunk/examples/photoalbum/source/web/environment/
trunk/examples/photoalbum/source/web/environment/dev/
trunk/examples/photoalbum/source/web/environment/dev/environment.properties
trunk/examples/photoalbum/source/web/environment/prod/
trunk/examples/photoalbum/source/web/environment/prod/environment.properties
Removed:
trunk/examples/photoalbum/source/web/src/main/resources/environment.properties
Modified:
trunk/examples/photoalbum/pom.xml
trunk/examples/photoalbum/source/ear/pom.xml
trunk/examples/photoalbum/source/ejb/pom.xml
trunk/examples/photoalbum/source/pom.xml
trunk/examples/photoalbum/source/web/pom.xml
Log:
change pom files
Modified: trunk/examples/photoalbum/pom.xml
===================================================================
--- trunk/examples/photoalbum/pom.xml 2009-05-08 10:01:48 UTC (rev 14076)
+++ trunk/examples/photoalbum/pom.xml 2009-05-08 11:51:31 UTC (rev 14077)
@@ -19,7 +19,9 @@
<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>
+ <jboss.installer.url>file:E:\install\Develop\java\JBoss\jboss-4.2.3.GA.zip</jboss.installer.url>
+ <imageset>full</imageset>
+ <environment.properties>environment/prod</environment.properties>
</properties>
<repositories>
<repository>
@@ -34,55 +36,96 @@
</repository>
</repositories>
<modules>
- <module>ear</module>
- <module>ejb</module>
- <module>web</module>
+ <module>source/ear</module>
+ <module>source/ejb</module>
+ <module>source/web</module>
<!--module>tests</module-->
</modules>
<build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-ejb-plugin</artifactId>
- <configuration>
- <ejbVersion>3.0</ejbVersion>
- </configuration>
- </plugin>
- </plugins>
-
- <pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-eclipse-plugin</artifactId>
- <version>2.5</version>
+ <artifactId>maven-ejb-plugin</artifactId>
+ <configuration>
+ <ejbVersion>3.0</ejbVersion>
+ </configuration>
+ </plugin>
+ </plugins>
+
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <version>2.5</version>
+ <configuration>
+ <downloadSources>true</downloadSources>
+ <downloadJavadocs>false</downloadJavadocs>
+ <projectNameTemplate>[artifactId]-[version]</projectNameTemplate>
+ <wtpmanifest>true</wtpmanifest>
+ <wtpapplicationxml>true</wtpapplicationxml>
+ <wtpversion>2.0</wtpversion>
+ <classpathContainers>
+ <classpathContainer>org.eclipse.jdt.launching.JDK_CONTAINER</classpathContainer>
+ </classpathContainers>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
<configuration>
- <downloadSources>true</downloadSources>
- <downloadJavadocs>false</downloadJavadocs>
- <projectNameTemplate>[artifactId]-[version]</projectNameTemplate>
- <wtpmanifest>true</wtpmanifest>
- <wtpapplicationxml>true</wtpapplicationxml>
- <wtpversion>2.0</wtpversion>
- <classpathContainers>
- <classpathContainer>org.eclipse.jdt.launching.JDK_CONTAINER</classpathContainer>
- </classpathContainers>
+ <source>1.5</source>
+ <target>1.5</target>
</configuration>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
+ </plugins>
+ </pluginManagement>
</build>
<profiles>
<profile>
+ <id>richfaces</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+
+ <properties>
+ <imageset>full</imageset>
+ <imagespath>Upload/full/images</imagespath>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-scm-plugin</artifactId>
+ <version>1.2</version>
+ <configuration>
+ <connectionType>developerConnection</connectionType>
+ </configuration>
+ <executions>
+ <execution>
+ <id>fetch-feature</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>export</goal>
+ </goals>
+
+ <configuration>
+ <connectionType>developerConnection</connectionType>
+ <developerConnectionUrl>scm:svn:https://svn.jboss.org/repos/richfaces/branches/examples-data/phot...</developerConnectionUrl>
+ <skipExportIfExists>true</skipExportIfExists>
+ <exportDirectory>source/web/Upload/full</exportDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
<id>hudson</id>
<properties>
<jboss.installer.url>http://internap.dl.sourceforge.net/sourceforge/jboss/jboss-4.2.3.GA.zip</jboss.installer.url>
Modified: trunk/examples/photoalbum/source/ear/pom.xml
===================================================================
--- trunk/examples/photoalbum/source/ear/pom.xml 2009-05-08 10:01:48 UTC (rev 14076)
+++ trunk/examples/photoalbum/source/ear/pom.xml 2009-05-08 11:51:31 UTC (rev 14077)
@@ -60,8 +60,20 @@
<build>
<finalName>${projectName}-ear-1.0-SNAPSHOT</finalName>
<plugins>
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-scm-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>fetch-feature</id>
+ <phase>none</phase>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.3.1</version>
<configuration>
@@ -91,15 +103,36 @@
</build>
<profiles>
- <profile>
- <id>default</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- </profile>
-
<profile>
<id>richfaces</id>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.3</version>
+ <executions>
+ <execution>
+ <id>copy-prod-resources</id>
+ <phase>install</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>dist</outputDirectory>
+ <resources>
+ <resource>
+ <directory>target/*.ear</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</profile>
</profiles>
Modified: trunk/examples/photoalbum/source/ejb/pom.xml
===================================================================
--- trunk/examples/photoalbum/source/ejb/pom.xml 2009-05-08 10:01:48 UTC (rev 14076)
+++ trunk/examples/photoalbum/source/ejb/pom.xml 2009-05-08 11:51:31 UTC (rev 14077)
@@ -1,119 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.richfaces</groupId>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.richfaces</groupId>
<artifactId>photoalbum</artifactId>
- <version>1.0-SNAPSHOT</version>
- </parent>
- <artifactId>${projectName}-ejb</artifactId>
- <name>EJB module</name>
- <version>1.0-SNAPSHOT</version>
- <packaging>ejb</packaging>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>${projectName}-ejb</artifactId>
+ <name>EJB module</name>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>ejb</packaging>
- <dependencies>
- <dependency>
- <groupId>javax.ejb</groupId>
- <artifactId>ejb-api</artifactId>
- <version>3.0</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.persistence</groupId>
- <artifactId>persistence-api</artifactId>
- <version>1.0</version>
- <scope>provided</scope>
- </dependency>
+ <dependencies>
+ <dependency>
+ <groupId>javax.ejb</groupId>
+ <artifactId>ejb-api</artifactId>
+ <version>3.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.persistence</groupId>
+ <artifactId>persistence-api</artifactId>
+ <version>1.0</version>
+ <scope>provided</scope>
+ </dependency>
<!--<dependency>-->
- <!-- runtime requirement hibernate needs -->
- <!--<groupId>org.slf4j</groupId>-->
- <!--<artifactId>slf4j-log4j12</artifactId>-->
- <!--<version>1.5.2</version>-->
+ <!-- runtime requirement hibernate needs -->
+ <!--<groupId>org.slf4j</groupId>-->
+ <!--<artifactId>slf4j-log4j12</artifactId>-->
+ <!--<version>1.5.2</version>-->
<!--</dependency>-->
- <dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam</artifactId>
- <version>${seamVersion}</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam-pdf</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.sun.facelets</groupId>
- <artifactId>jsf-facelets</artifactId>
- </exclusion>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam</artifactId>
+ <version>${seamVersion}</version>
+ <scope>provided</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-pdf</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.sun.facelets</groupId>
+ <artifactId>jsf-facelets</artifactId>
+ </exclusion>
</exclusions>
- </dependency>
-
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-validator</artifactId>
- <version>3.0.0.ga</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-annotations</artifactId>
- <version>3.3.0.ga</version>
- <!--<version>3.4.0.GA</version>-->
- <scope>provided</scope>
- </dependency>
- </dependencies>
+ </dependency>
- <profiles>
- <profile>
- <id>default</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
-
- <build>
- <resources>
- <resource>
- <directory>sql/short</directory>
- </resource>
- </resources>
- </build>
- </profile>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <version>3.0.0.ga</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-annotations</artifactId>
+ <version>3.3.0.ga</version>
+ <!--<version>3.4.0.GA</version>-->
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+ <profiles>
<profile>
<id>richfaces</id>
- <build>
- <resources>
- <resource>
- <directory>sql/full</directory>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <artifactId>maven-ejb-plugin</artifactId>
- <configuration>
- <ejbVersion>3.0</ejbVersion>
- <archive>
- <manifest>
- <addClasspath>true</addClasspath>
- </manifest>
- </archive>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.4</version>
- </plugin>
- </plugins>
- </build>
+ <properties>
+ <imageset>full</imageset>
+ </properties>
</profile>
</profiles>
@@ -123,77 +88,41 @@
<resource>
<directory>src/main/resources</directory>
</resource>
+ <resource>
+ <directory>sql/${imageset}</directory>
+ </resource>
</resources>
+
+
<plugins>
-<!--
<plugin>
- -->
-<!-- HIBERNATE 3 PLUGIN - this can output the DDL to a file -->
-<!--
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>hibernate3-maven-plugin</artifactId>
- <version>2.0-alpha-2</version>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-scm-plugin</artifactId>
<executions>
<execution>
- <phase>process-classes</phase>
- <goals>
- <goal>hbm2ddl</goal>
- </goals>
+ <id>fetch-feature</id>
+ <phase>none</phase>
</execution>
</executions>
- <configuration>
- <components>
- <component>
- <name>hbm2ddl</name>
- <implementation>annotationconfiguration</implementation>
- </component>
- </components>
- <componentProperties>
- <implementation>jpaconfiguration</implementation>
- <persistenceunit>entityManager</persistenceunit>
- <outputfilename>myschema.ddl</outputfilename>
- <propertyfile>${basedir}/src/main/resources/database.properties</propertyfile>
- <drop>false</drop>
- <create>true</create>
- <export>false</export>
- <format>true</format>
- </componentProperties>
- </configuration>
</plugin>
+
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-eclipse-plugin</artifactId>
+ <artifactId>maven-ejb-plugin</artifactId>
<configuration>
- <downloadSources>true</downloadSources>
- <downloadJavadocs>true</downloadJavadocs>
+ <ejbVersion>3.0</ejbVersion>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ </manifest>
+ </archive>
</configuration>
</plugin>
<plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.4</version>
</plugin>
-
--->
- <plugin>
- <artifactId>maven-ejb-plugin</artifactId>
- <configuration>
- <ejbVersion>3.0</ejbVersion>
- <archive>
- <manifest>
- <addClasspath>true</addClasspath>
- </manifest>
- </archive>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.4</version>
- </plugin>
- </plugins>
- </build>
+ </plugins>
+ </build>
</project>
Modified: trunk/examples/photoalbum/source/pom.xml
===================================================================
--- trunk/examples/photoalbum/source/pom.xml 2009-05-08 10:01:48 UTC (rev 14076)
+++ trunk/examples/photoalbum/source/pom.xml 2009-05-08 11:51:31 UTC (rev 14077)
@@ -1,91 +1,103 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces</groupId>
- <artifactId>photoalbum</artifactId>
- <packaging>pom</packaging>
- <version>1.0-SNAPSHOT</version>
- <name>sample application</name>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces</groupId>
+ <artifactId>photoalbum</artifactId>
+ <packaging>pom</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <name>sample application</name>
<parent>
- <groupId>org.jboss.seam</groupId>
- <artifactId>root</artifactId>
- <version>2.1.1.GA</version>
- </parent>
-
- <properties>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>root</artifactId>
+ <version>2.1.1.GA</version>
+ </parent>
+
+ <properties>
<projectName>photoalbum</projectName>
<richfacesVersion>3.3.1-SNAPSHOT</richfacesVersion>
<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>
+ <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>
+ <!--<imageset>short</imageset>-->
+ <imageset>short</imageset>
+ <imagespath>Upload/short</imagespath>
+ <environment.properties>environment/dev</environment.properties>
</properties>
- <repositories>
- <repository>
- <id>repository.jboss.com</id>
- <name>Jboss Repository for Maven</name>
- <url>http://repository.jboss.com/maven2/</url>
- </repository>
- <repository>
- <id>repository.jboss.org</id>
- <name>Jboss Repository for Maven</name>
- <url>http://repository.jboss.org/maven2/</url>
- </repository>
- </repositories>
- <modules>
- <module>ear</module>
- <module>ejb</module>
- <module>web</module>
- <!--module>tests</module-->
- </modules>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-ejb-plugin</artifactId>
- <configuration>
- <ejbVersion>3.0</ejbVersion>
- </configuration>
- </plugin>
- </plugins>
-
- <pluginManagement>
+ <repositories>
+ <repository>
+ <id>repository.jboss.com</id>
+ <name>Jboss Repository for Maven</name>
+ <url>http://repository.jboss.com/maven2/</url>
+ </repository>
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>Jboss Repository for Maven</name>
+ <url>http://repository.jboss.org/maven2/</url>
+ </repository>
+ </repositories>
+ <modules>
+ <module>ear</module>
+ <module>ejb</module>
+ <module>web</module>
+ <!--module>tests</module-->
+ </modules>
+ <build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-eclipse-plugin</artifactId>
- <version>2.5</version>
+ <artifactId>maven-ejb-plugin</artifactId>
+ <configuration>
+ <ejbVersion>3.0</ejbVersion>
+ </configuration>
+ </plugin>
+ </plugins>
+
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <version>2.5</version>
<configuration>
<downloadSources>true</downloadSources>
<downloadJavadocs>false</downloadJavadocs>
- <projectNameTemplate>[artifactId]-[version]</projectNameTemplate>
+ <projectNameTemplate>[artifactId]-[version]
+ </projectNameTemplate>
<wtpmanifest>true</wtpmanifest>
<wtpapplicationxml>true</wtpapplicationxml>
<wtpversion>2.0</wtpversion>
<classpathContainers>
- <classpathContainer>org.eclipse.jdt.launching.JDK_CONTAINER</classpathContainer>
+ <classpathContainer>
+ org.eclipse.jdt.launching.JDK_CONTAINER
+ </classpathContainer>
</classpathContainers>
</configuration>
</plugin>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
</plugins>
</pluginManagement>
- </build>
+ </build>
<profiles>
<profile>
<id>hudson</id>
<properties>
- <jboss.installer.url>http://internap.dl.sourceforge.net/sourceforge/jboss/jboss-4.2.3.GA.zip</jboss.installer.url>
+ <jboss.installer.url>
+ http://internap.dl.sourceforge.net/sourceforge/jboss/jboss-4.2.3.GA.zip
+ </jboss.installer.url>
</properties>
</profile>
</profiles>
Added: trunk/examples/photoalbum/source/web/environment/dev/environment.properties
===================================================================
--- trunk/examples/photoalbum/source/web/environment/dev/environment.properties (rev 0)
+++ trunk/examples/photoalbum/source/web/environment/dev/environment.properties 2009-05-08 11:51:31 UTC (rev 14077)
@@ -0,0 +1 @@
+environment=development
\ No newline at end of file
Added: trunk/examples/photoalbum/source/web/environment/prod/environment.properties
===================================================================
--- trunk/examples/photoalbum/source/web/environment/prod/environment.properties (rev 0)
+++ trunk/examples/photoalbum/source/web/environment/prod/environment.properties 2009-05-08 11:51:31 UTC (rev 14077)
@@ -0,0 +1 @@
+environment=production
\ No newline at end of file
Modified: trunk/examples/photoalbum/source/web/pom.xml
===================================================================
--- trunk/examples/photoalbum/source/web/pom.xml 2009-05-08 10:01:48 UTC (rev 14076)
+++ trunk/examples/photoalbum/source/web/pom.xml 2009-05-08 11:51:31 UTC (rev 14077)
@@ -12,7 +12,6 @@
<name>WAR module</name>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
-
<dependencies>
<dependency>
@@ -208,31 +207,13 @@
</dependencies>
<profiles>
<profile>
- <id>default</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
-
- <build>
- <resources>
- <resource>
- <directory>Upload/short</directory>
- <targetPath>Upload</targetPath>
- </resource>
- </resources>
- </build>
- </profile>
-
- <profile>
<id>richfaces</id>
- <build>
- <resources>
- <resource>
- <directory>Upload/full/images</directory>
- <targetPath>Upload</targetPath>
- </resource>
- </resources>
+ <properties>
+ <imagespath>Upload/full/images</imagespath>
+ <environment.properties>environment/prod</environment.properties>
+ </properties>
+ <build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -268,10 +249,28 @@
<resource>
<directory>src/main/resources</directory>
</resource>
+ <resource>
+ <directory>${environment.properties}</directory>
+ </resource>
+ <resource>
+ <directory>${imagespath}</directory>
+ <targetPath>Upload</targetPath>
+ </resource>
</resources>
<plugins>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-scm-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>fetch-feature</id>
+ <phase>none</phase>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
<artifactId>maven-war-plugin</artifactId>
</plugin>
</plugins>
Deleted: trunk/examples/photoalbum/source/web/src/main/resources/environment.properties
===================================================================
--- trunk/examples/photoalbum/source/web/src/main/resources/environment.properties 2009-05-08 10:01:48 UTC (rev 14076)
+++ trunk/examples/photoalbum/source/web/src/main/resources/environment.properties 2009-05-08 11:51:31 UTC (rev 14077)
@@ -1 +0,0 @@
-environment=development
\ No newline at end of file
15 years
JBoss Rich Faces SVN: r14076 - in trunk/samples: themes/src/main/resources/org/richfaces/renderkit/html/css and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2009-05-08 06:01:48 -0400 (Fri, 08 May 2009)
New Revision: 14076
Added:
trunk/samples/layout-sample/src/main/webapp/pages/layout.html
Modified:
trunk/samples/layout-sample/src/main/webapp/pages/index.xhtml
trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/smooth.xcss
trunk/samples/themes/src/main/templates/org/richfaces/smooth.jspx
Log:
smooth theme and layout changes
Modified: trunk/samples/layout-sample/src/main/webapp/pages/index.xhtml
===================================================================
(Binary files differ)
Added: trunk/samples/layout-sample/src/main/webapp/pages/layout.html
===================================================================
--- trunk/samples/layout-sample/src/main/webapp/pages/layout.html (rev 0)
+++ trunk/samples/layout-sample/src/main/webapp/pages/layout.html 2009-05-08 10:01:48 UTC (rev 14076)
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <style>
+ .layout {text-align: center;border-width: 1px;border-color: red;border-style: solid;}
+ .layoutPanel {}
+ .layoutPanelContent {text-align: center;border-width: 1px;border-color: blue;margin: 0px;border-style: dotted;}
+ </style>
+</head>
+<body>
+
+ <!-- body of the page -->
+
+ <div class="layout" style="zoom: 1">
+ <div class="layoutPanel top" style=""><div class="layoutPanelContent">Top</div></div>
+ <div class="layoutPanel left" style="float: left; width: 38%"><div class="layoutPanelContent">Left
+ panel xxxx yyy zzz</div></div>
+ <div class="layoutPanel center" style="float: left; width: 35%"><div class="layoutPanelContent">
+ <div class="layout" style="zoom: 1">
+ <div class="layoutPanel top" style=""><div class="layoutPanelContent">Top</div></div>
+ <div class="layoutPanel left" style="float: left; width: 38%"><div class="layoutPanelContent">Left
+ panel xxxx yyy zzz</div></div>
+ <div class="layoutPanel center" style="float: left; width: 35%"><div class="layoutPanelContent">Center
+ panel dhisdf ncdl dcd</div></div>
+ <div class="layoutPanel right" style="float: right; width: 27%"><div class="layoutPanelContent">Right
+ wersdupsdo; osajo;sca</div></div>
+ <div
+ style="display: block; height: 0; clear: both; visibility: hidden;">.</div>
+ <div class="layoutPanel bottom" style=""><div class="layoutPanelContent">Bottom</div></div>
+ </div>
+ </div>
+ </div>
+ <div class="layoutPanel right" style="float: right; width: 27%"><div class="layoutPanelContent">Right
+ wersdupsdo; osajo;sca</div></div>
+ <div style="display: block; height: 0; clear: both; visibility: hidden;">.</div>
+ <div class="layoutPanel bottom" style=""><div class="layoutPanelContent">Bottom</div></div>
+ </div>
+</body>
+</html>
Modified: trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/smooth.xcss
===================================================================
--- trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/smooth.xcss 2009-05-07 17:35:57 UTC (rev 14075)
+++ trunk/samples/themes/src/main/resources/org/richfaces/renderkit/html/css/smooth.xcss 2009-05-08 10:01:48 UTC (rev 14076)
@@ -79,10 +79,11 @@
<f:resource f:key="org.richfaces.theme.images.ShadowFooterBackground"/>
</u:style>
<u:style name="background-repeat" value="repeat-x"/>
- <u:style name="background-position" value="bottom left"/>
- <u:style name="margin" value="0px 15px 0px 15px" />
+ <u:style name="background-position" value="top left"/>
+ <u:style name="margin" value="0px 15px" />
<u:style name="position" value="relative"/>
<u:style name="padding" value="15px" />
+ <u:style name="height" value="53px" />
</u:selector>
<u:selector name=".footer_bg_left">
@@ -92,7 +93,7 @@
</u:style>
<!-- u:style name="background-color" skin="panelBorderColor"/-->
<u:style name="background-repeat" value="no-repeat"/>
- <u:style name="background-position" value="bottom left"/>
+ <u:style name="background-position" value="top left"/>
</u:selector>
<u:selector name=".footer_bg_right">
<u:style name="background-image">
@@ -100,7 +101,8 @@
<f:resource f:key="org.richfaces.theme.images.ShadowFooterRight"/>
</u:style>
<u:style name="background-repeat" value="no-repeat"/>
- <u:style name="background-position" value="bottom right"/>
+ <u:style name="background-position" value="top right"/>
+ <u:style name="height" value="72px" />
</u:selector>
@@ -150,7 +152,7 @@
<f:verbatim>
<![CDATA[
-.page_size{width : 90%;border: none;}
+.page_size{width:90%; margin:0px auto; border: none;}
.menu_width{width : 300px;}
.common_box {margin : 0px; }
Modified: trunk/samples/themes/src/main/templates/org/richfaces/smooth.jspx
===================================================================
--- trunk/samples/themes/src/main/templates/org/richfaces/smooth.jspx 2009-05-07 17:35:57 UTC (rev 14075)
+++ trunk/samples/themes/src/main/templates/org/richfaces/smooth.jspx 2009-05-08 10:01:48 UTC (rev 14076)
@@ -37,7 +37,7 @@
<body x:passThruWithExclusions="value,name,type,id">
<table class="rich-page #{component.attributes['pageClass']}" border="0" cellpadding="0" cellspacing="0">
<tr>
- <td align="center" class="common_box">
+ <td class="common_box">
<table height="100%" cellpadding="0" cellspacing="0" class="page_size">
<thead>
15 years