JBoss Rich Faces SVN: r12448 - in trunk/test-applications/realworld/web/src/main: webapp/WEB-INF/tags/templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2009-01-28 04:47:07 -0500 (Wed, 28 Jan 2009)
New Revision: 12448
Modified:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/image.xhtml
Log:
Validator for image popup modal panel
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java 2009-01-28 09:20:20 UTC (rev 12447)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/ImageManager.java 2009-01-28 09:47:07 UTC (rev 12448)
@@ -63,6 +63,12 @@
@In(create=true, required=true)
private RatingBinder ratingBinder;
+ private String oncomplete;
+
+ public ImageManager() {
+ oncomplete = null;
+ }
+
public void deleteImage(Image image){
String imagePath = image.getPath();
imageAction.deleteImage(image);
@@ -80,6 +86,7 @@
conversationState.setSelectedAlbum(albumItem.getAlbum());
}
imageAction.editImage(image, parentChanged);
+ oncomplete = "$('imageModalPanel').component.hide()";
}
@Observer(Constants.ADD_IMAGE_EVENT)
@@ -131,4 +138,14 @@
fileManager.renameImage(fileNameOld, fileNameNew);
return newPath;
}
+
+ public String getOncomplete() {
+ return oncomplete;
+ }
+
+ public void setOncomplete(String oncomplete) {
+ this.oncomplete = oncomplete;
+ }
+
+
}
Modified: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/image.xhtml
===================================================================
(Binary files differ)
15 years, 3 months
JBoss Rich Faces SVN: r12447 - in trunk/test-applications/realworld/web/src/main: webapp/includes/contextMenu and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-01-28 04:20:20 -0500 (Wed, 28 Jan 2009)
New Revision: 12447
Modified:
trunk/test-applications/realworld/web/src/main/resources/messages_en.properties
trunk/test-applications/realworld/web/src/main/resources/messages_ru.properties
trunk/test-applications/realworld/web/src/main/webapp/includes/contextMenu/CMForAlbum.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/contextMenu/CMForImage.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/image/breadCrumb.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/image/imageScroller.xhtml
trunk/test-applications/realworld/web/src/main/webapp/layout/panelBar.xhtml
Log:
Modified: trunk/test-applications/realworld/web/src/main/resources/messages_en.properties
===================================================================
--- trunk/test-applications/realworld/web/src/main/resources/messages_en.properties 2009-01-28 01:25:39 UTC (rev 12446)
+++ trunk/test-applications/realworld/web/src/main/resources/messages_en.properties 2009-01-28 09:20:20 UTC (rev 12447)
@@ -264,6 +264,8 @@
friend_error=This user won't be your friend!
acess_not_granted=You have no rights to view this album
invalid_syntax=Invalid syntax
+album_addImage=Add image
+album_addToFavorites=Add to favorite albums
album_present=Album with this name already present!
album_deleteFromFavorite=Delete from favorite
album_show=Show album
Modified: trunk/test-applications/realworld/web/src/main/resources/messages_ru.properties
===================================================================
--- trunk/test-applications/realworld/web/src/main/resources/messages_ru.properties 2009-01-28 01:25:39 UTC (rev 12446)
+++ trunk/test-applications/realworld/web/src/main/resources/messages_ru.properties 2009-01-28 09:20:20 UTC (rev 12447)
@@ -97,7 +97,7 @@
scroller.last=\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u044F\u044F
scroller.prev=\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0430\u044F
scroller.next=\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0430\u044F
-scroller.pager=\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 #{conversationState.selectedImageIndex} \u0438\u0437 \#{conversationState.selectedAlbum.images.size}
+scroller.pager=\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \#{conversationState.selectedImageIndex} \u0438\u0437 \#{conversationState.selectedAlbum.images.size}
image.rating=\u0422\u0435\u043A\u0443\u0449\u0438\u0439 \u0440\u0435\u0439\u0442\u0438\u043D\u0433\: \#{conversationState.selectedImage.rank.rating}
image.numberVotes=\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0433\u043E\u043B\u043E\u0441\u043E\u0432\: \#{conversationState.selectedImage.rank.hits}
@@ -204,6 +204,8 @@
friend_error=\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C \u043D\u0435 \u0445\u043E\u0447\u0435\u0442 \u0431\u044B\u0442\u044C \u0432\u0430\u0448\u0438\u043C \u0434\u0440\u0443\u0433\u043E\u043C\!
acess_not_granted=\u0412\u044B \u043D\u0435 \u0438\u043C\u0435\u0435\u0442\u0435 \u043F\u0440\u0430\u0432 \u0434\u043B\u044F \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430 \u044D\u0442\u043E\u0433\u043E \u0430\u043B\u044C\u0431\u043E\u043C\u0430
invalid_syntax=\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u044B\u0439 \u0441\u0438\u043D\u0442\u0430\u043A\u0441\u0438\u0441
+album_addImage=\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0443
+album_addToFavorites=\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0432 \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u0430\u043B\u044C\u0431\u043E\u043C\u044B
album_present=\u0410\u043B\u044C\u0431\u043E\u043C \u0441 \u0442\u0430\u043A\u0438\u043C \u0438\u043C\u0435\u043D\u0435\u043C \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442\!
album_deleteFromFavorite=\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0438\u0437 \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E
album_show=\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0430\u043B\u044C\u0431\u043E\u043C
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/contextMenu/CMForAlbum.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/contextMenu/CMForImage.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/image/breadCrumb.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/image/imageScroller.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/layout/panelBar.xhtml
===================================================================
(Binary files differ)
15 years, 3 months
JBoss Rich Faces SVN: r12446 - in trunk: framework/jsf-test/src/main/java/org/richfaces/test and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2009-01-27 20:25:39 -0500 (Tue, 27 Jan 2009)
New Revision: 12446
Added:
trunk/test-applications/ajaxTest/src/test/resources/richfaces-web.xml
trunk/test-applications/ajaxTest/src/test/resources/test-faces-config.xml
trunk/test-applications/ajaxTest/src/test/resources/webapp.properties
Modified:
trunk/framework/jsf-test/pom.xml
trunk/framework/jsf-test/src/main/java/org/richfaces/test/LocalWebConnection.java
trunk/framework/jsf-test/src/main/java/org/richfaces/test/LocalWebResponse.java
Log:
Update test framework dependencies to the HtmlUnit 2.4
Modified: trunk/framework/jsf-test/pom.xml
===================================================================
--- trunk/framework/jsf-test/pom.xml 2009-01-27 19:27:36 UTC (rev 12445)
+++ trunk/framework/jsf-test/pom.xml 2009-01-28 01:25:39 UTC (rev 12446)
@@ -20,12 +20,12 @@
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
- <version>2.3</version>
+ <version>2.4</version>
</dependency>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>1.2_11</version>
+ <version>1.2_12</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -41,7 +41,7 @@
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit-core-js</artifactId>
- <version>2.2</version>
+ <version>2.4</version>
</dependency>
<dependency>
<groupId>net.sourceforge.cssparser</groupId>
@@ -66,7 +66,7 @@
<dependency>
<groupId>net.sourceforge.nekohtml</groupId>
<artifactId>nekohtml</artifactId>
- <version>1.9.9</version>
+ <version>1.9.11</version>
<exclusions>
<exclusion>
<groupId>xml-apis</groupId>
@@ -101,7 +101,7 @@
<dependency>
<groupId>javax.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>1.2_11</version>
+ <version>1.2_12</version>
<scope>provided</scope>
</dependency>
<dependency>
@@ -112,7 +112,7 @@
<dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
- <version>2.7.0</version>
+ <version>2.7.1</version>
<exclusions>
<exclusion>
<groupId>xml-apis</groupId>
Modified: trunk/framework/jsf-test/src/main/java/org/richfaces/test/LocalWebConnection.java
===================================================================
--- trunk/framework/jsf-test/src/main/java/org/richfaces/test/LocalWebConnection.java 2009-01-27 19:27:36 UTC (rev 12445)
+++ trunk/framework/jsf-test/src/main/java/org/richfaces/test/LocalWebConnection.java 2009-01-28 01:25:39 UTC (rev 12446)
@@ -57,7 +57,8 @@
if(null != body && FormEncodingType.URL_ENCODED.getName().equals(contentType)){
connection.parseFormParameters(body);
}
+ long startTime = System.currentTimeMillis();
connection.execute();
- return new LocalWebResponse(settings,connection);
+ return new LocalWebResponse(settings,connection,System.currentTimeMillis()-startTime);
}
}
\ No newline at end of file
Modified: trunk/framework/jsf-test/src/main/java/org/richfaces/test/LocalWebResponse.java
===================================================================
--- trunk/framework/jsf-test/src/main/java/org/richfaces/test/LocalWebResponse.java 2009-01-27 19:27:36 UTC (rev 12445)
+++ trunk/framework/jsf-test/src/main/java/org/richfaces/test/LocalWebResponse.java 2009-01-28 01:25:39 UTC (rev 12446)
@@ -6,6 +6,7 @@
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
@@ -39,16 +40,21 @@
*
*/
public class LocalWebResponse implements WebResponse {
+
private WebRequestSettings settings;
+
private final StagingConnection serverConnection;
+
+ private final long loadTime;
- public LocalWebResponse(StagingConnection serverConnection) {
+ public LocalWebResponse(StagingConnection serverConnection,long l) {
this.serverConnection = serverConnection;
+ this.loadTime = l;
}
public LocalWebResponse(WebRequestSettings settings,
- StagingConnection connection) {
- this(connection);
+ StagingConnection connection, long l) {
+ this(connection,l);
this.settings = settings;
}
@@ -90,7 +96,7 @@
* com.gargoylesoftware.htmlunit.WebResponse#getLoadTimeInMilliSeconds()
*/
public long getLoadTimeInMilliSeconds() {
- return 0;
+ return loadTime;
}
/*
@@ -185,4 +191,40 @@
}
return headers;
}
+
+ /* (non-Javadoc)
+ * @see com.gargoylesoftware.htmlunit.WebResponse#getContentAsBytes()
+ */
+ public byte[] getContentAsBytes() {
+ return serverConnection.getResponseBody();
+ }
+
+ /* (non-Javadoc)
+ * @see com.gargoylesoftware.htmlunit.WebResponse#getContentAsString(java.lang.String)
+ */
+ public String getContentAsString(String encoding) {
+ byte[] body = serverConnection.getResponseBody();
+ String content;
+ try {
+ content = new String(body,encoding);
+ } catch (UnsupportedEncodingException e) {
+ content = new String(body);
+ }
+ return content;
+ }
+
+ /* (non-Javadoc)
+ * @see com.gargoylesoftware.htmlunit.WebResponse#getLoadTime()
+ */
+ public long getLoadTime() {
+ return loadTime;
+ }
+
+ /* (non-Javadoc)
+ * @see com.gargoylesoftware.htmlunit.WebResponse#getRequestUrl()
+ */
+ public URL getRequestUrl() {
+ // TODO Auto-generated method stub
+ return serverConnection.getUrl();
+ }
}
\ No newline at end of file
Added: trunk/test-applications/ajaxTest/src/test/resources/richfaces-web.xml
===================================================================
--- trunk/test-applications/ajaxTest/src/test/resources/richfaces-web.xml (rev 0)
+++ trunk/test-applications/ajaxTest/src/test/resources/richfaces-web.xml 2009-01-28 01:25:39 UTC (rev 12446)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ version="2.5">
+ <display-name>ajaxTest</display-name>
+ <description>ajax simple repeater test</description>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>server</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.VIEW_MAPPINGS</param-name>
+ <param-value>*.xhtml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ <dispatcher>ERROR</dispatcher>
+ </filter-mapping>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+</web-app>
\ No newline at end of file
Property changes on: trunk/test-applications/ajaxTest/src/test/resources/richfaces-web.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/test-applications/ajaxTest/src/test/resources/test-faces-config.xml
===================================================================
--- trunk/test-applications/ajaxTest/src/test/resources/test-faces-config.xml (rev 0)
+++ trunk/test-applications/ajaxTest/src/test/resources/test-faces-config.xml 2009-01-28 01:25:39 UTC (rev 12446)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
+
+ <application>
+ <!--
+ <message-bundle>messages</message-bundle>
+ -->
+ <locale-config>
+ <default-locale>en</default-locale>
+ </locale-config>
+ <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
+ </application>
+ <managed-bean>
+ <managed-bean-name>bean</managed-bean-name>
+ <managed-bean-class>org.richfaces.Bean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+</faces-config>
Property changes on: trunk/test-applications/ajaxTest/src/test/resources/test-faces-config.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/test-applications/ajaxTest/src/test/resources/webapp.properties
===================================================================
--- trunk/test-applications/ajaxTest/src/test/resources/webapp.properties (rev 0)
+++ trunk/test-applications/ajaxTest/src/test/resources/webapp.properties 2009-01-28 01:25:39 UTC (rev 12446)
@@ -0,0 +1 @@
+webroot=../../main/webapp
Property changes on: trunk/test-applications/ajaxTest/src/test/resources/webapp.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 3 months
JBoss Rich Faces SVN: r12445 - in trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld: util and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2009-01-27 14:27:36 -0500 (Tue, 27 Jan 2009)
New Revision: 12445
Added:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImageUtils.java
Modified:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileManager.java
Log:
Image resize
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileManager.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileManager.java 2009-01-27 18:40:17 UTC (rev 12444)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileManager.java 2009-01-27 19:27:36 UTC (rev 12445)
@@ -20,16 +20,11 @@
*/
package org.richfaces.realworld.fileupload;
-import java.awt.Graphics2D;
-import java.awt.RenderingHints;
-import java.awt.geom.AffineTransform;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
-import java.util.HashMap;
-import java.util.Map;
import javax.faces.context.FacesContext;
import javax.imageio.ImageIO;
@@ -37,7 +32,9 @@
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.ui.graphicImage.Image;
import org.richfaces.realworld.service.Constants;
+import org.richfaces.realworld.util.ImageUtils;
@Name("fileManager")
@Scope(ScopeType.CONVERSATION)
@@ -152,6 +149,9 @@
ImageIO.write(bsrc, Constants.JPG, new File(dest));
return;
}
+
+ BufferedImage bdest = new ImageUtils(bsrc).resizeImage(width, height);
+ /*
BufferedImage bdest = new BufferedImage(width, height,
BufferedImage.TYPE_INT_RGB);
Graphics2D g = bdest.createGraphics();
@@ -161,8 +161,9 @@
hints.put(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
g.addRenderingHints(hints);
g.drawRenderedImage(bsrc, at);
+ */
+ String dest = getUploadRoot() + transformPath(fileName, format);
- String dest = getUploadRoot() + transformPath(fileName, format);
ImageIO.write(bdest, Constants.JPG, new File(dest));
inputStream.close();
}
Added: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImageUtils.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImageUtils.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ImageUtils.java 2009-01-27 19:27:36 UTC (rev 12445)
@@ -0,0 +1,74 @@
+/**
+ *
+ */
+package org.richfaces.realworld.util;
+
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+
+/**
+ * @author Andrey Markavtsov
+ *
+ */
+public class ImageUtils {
+
+ BufferedImage bufferedImage;
+
+ double width;
+ double height;
+
+ public ImageUtils(BufferedImage bufferedImage) {
+ if (bufferedImage == null) {
+ throw new NullPointerException("Buffered image is null");
+ }
+
+ this.height = bufferedImage.getHeight();
+ this.width = bufferedImage.getWidth();
+ this.bufferedImage = bufferedImage;
+ }
+
+ private void scaleToWidth(int width) throws IOException {
+ double height = width * this.height / this.width;
+ BufferedImage newImage = new BufferedImage(width, (int) height,
+ BufferedImage.TYPE_INT_RGB);
+ Graphics2D graphics2D = createGraphics(newImage);
+ graphics2D.drawImage(bufferedImage, 0, 0, (int) width, (int) height,
+ null);
+ bufferedImage = newImage;
+ }
+
+ private void scaleToHeight(int height) throws IOException {
+ double width = height * this.width / this.height;
+ BufferedImage newImage = new BufferedImage((int) width, (int) height,
+ BufferedImage.TYPE_INT_RGB);
+ Graphics2D graphics2D = createGraphics(newImage);
+ graphics2D.drawImage(bufferedImage, 0, 0, (int) width, (int) height,
+ null);
+ bufferedImage = newImage;
+ }
+
+ private Graphics2D createGraphics(BufferedImage image) {
+ Graphics2D graphics2D = image.createGraphics();
+ graphics2D.setBackground(new Color(255, 255, 255));
+ graphics2D.clearRect(0, 0, image.getWidth(), image.getHeight());
+ graphics2D.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
+ RenderingHints.VALUE_INTERPOLATION_BICUBIC);
+ return graphics2D;
+ }
+
+ public BufferedImage resizeImage(double width, double height)
+ throws IOException {
+
+ if (width > height) {
+ scaleToWidth((int) width);
+ } else {
+ scaleToHeight((int) height);
+ }
+
+ return bufferedImage;
+ }
+
+}
15 years, 3 months
JBoss Rich Faces SVN: r12444 - in trunk/test-applications/realworld/web/src/main: webapp/WEB-INF/tags/templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2009-01-27 13:40:17 -0500 (Tue, 27 Jan 2009)
New Revision: 12444
Modified:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/AlbumPopupHelper.java
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/album.xhtml
Log:
Fix validation inside modal panel
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/AlbumPopupHelper.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/AlbumPopupHelper.java 2009-01-27 18:23:01 UTC (rev 12443)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/AlbumPopupHelper.java 2009-01-27 18:40:17 UTC (rev 12444)
@@ -22,8 +22,11 @@
import java.io.Serializable;
+import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
+import org.ajax4jsf.context.AjaxContext;
+import org.ajax4jsf.javascript.JSLiteral;
import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
@@ -37,11 +40,13 @@
public class AlbumPopupHelper implements Serializable{
private static final long serialVersionUID = 2561824019376412988L;
-
+
private String caption;
private String actionName;
+ private String oncomplete = ";";
+
@In(create=true, required=true) @Out
private Album album;
@@ -53,6 +58,7 @@
public void initAlbumData( String actionName, String caption, Album album){
this.caption = caption;
this.actionName = actionName;
+ this.oncomplete = ";";
if(null != album){
this.album = album;
this.parent = album.getParent();
@@ -65,6 +71,7 @@
public void initAlbumData( String actionName, String caption, Album album, Album parent){
this.caption = caption;
this.actionName = actionName;
+ this.oncomplete = ";";
if(null != album){
this.album = album;
}else{
@@ -75,8 +82,18 @@
public void editAlbum(ActionEvent event){
albumManager.editAlbum(this.album);
+ setOncomplete();
}
+ private void setOncomplete() {
+ oncomplete = "$('albumModalPanel').component.hide()";
+// FacesContext context = FacesContext.getCurrentInstance();
+// AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
+// if (ajaxContext.isAjaxRequest()) {
+// ajaxContext.setOncomplete(new JSLiteral("$('albumModalPanel').component.hide()"));
+// }
+ }
+
public String getCaption() {
return caption;
}
@@ -105,4 +122,15 @@
public void setParent(Album parent) {
this.parent = parent;
}
+
+ public String getOncomplete() {
+ return oncomplete;
+ }
+
+ public void setOncomplete(String oncomplete) {
+ this.oncomplete = oncomplete;
+ }
+
+
+
}
Modified: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/album.xhtml
===================================================================
(Binary files differ)
15 years, 3 months
JBoss Rich Faces SVN: r12443 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/dataGrid and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2009-01-27 13:23:01 -0500 (Tue, 27 Jan 2009)
New Revision: 12443
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataGridBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataGrid/dataGrid.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataGridTest.java
Log:
RF-5677
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataGridBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataGridBean.java 2009-01-27 17:36:47 UTC (rev 12442)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/DataGridBean.java 2009-01-27 18:23:01 UTC (rev 12443)
@@ -3,10 +3,14 @@
import java.util.ArrayList;
import java.util.List;
+import javax.faces.application.FacesMessage;
+import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
+import javax.faces.validator.Validator;
+import javax.faces.validator.ValidatorException;
-public class DataGridBean {
+public class DataGridBean implements Validator{
public class Element {
@@ -89,4 +93,11 @@
public String getTrace() {
return trace;
}
+
+ public void validate(FacesContext context, UIComponent component,
+ Object value) throws ValidatorException {
+ if ("fail".equals(value)) {
+ throw new ValidatorException(new FacesMessage("validation failure"));
+ }
+ }
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataGrid/dataGrid.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataGrid/dataGrid.xhtml 2009-01-27 17:36:47 UTC (rev 12442)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/dataGrid/dataGrid.xhtml 2009-01-27 18:23:01 UTC (rev 12443)
@@ -26,7 +26,7 @@
<rich:dataGrid id="dataGrid" value="#{dataGrid.model}" var="element" elements="#{dataGrid.elements}">
<h:panelGroup>
<h:outputText value="#{element.cell1}"></h:outputText>
- <h:inputText value="#{element.cell2}"></h:inputText>
+ <h:inputText value="#{element.cell2}" validator="#{dataGrid.validate}"></h:inputText>
<h:outputText value="#{element.cell3}"></h:outputText>
<h:commandButton id="submit" value="submit" actionListener="#{dataGrid.submit}"></h:commandButton>
<a4j:commandButton id="ajaxSubmit" value="ajaxSubmit" actionListener="#{dataGrid.submit}"></a4j:commandButton>
@@ -42,6 +42,7 @@
</h:column>
</h:dataTable>
</a4j:outputPanel>
+ <rich:messages></rich:messages>
</ui:define>
</ui:composition>
</html>
\ No newline at end of file
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataGridTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataGridTest.java 2009-01-27 17:36:47 UTC (rev 12442)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/DataGridTest.java 2009-01-27 18:23:01 UTC (rev 12443)
@@ -1,5 +1,7 @@
package org.richfaces.testng;
+import java.util.Arrays;
+
import org.ajax4jsf.template.Template;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
@@ -41,9 +43,10 @@
/**
* nested input and command components work correctly
+ * for the cases of validation failure or not
*/
@Test
- public void testComponentsProcessing(Template template) {
+ public void testComponentsProcessingWithValidation(Template template) {
init(template);
String trLocator = "xpath=id('"+ dataGrid + "')/tbody/tr[";
String inputLocator = trLocator + "6]/td/input[";
@@ -61,14 +64,25 @@
selenium.click(inputLocator + "3]");
waitForAjaxCompletion();
chekStructure();
+ selenium.type(inputLocator + "1]", "fail");
+ selenium.type(trLocator + "3]/td/input[1]", "fail");
+ selenium.click(inputLocator + "3]");
+ waitForAjaxCompletion();
+ chekStructure(3, 6);
}
- private void chekStructure() {
+ private void chekStructure(int ... notEqualRows) {
String dataTableRowLocator = "id('"+ dataTable + "')/tbody/tr";
int count = selenium.getXpathCount(dataTableRowLocator).intValue();
for (int i = 1; i <= count; i++) {
- Assert.assertEquals(selenium.getValue("xpath=id('"+ dataGrid + "')/tbody/tr[" + i + "]/td/input"),
- selenium.getText("xpath=" + dataTableRowLocator + "[" + i + "]"));
+ if (Arrays.binarySearch(notEqualRows, i) < 0) {
+ Assert.assertEquals(selenium.getValue("xpath=id('"+ dataGrid + "')/tbody/tr[" + i + "]/td/input"),
+ selenium.getText("xpath=" + dataTableRowLocator + "[" + i + "]"));
+ } else {
+ Assert.assertFalse(selenium.
+ getValue("xpath=id('"+ dataGrid + "')/tbody/tr[" + i + "]/td/input").
+ equals(selenium.getText("xpath=" + dataTableRowLocator + "[" + i + "]")));
+ }
}
}
15 years, 3 months
JBoss Rich Faces SVN: r12442 - in trunk/test-applications/realworld: web/src/main/java/org/richfaces/realworld/fileupload and 13 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-01-27 12:36:47 -0500 (Tue, 27 Jan 2009)
New Revision: 12442
Modified:
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/Constants.java
trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/SearchService.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileUploadBean.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/ImageLoader.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/DnDManager.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/UserManager.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ConversationState.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/RenderLogic.java
trunk/test-applications/realworld/web/src/main/resources/messages_en.properties
trunk/test-applications/realworld/web/src/main/resources/messages_ru.properties
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/image.xhtml
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/linkPanel.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/contextMenu/CMForAlbum.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/contextMenu/CMForImage.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/contextMenu/CMForUser.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload/chooseMode.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload/singleMode.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/image/breadCrumb.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/image/imageScroller.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/image/mainImage.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/imagePreview.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/message/history.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/message/incoming.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/message/outcoming.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/messages.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/misc/errorPanel.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/panelBar/favoriteAlbums.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/panelBar/tree.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/panelBar/treeFriends.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/search/advancedSearch.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/search/searchResults.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/userPrefs.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/userPrefs/friendTab.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/userPrefs/loginPrefsTab.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/userPrefs/userPrefsTab.xhtml
Log:
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/Constants.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/Constants.java 2009-01-27 16:09:34 UTC (rev 12441)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/Constants.java 2009-01-27 17:36:47 UTC (rev 12442)
@@ -20,12 +20,13 @@
*/
package org.richfaces.realworld.service;
+
public class Constants {
public static final String ERROR_ID = "mainform:error";
public static final String CLEAR_ERROR_EVENT = "clearErrorEvent";
public static final String ADD_ERROR_EVENT = "addErrorEvent";
- public static final String ALBUM_WITH_THIS_NAME_ALREADY_PRESENT = "Album with this name already present!";
+
public static final String UPLOAD_ROOT = "uploadRoot";
public static final String FILE_SEPARATOR = "file.separator";
public static final String SLASH = "/";
@@ -35,28 +36,28 @@
public static final int SINGLE_MODE_FILE_QUANTITY = 1;
public static final String MULTY = "multy";
public static final String SINGLE = "single";
- public static final String FILE_PROCESSING_ERROR = "Error processing occured during upload";
+
public static final String ADD_IMAGE_EVENT = "addImage";
- public static final String FILE_SAVE_ERROR = "Error occured during saving image to disk";
+
public static final int KB = 1024;
public static final String FILE_UPLOAD_CLEAR_EVENT = "fileUploadClear";
public static final String SHOW_FILE_UPLOAD_EVENT = "showFileUpload";
public static final String CHANGE_MODE_FILE_UPLOAD_EVENT = "changeMode";
public static final String JPEG = "jpeg";
- public static final String INVALID_LOGIN_OR_PASSWORD = "Invalid login or password";
+
public static final String MAIN_OUTCOME = "main";
- public static final String LOGIN_SUCCESS = "You are successfully registered.";
+
public static final String REGISTER_LOGIN_NAME_ID = "register:loginName";
public static final String REGISTER_CONFIRM_PASSWORD_ID = "register:confirmPassword";
public static final String INDEX_OUTCOME = "index";
public static final String ADMIN_ROLE = "admin";
public static final String GUEST_ROLE = "guest";
public static final String UPDATE_MAIN_AREA_EVENT = "updateMainArea";
- public static final String WRONG_DND = "That album isn't yours, so you can't change it's location";
+
public static final String TREE_ID = "tree";
public static final String CLEAR_EDITOR_EVENT = "clearEditor";
public static final String RE = "Re:";
- public static final String FRIEND_ERROR_MESSAGE = "This user won't be your friend!";
+
public static final String SEND_MESSAGE_EVENT = "sendMessage";
public static final String HTTPS = "https://";
public static final String HTTP = "http://";
@@ -88,7 +89,7 @@
public static final String TREE_MY_ALBUMS_ITEM = "treeMyAlbumsItem";
public static final String TREE_ROOT_NODE_TYPE = "treeRoot";
public static final String DATASCROLLER_ID = "mainform:imageScroller";
- public static final String HAVENT_ACCESS = "You have no rights to view this album";
+
public static final String FIRST = "first";
public static final String NEXT = "next";
public static final String LAST = "last";
@@ -109,7 +110,6 @@
public static final String USER_OUTCOMING_MESSAGES = "user-outcomeMessages";
public static final String MINUS = "-";
public static final String PLUS = "+";
- public static final String INVALID_SYNTAX = "Invalid syntax";
public static final char MINUS_SIGN = '-';
public static final char PLUS_SIGN = '+';
public static final String DATE_NAMED_PARAMETER = ":date";
Modified: trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/SearchService.java
===================================================================
--- trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/SearchService.java 2009-01-27 16:09:34 UTC (rev 12441)
+++ trunk/test-applications/realworld/ejb/src/main/java/org/richfaces/realworld/service/SearchService.java 2009-01-27 17:36:47 UTC (rev 12442)
@@ -43,7 +43,8 @@
@In(value="entityManager")
EntityManager em;
-
+ @In("#{messages['invalid_syntax']}")
+ private String INVALID_SYNTAX;
@SuppressWarnings("unchecked")
public List<Image> searchImages(String searchPattern, String additionalParams, Map<String, Object> paramMap){
List<String> additions = new ArrayList<String>();
@@ -174,7 +175,7 @@
private boolean parse(String str, List<String> adds, List<String> removes){
str = str.trim();
if(str.startsWith(Constants.PLUS) || str.startsWith(Constants.MINUS) || str.endsWith(Constants.PLUS) || str.endsWith(Constants.MINUS) || str.length() == 0){
- Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception(Constants.INVALID_SYNTAX));
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception(INVALID_SYNTAX));
return false;
}
if(str.lastIndexOf(Constants.PLUS_SIGN)==-1 && str.lastIndexOf(Constants.MINUS_SIGN)==-1){
@@ -204,7 +205,7 @@
signedPreviousChar=true;
prevIndex =i;
}else {
- Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception(Constants.INVALID_SYNTAX));
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception(INVALID_SYNTAX));
return false;
}
}else if(c == Constants.MINUS_SIGN){
@@ -224,7 +225,7 @@
prevIndex =i;
}else {
- Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception(Constants.INVALID_SYNTAX));
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception(INVALID_SYNTAX));
return false;
}
}else{
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileUploadBean.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileUploadBean.java 2009-01-27 16:09:34 UTC (rev 12441)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/FileUploadBean.java 2009-01-27 17:36:47 UTC (rev 12442)
@@ -64,7 +64,10 @@
@In
private User user;
-
+ @In("#{messages['file_processing_error']}")
+ private String FILE_PROCESSING_ERROR;
+ @In("#{messages['file_saving_error']}")
+ private String FILE_SAVE_ERROR;
@In(create = true) @Out
FileWrapper fileWrapper;
@@ -100,10 +103,10 @@
try {
extractMetadata(file, image);
} catch (JpegProcessingException e1) {
- Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception(Constants.FILE_PROCESSING_ERROR));
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception(FILE_PROCESSING_ERROR));
return;
} catch (MetadataException me) {
- Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception(Constants.FILE_PROCESSING_ERROR));
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception(FILE_PROCESSING_ERROR));
return;
}
file.setImage(image);
@@ -130,7 +133,7 @@
// Save file to disk
String fileName = fileManager.transformToServerPath(file.getImage().getPath());
if(!fileManager.addImage(fileName, file.getData())){
- Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception(Constants.FILE_SAVE_ERROR));
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception(FILE_SAVE_ERROR));
}
// Update domain model
Events.instance().raiseEvent(Constants.ADD_IMAGE_EVENT, file.getImage());
@@ -148,7 +151,7 @@
String fileName = fileManager.transformToServerPath(file.getImage()
.getPath());
if(!fileManager.addImage(fileName, file.getData())){
- Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception(Constants.FILE_SAVE_ERROR));
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception(FILE_SAVE_ERROR));
}
// Update domain model
Events.instance().raiseEvent(Constants.ADD_IMAGE_EVENT, file.getImage());
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/ImageLoader.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/ImageLoader.java 2009-01-27 16:09:34 UTC (rev 12441)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/fileupload/ImageLoader.java 2009-01-27 17:36:47 UTC (rev 12442)
@@ -47,7 +47,8 @@
@In(create=true)
FileManager fileManager;
-
+ @In("#{messages['file_processing_error']}")
+ private String FILE_PROCESSING_ERROR;
@In(create=true)
FileWrapper fileWrapper;
public synchronized void paintImageFromByteArray(OutputStream stream, Object data) throws IOException {
@@ -74,7 +75,7 @@
paintData = bufferedInputStream;
paintData.read(data);
} catch (FileNotFoundException e) {
- Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception(Constants.FILE_PROCESSING_ERROR));
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception(FILE_PROCESSING_ERROR));
return;
} finally {
fileInputStream.close();
@@ -95,14 +96,14 @@
BufferedInputStream bufferedInputStream = new BufferedInputStream(fileInputStream);
InputStream paintData = bufferedInputStream;
if (null == paintData) {
- Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception(Constants.FILE_PROCESSING_ERROR));
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception(FILE_PROCESSING_ERROR));
return;
}
try {
BufferedImage images = ImageIO.read(paintData);
ImageIO.write(images, Constants.JPEG, out);
} catch (Exception e) {
- Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception(Constants.FILE_PROCESSING_ERROR));
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception(FILE_PROCESSING_ERROR));
return;
} finally {
fileInputStream.close();
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java 2009-01-27 16:09:34 UTC (rev 12441)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/AlbumManager.java 2009-01-27 17:36:47 UTC (rev 12442)
@@ -43,6 +43,9 @@
@In(create=true, required=true)
private IAlbumAction albumAction;
+ @In("#{messages['album_present']}")
+ private String ALBUM_WITH_THIS_NAME_ALREADY_PRESENT;
+
@In(create=true) @Out TreeMyAlbumsItem treeMyAlbumsItem;
@In(create=true, required=true) @Out
@@ -71,7 +74,7 @@
if(nameChanged){
Album oldAlbum = getOldTreeNode(album);
if(!renameDirectory(album, oldAlbum)){
- Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, Constants.ALBUM_WITH_THIS_NAME_ALREADY_PRESENT);
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, ALBUM_WITH_THIS_NAME_ALREADY_PRESENT);
return;
}
renameImagesFromAlbum(album, oldAlbum);
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java 2009-01-27 16:09:34 UTC (rev 12441)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/Authenticator.java 2009-01-27 17:36:47 UTC (rev 12442)
@@ -50,6 +50,11 @@
public class Authenticator implements Serializable
{
+ @In("#{messages['invalid_login']}")
+ private String INVALID_LOGIN_OR_PASSWORD;
+ @In("#{messages['login_success']}")
+ private String LOGIN_SUCCESS;
+
@In("#{messages['user.exist']}") private String USER_WITH_THIS_LOGIN_ALREADY_EXIST;
@In("#{messages['user.confirm.error']}") private String CONFIRM_PASSWORD_NOT_EQUALS_PASSWORD;
@@ -91,7 +96,7 @@
return true;
}
} catch (Exception nre) {
- facesMessages.add(Constants.INVALID_LOGIN_OR_PASSWORD);
+ facesMessages.add(INVALID_LOGIN_OR_PASSWORD);
return false;
}
return false;
@@ -103,7 +108,7 @@
return "";
}
userAction.register(user);
- facesMessages.add(Constants.LOGIN_SUCCESS);
+ facesMessages.add(LOGIN_SUCCESS);
return Constants.INDEX_OUTCOME;
}
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/DnDManager.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/DnDManager.java 2009-01-27 16:09:34 UTC (rev 12441)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/DnDManager.java 2009-01-27 17:36:47 UTC (rev 12442)
@@ -45,7 +45,8 @@
public class DnDManager implements DropListener {
@In @Out TreeMyAlbumsItem treeMyAlbumsItem;
-
+ @In("#{messages['album_present']}")
+ private String ALBUM_WITH_THIS_NAME_ALREADY_PRESENT;
@In User user;
@In(create=true)
FileManager fileManager;
@@ -74,7 +75,7 @@
return;
}
if(!renameDirectory(dragValue)){
- Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, Constants.ALBUM_WITH_THIS_NAME_ALREADY_PRESENT);
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, ALBUM_WITH_THIS_NAME_ALREADY_PRESENT);
return;
}
renameImagesFromAlbum(dragValue);
@@ -137,7 +138,7 @@
String directoryOld = fileManager.concat(user.getLogin(), dragValue.getAlbumPathFromParents(dragValue, fileManager.getFileSeparator(), true ));
String directoryNew = fileManager.concat(user.getLogin() ,dropValue.getAlbumPathFromParents(dropValue, fileManager.getFileSeparator(), false), dragValue.getName());
if(!fileManager.renameDirectory(directoryOld, directoryNew)){
- Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, Constants.ALBUM_WITH_THIS_NAME_ALREADY_PRESENT);
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, ALBUM_WITH_THIS_NAME_ALREADY_PRESENT);
return;
}
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/UserManager.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/UserManager.java 2009-01-27 16:09:34 UTC (rev 12441)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/manager/UserManager.java 2009-01-27 17:36:47 UTC (rev 12442)
@@ -48,7 +48,8 @@
@In("#{messages['addedtofriendsby']}") private String ADDED_TO_FRIENDS_MESSAGE;
@In("#{messages['removedfromfriends']}") private String REMOVED_FROM_FRIENDS_MESSAGE_THEME;
@In("#{messages['removedfromfriendsby']}") private String YOU_ARE_WERE_REMOVED_FROM_FRIENDS_MESSAGE;
-
+ @In("#{messages['friend_error']}")
+ private String FRIEND_ERROR_MESSAGE;
private static final long serialVersionUID = 6027103521084558931L;
@In
@@ -89,7 +90,7 @@
sendAcquireMessage(friend);
}
}else{
- Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception(Constants.FRIEND_ERROR_MESSAGE));
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception(FRIEND_ERROR_MESSAGE));
return;
}
}
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ConversationState.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ConversationState.java 2009-01-27 16:09:34 UTC (rev 12441)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/ConversationState.java 2009-01-27 17:36:47 UTC (rev 12442)
@@ -59,6 +59,9 @@
private static final long serialVersionUID = 5656562187249324512L;
+ @In("#{messages['acess_not_granted']}")
+ private String HAVENT_ACCESS;
+
private Integer selectedImageIndex = 1;
private Image selectedImage;
@@ -137,13 +140,13 @@
public void showImage(Image image){
if(!image.getAlbum().isShared() && !image.getAlbum().getOwner().equals(user) && !user.getFriends().contains(image.getAlbum().getOwner())){
- Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception(Constants.HAVENT_ACCESS));
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception(HAVENT_ACCESS));
return;
}
Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT, NavigationEnum.IMAGE_PREVIEW);
setSelectedAlbum(image.getAlbum());
setSelectedImage(image);
- setDataScrollerIndex(image.getAlbum().getIndex(image));
+ setSelectedImageIndex(image.getAlbum().getIndex(image) + 1);
setSelectedUser(image.getAlbum().getOwner());
}
@@ -154,17 +157,17 @@
setSelectedUser(u);
}
- private void setDataScrollerIndex(int index) {
+ /*private void setDataScrollerIndex(int index) {
UIComponent component = FacesContext.getCurrentInstance().getViewRoot();
UIDatascroller scroller = (UIDatascroller)component.findComponent(Constants.DATASCROLLER_ID);
Map<String, Object> attributes = scroller.getDataTable().getAttributes();
attributes.put(UIDatascroller.SCROLLER_STATE_ATTRIBUTE, index+1);
setSelectedImageIndex(index+1);
- }
+ }*/
public void showAlbum(Album album){
if(!album.isShared() && !album.getOwner().equals(user) && !user.getFriends().contains(album.getOwner())){
- Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception(Constants.HAVENT_ACCESS));
+ Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception(HAVENT_ACCESS));
return;
}
Events.instance().raiseEvent(Constants.UPDATE_MAIN_AREA_EVENT, NavigationEnum.IMAGE_PREVIEW);
@@ -196,7 +199,7 @@
setSelectedUser(a.getOwner());
}
- public void showFileUpload(TreeAlbumItem item, boolean singleMode){
+/* public void showFileUpload(TreeAlbumItem item, boolean singleMode){
String i;
if(singleMode){
i=Constants.SINGLE;
@@ -207,7 +210,7 @@
Events.instance().raiseEvent(Constants.FILE_UPLOAD_CLEAR_EVENT);
setSelectedAlbum(item.getAlbum());
this.setMainArea(NavigationEnum.FILE_UPLOAD);
- }
+ }*/
public void showFileUpload(Album item, boolean singleMode){
String i;
@@ -221,34 +224,7 @@
setSelectedAlbum(item);
this.setMainArea(NavigationEnum.FILE_UPLOAD);
}
-
- public void scrollerListener(DataScrollerEvent event) {
- List<Image> images = getSelectedAlbum().getImages();
- if (event.getNewScrolVal().equals(Constants.PREVIOUS)) {
- for(int index = 0 ; index < images.size(); index++){
- if(images.get(index) ==getSelectedImage()){
- setSelectedImage(images.get(index - 1));
- setSelectedImageIndex(index);
- }
- }
- } else if (event.getNewScrolVal().equals(Constants.LAST)) {
- setSelectedImage(images.get(images.size() - 1));
- setSelectedImageIndex(images.size());
- } else if (event.getNewScrolVal().equals(Constants.NEXT)) {
- for(int index = 0 ; index < images.size(); index++){
- if(images.get(index) == getSelectedImage()){
- setSelectedImage(images.get(index + 1));
- setSelectedImageIndex(index + 2);
- return;
- }
- }
- } else if (event.getNewScrolVal().equals(Constants.FIRST)) {
- setSelectedImage(images.get(0));
- setSelectedImageIndex(1);
- }
- }
-
@SuppressWarnings("unchecked")
public Boolean adviseNodeSelected(UITree tree) {
TreeRowKey<Object> treeRowKey = (TreeRowKey<Object>) tree.getRowKey();
@@ -315,25 +291,93 @@
index = -1;
}
setSelectedImage(getSelectedAlbum().getImages().get(index +1));
- UIComponent component = FacesContext.getCurrentInstance().getViewRoot();
- UIDatascroller scroller = (UIDatascroller)component.findComponent(Constants.DATASCROLLER_ID);
- Map<String, Object> attributes = scroller.getDataTable().getAttributes();
- attributes.put(UIDatascroller.SCROLLER_STATE_ATTRIBUTE, index+2);
setSelectedImageIndex(index+2);
}
- public SelectItem[] getAvailableIndexOfImages(){
+ public boolean isFirstExist(){
+ int index = getSelectedAlbum().getIndex(getSelectedImage());
+ return index > 0;
+ }
+
+ public boolean isLastExist(){
+ int index = getSelectedAlbum().getIndex(getSelectedImage());
+ int size = getSelectedAlbum().getCountImages();
+ return index < size - 1;
+ }
+
+ public boolean isNextExist(){
+ int index = getSelectedAlbum().getIndex(getSelectedImage());
+ int size = getSelectedAlbum().getCountImages();
+ return index < size - 2;
+ }
+
+ public boolean isPrevExist(){
+ int index = getSelectedAlbum().getIndex(getSelectedImage());
+ return index > 0;
+ }
+
+ public void setNextIndex(){
+ int index = getSelectedAlbum().getIndex(getSelectedImage());
+ setSelectedImage(getSelectedAlbum().getImages().get(index +1));
+ setSelectedImageIndex(index+2);
+ }
+
+ public void setPrevIndex(){
+ int index = getSelectedAlbum().getIndex(getSelectedImage());
+ setSelectedImage(getSelectedAlbum().getImages().get(index - 1));
+ setSelectedImageIndex(index - 2);
+ }
+
+ public void setLastIndex(){
+ int size = getSelectedAlbum().getCountImages();
+ setSelectedImage(getSelectedAlbum().getImages().get(size - 1));
+ setSelectedImageIndex(size);
+ }
+
+ public void setFirstIndex(){
+ setSelectedImage(getSelectedAlbum().getImages().get(0));
+ setSelectedImageIndex(1);
+ }
+
+ /*public void scrollerListener(DataScrollerEvent event) {
+ List<Image> images = getSelectedAlbum().getImages();
+ if (event.getNewScrolVal().equals(Constants.PREVIOUS)) {
+ for(int index = 0 ; index < images.size(); index++){
+ if(images.get(index) ==getSelectedImage()){
+ setSelectedImage(images.get(index - 1));
+ setSelectedImageIndex(index);
+ }
+ }
+ } else if (event.getNewScrolVal().equals(Constants.LAST)) {
+ setSelectedImage(images.get(images.size() - 1));
+ setSelectedImageIndex(images.size());
+ } else if (event.getNewScrolVal().equals(Constants.NEXT)) {
+ for(int index = 0 ; index < images.size(); index++){
+ if(images.get(index) == getSelectedImage()){
+ setSelectedImage(images.get(index + 1));
+ setSelectedImageIndex(index + 2);
+ return;
+ }
+ }
+ } else if (event.getNewScrolVal().equals(Constants.FIRST)) {
+ setSelectedImage(images.get(0));
+ setSelectedImageIndex(1);
+ }
+
+ }*/
+
+ /*public SelectItem[] getAvailableIndexOfImages(){
SelectItem[] group = new SelectItem[getSelectedAlbum().getImages().size()];
for(int i = 0; i < getSelectedAlbum().getImages().size(); i++){
group[i] = new SelectItem(i+1);
}
return group;
- }
+ }*/
public void updateSelectedItems(Image image){
setSelectedImage(image);
Integer index = getSelectedAlbum().getIndex(getSelectedImage());
- setDataScrollerIndex(index);
+ setSelectedImageIndex(index+1);
}
public User getSelectedUser() {
Modified: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/RenderLogic.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/RenderLogic.java 2009-01-27 16:09:34 UTC (rev 12441)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/util/RenderLogic.java 2009-01-27 17:36:47 UTC (rev 12442)
@@ -71,7 +71,7 @@
}
public boolean isUserGuest(){
- return identity.hasRole(Constants.GUEST_ROLE);
+ return !identity.hasRole(Constants.ADMIN_ROLE);
}
public boolean shouldRenderFileUpload(){
Modified: trunk/test-applications/realworld/web/src/main/resources/messages_en.properties
===================================================================
--- trunk/test-applications/realworld/web/src/main/resources/messages_en.properties 2009-01-27 16:09:34 UTC (rev 12441)
+++ trunk/test-applications/realworld/web/src/main/resources/messages_en.properties 2009-01-27 17:36:47 UTC (rev 12442)
@@ -157,11 +157,10 @@
scroller.last=Last
scroller.prev=Prev
scroller.next=Next
-scroller.pager.begin=Image
-scroller.pager.end=of #{conversationState.selectedAlbum.images.size}
+scroller.pager=Image #{conversationState.selectedImageIndex} of #{conversationState.selectedAlbum.images.size}
-image.rating=Current Rating: #{record.rank.rating}
-image.numberVotes=Number of votes: #{record.rank.hits}
+image.rating=Current Rating: #{conversationState.selectedImage.rank.rating}
+image.numberVotes=Number of votes: #{conversationState.selectedImage.rank.hits}
image.vote=Vote for this picture
image.vote.short=Vote
image.panelHeader=Image Preview: Selected Album: #{conversationState.selectedAlbum.name}
@@ -255,4 +254,78 @@
nomatter=No Matter
small=Small
medium=Medium
-full=Full size
\ No newline at end of file
+full=Full size
+
+file_processing_error=Error processing occured during upload
+file_saving_error=Error occured during saving image to disk
+invalid_login=Invalid login or password
+login_success=You are successfully registered.
+wrong_dnd=That album isn't yours, so you can't change it's location
+friend_error=This user won't be your friend!
+acess_not_granted=You have no rights to view this album
+invalid_syntax=Invalid syntax
+album_present=Album with this name already present!
+album_deleteFromFavorite=Delete from favorite
+album_show=Show album
+album_reqForFriend=Send owner request for friendship
+album_deleteFromFriends=Delete owner from friends
+album_viewProfile=View profile of owner
+album_sendMessage=Send message for owner
+album_show_all=Show all albums of owner
+album_show_history=Show message history with owner
+
+
+image_showLinks=Show Links
+image_addFavorites=Add to favorite images
+image_deleteFavorites=Remove from favorite images
+image_show_parent=Show parent album
+image_show=Show image
+image_addParentToFavorite=Add parent to favorite albums
+image_removeParentFavorite=Remove parent from favorite albums
+image_showParent=Show parent album
+
+user_profile=View profile
+user_history=Show message history
+user_show_albums=Show albums
+
+fileUpload_choosemode=Choose mode for upload:
+
+camera=Camera
+uploaded=Uploaded at
+size=Size
+dimensions=Dimensions
+sizeInKB=Size in KB
+width=Width
+height=Height
+choose_camera=Choose camera:
+choose_metatag=Choose metatag for search:
+case_sensitive=Case-sensitive search
+tooltip_top=Shared images with maximum rating will be showed
+tooltip_worst=Shared images with minimum rating will be showed
+
+my_albums=My albums
+my_friends=My friends
+content=Content
+closeHistory=Close history
+history=History
+
+errorGeneral=OOOps..... Error happened
+errorDetail=Error: #{error.message}
+
+albums=Albums:
+images=Images:
+my_albums=My albums
+friends_albums=Friend albums
+album=Album:
+owner=Owner:
+metatags=Metatags:
+rating=Rating:
+friends=Friends
+friendsInfo=Friends info
+viewProfile=View profile
+show_albums=Show albums
+show_history=Show message history
+author=Author
+owner=Owner
+linkManagement=Link management
+close=Close
\ No newline at end of file
Modified: trunk/test-applications/realworld/web/src/main/resources/messages_ru.properties
===================================================================
--- trunk/test-applications/realworld/web/src/main/resources/messages_ru.properties 2009-01-27 16:09:34 UTC (rev 12441)
+++ trunk/test-applications/realworld/web/src/main/resources/messages_ru.properties 2009-01-27 17:36:47 UTC (rev 12442)
@@ -97,11 +97,10 @@
scroller.last=\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u044F\u044F
scroller.prev=\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0430\u044F
scroller.next=\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0430\u044F
-scroller.pager.begin=\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435
-scroller.pager.end= \u0438\u0437 \#{conversationState.selectedAlbum.images.size}
+scroller.pager=\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 #{conversationState.selectedImageIndex} \u0438\u0437 \#{conversationState.selectedAlbum.images.size}
-image.rating=\u0422\u0435\u043A\u0443\u0449\u0438\u0439 \u0440\u0435\u0439\u0442\u0438\u043D\u0433\: \#{record.rank.rating}
-image.numberVotes=\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0433\u043E\u043B\u043E\u0441\u043E\u0432\: \#{record.rank.hits}
+image.rating=\u0422\u0435\u043A\u0443\u0449\u0438\u0439 \u0440\u0435\u0439\u0442\u0438\u043D\u0433\: \#{conversationState.selectedImage.rank.rating}
+image.numberVotes=\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0433\u043E\u043B\u043E\u0441\u043E\u0432\: \#{conversationState.selectedImage.rank.hits}
image.vote=\u041F\u0440\u043E\u0433\u043E\u043B\u043E\u0441\u043E\u0432\u0430\u0442\u044C \u0437\u0430 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435
image.vote.short=\u0413\u043E\u043B\u043E\u0441\u043E\u0432\u0430\u0442\u044C
image.panelHeader=\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0439\: \u0412\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u0430\u043B\u044C\u0431\u043E\u043C\: \#{conversationState.selectedAlbum.name}
@@ -196,3 +195,75 @@
small=\u041C\u0430\u043B\u0435\u043D\u044C\u043A\u0430\u044F
medium=\u0421\u0440\u0435\u0434\u043D\u044F\u044F
full=\u041F\u043E\u043B\u043D\u044B\u0439 \u0440\u0430\u0437\u043C\u0435\u0440
+
+file_processing_error=\u041F\u0440\u043E\u0438\u0437\u043E\u0448\u043B\u0430 \u043E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0435 \u0444\u0430\u0439\u043B\u0430
+file_saving_error=\u041F\u0440\u043E\u0438\u0437\u043E\u0448\u043B\u0430 \u043F\u043E\u043F\u044B\u0442\u043A\u0430 \u043F\u0440\u0438 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0438 \u0444\u0430\u0439\u043B\u0430 \u043D\u0430 \u0434\u0438\u0441\u043A
+invalid_login=\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u044B\u0439 \u043B\u043E\u0433\u0438\u043D \u0438\u043B\u0438 \u043F\u0430\u0440\u043E\u043B\u044C
+login_success=\u0412\u044B \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u043D\u044B
+wrong_dnd=\u0412\u044B \u043D\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u043F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C \u044D\u0442\u043E\u0442 \u0430\u043B\u044C\u0431\u043E\u043C, \u0442\u0430\u043A \u043A\u0430\u043A \u043E\u043D \u043D\u0435 \u0432\u0430\u0448
+friend_error=\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C \u043D\u0435 \u0445\u043E\u0447\u0435\u0442 \u0431\u044B\u0442\u044C \u0432\u0430\u0448\u0438\u043C \u0434\u0440\u0443\u0433\u043E\u043C\!
+acess_not_granted=\u0412\u044B \u043D\u0435 \u0438\u043C\u0435\u0435\u0442\u0435 \u043F\u0440\u0430\u0432 \u0434\u043B\u044F \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430 \u044D\u0442\u043E\u0433\u043E \u0430\u043B\u044C\u0431\u043E\u043C\u0430
+invalid_syntax=\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u044B\u0439 \u0441\u0438\u043D\u0442\u0430\u043A\u0441\u0438\u0441
+album_present=\u0410\u043B\u044C\u0431\u043E\u043C \u0441 \u0442\u0430\u043A\u0438\u043C \u0438\u043C\u0435\u043D\u0435\u043C \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442\!
+album_deleteFromFavorite=\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0438\u0437 \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E
+album_show=\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0430\u043B\u044C\u0431\u043E\u043C
+album_reqForFriend=\u041F\u043E\u0441\u043B\u0430\u0442\u044C \u0432\u043B\u0430\u0434\u0435\u043B\u044C\u0446\u0443 \u0437\u0430\u043F\u0440\u043E\u0441 \u043D\u0430 \u0434\u0440\u0443\u0436\u0431\u0443
+album_deleteFromFriends=\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u043B\u0430\u0434\u0435\u043B\u044C\u0446\u0430 \u0438\u0437 \u0441\u043F\u0438\u0441\u043A\u0430 \u0434\u0440\u0443\u0437\u0435\u0439
+album_viewProfile=\u041F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u043F\u0440\u043E\u0444\u0438\u043B\u044C \u0432\u043B\u0430\u0434\u0435\u043B\u044C\u0446\u0430
+album_sendMessage=\u041F\u043E\u0441\u043B\u0430\u0442\u044C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435 \u0432\u043B\u0430\u0434\u0435\u043B\u044C\u0446\u0443 \u0430\u043B\u044C\u0431\u043E\u043C\u0430
+album_show_all=\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0432\u0441\u0435 \u0430\u043B\u044C\u0431\u043E\u043C\u044B \u0432\u043B\u0430\u0434\u0435\u043B\u044C\u0446\u0430
+album_show_history=\u041F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u0438\u0441\u0442\u043E\u0440\u0438\u044E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439 \u0441 \u0432\u043B\u0430\u0434\u0435\u043B\u044C\u0446\u0435\u043C \u0430\u043B\u044C\u0431\u043E\u043C\u0430
+
+
+image_showLinks=\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0441\u0441\u044B\u043B\u043A\u0438
+image_addFavorites=\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u044B\u043C \u0444\u043E\u0442\u043E\u0433\u0440\u0430\u0444\u0438\u044F\u043C
+image_deleteFavorites=\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0438\u0437 \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u044B\u0445 \u043A\u0430\u0440\u0442\u0438\u043D\u043E\u043A
+image_show_parent=\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0430\u043B\u044C\u0431\u043E\u043C, \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435
+image_show=\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435
+image_addParentToFavorite=\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0432 \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u0430\u043B\u044C\u0431\u043E\u043C\u044B
+image_removeParentFavorite=\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0438\u0437 \u0438\u0437\u0431\u0440\u0430\u043D\u043D\u044B\u0445 \u0430\u043B\u044C\u0431\u043E\u043C\u043E\u0432
+image_showParent=\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0430\u043B\u044C\u0431\u043E\u043C, \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435
+
+user_profile=\u041F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u043F\u0440\u043E\u0444\u0438\u043B\u044C
+user_history=\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0438\u0441\u0442\u043E\u0440\u0438\u044E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439
+user_show_albums=\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0430\u043B\u044C\u0431\u043E\u043C\u044B
+
+fileUpload_choosemode=\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0436\u0438\u043C \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0438\:
+
+camera=\u041C\u043E\u0434\u0435\u043B\u044C \u043A\u0430\u043C\u0435\u0440\u044B
+uploaded=\u0414\u0430\u0442\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0438
+size=\u0420\u0430\u0437\u043C\u0435\u0440
+dimensions=\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0435
+sizeInKB=\u0420\u0430\u0437\u043C\u0435\u0440 \u0432 KB
+width=\u0428\u0438\u0440\u0438\u043D\u0430
+height=\u0412\u044B\u0441\u043E\u0442\u0430
+choose_camera=\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043C\u043E\u0434\u0435\u043B\u044C \u043A\u0430\u043C\u0435\u0440\u044B\:
+choose_metatag=\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043C\u0435\u0442\u0430\u0442\u044D\u0433\u0438 \u0434\u043B\u044F \u043F\u043E\u0438\u0441\u043A\u0430\:
+case_sensitive=\u0423\u0447\u0438\u0442\u044B\u0432\u0430\u0442\u044C \u0440\u0435\u0433\u0438\u0441\u0442\u0440
+tooltip_top=\u0411\u0443\u0434\u0443\u0442 \u043F\u043E\u043A\u0430\u0437\u0430\u043D\u044B \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0435 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0438 \u0441 \u043C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u043C \u0440\u0435\u0439\u0442\u0438\u043D\u0433\u043E\u043C
+tooltip_worst=\u0411\u0443\u0434\u0443\u0442 \u043F\u043E\u043A\u0430\u0437\u0430\u043D\u044B \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0435 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0438 \u0441 \u043C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u043C \u0440\u0435\u0439\u0442\u0438\u043D\u0433\u043E\u043C
+
+my_albums=\u041C\u043E\u0438 \u0430\u043B\u044C\u0431\u043E\u043C\u044B
+my_friends=\u041C\u043E\u0438 \u0434\u0440\u0443\u0437\u044C\u044F
+content=\u0421\u043E\u0434\u0435\u0440\u0436\u0430\u043D\u0438\u0435
+closeHistory=\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u0438\u0441\u0442\u043E\u0440\u0438\u044E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439
+history=\u0418\u0441\u0442\u043E\u0440\u0438\u044F \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439
+
+errorGeneral=\u0443\u043F\u0441....\u041F\u0440\u043E\u0438\u0437\u043E\u0448\u043B\u0430 \u043E\u0448\u0438\u0431\u043A\u0430
+errorDetail=\u041E\u0448\u0438\u0431\u043A\u0430\: \#{error.message}
+
+albums=\u0418\u0437\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u0430\u043B\u044C\u0431\u043E\u043C\u044B\:
+images=\u0418\u0437\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u0438\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F\:
+friends_albums=\u0410\u043B\u044C\u0431\u043E\u043C\u044B \u0434\u0440\u0443\u0437\u0435\u0439
+album=\u0410\u043B\u044C\u0431\u043E\u043C\:
+owner=\u0412\u043B\u0430\u0434\u0435\u043B\u0435\u0446
+metatags=\u041C\u0435\u0442\u0430\u0442\u044D\u0433\u0438\:
+rating=\u0420\u0435\u0439\u0442\u0438\u043D\u0433\:
+friends=\u0414\u0440\u0443\u0437\u044C\u044F
+friendsInfo=\u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F \u043E \u0434\u0440\u0443\u0437\u044C\u044F\u0445
+viewProfile=\u041F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u043F\u0440\u043E\u0444\u0438\u043B\u044C
+show_albums=\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0430\u043B\u044C\u0431\u043E\u043C\u044B
+show_history=\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0438\u0441\u0442\u043E\u0440\u0438\u044E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439
+author=\u0410\u0432\u0442\u043E\u0440
+linkManagement=\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0441\u0441\u044B\u043B\u043A\u0430\u043C\u0438
+close=\u0417\u0430\u043A\u0440\u044B\u0442\u044C
\ No newline at end of file
Modified: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/image.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/linkPanel.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/contextMenu/CMForAlbum.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/contextMenu/CMForImage.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/contextMenu/CMForUser.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload/chooseMode.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload/singleMode.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/image/breadCrumb.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/image/imageScroller.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/image/mainImage.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/imagePreview.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/message/history.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/message/incoming.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/message/outcoming.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/messages.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/misc/errorPanel.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/panelBar/favoriteAlbums.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/panelBar/tree.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/panelBar/treeFriends.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/search/advancedSearch.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/search/searchResults.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/userPrefs/friendTab.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/userPrefs/loginPrefsTab.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/userPrefs/userPrefsTab.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/userPrefs.xhtml
===================================================================
(Binary files differ)
15 years, 3 months
JBoss Rich Faces SVN: r12441 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2009-01-27 11:09:34 -0500 (Tue, 27 Jan 2009)
New Revision: 12441
Modified:
trunk/docs/userguide/en/src/main/resources/images/modalPanel3.png
Log:
Modified: trunk/docs/userguide/en/src/main/resources/images/modalPanel3.png
===================================================================
(Binary files differ)
15 years, 3 months
JBoss Rich Faces SVN: r12440 - in trunk/test-applications/seleniumTest/richfaces/src: test/java/org/richfaces and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2009-01-27 11:03:24 -0500 (Tue, 27 Jan 2009)
New Revision: 12440
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSpinner/inputNumberSpinnerAutoTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSpinner/inputNumberSpinnerTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java
Log:
https://jira.jboss.org/jira/browse/RF-5886
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSpinner/inputNumberSpinnerAutoTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/inputNumberSpinner/inputNumberSpinnerTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2009-01-27 15:59:21 UTC (rev 12439)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2009-01-27 16:03:24 UTC (rev 12440)
@@ -495,32 +495,41 @@
Assert.fail("Converter attribute does not work: getAsObject method failed of converter was not triggered. Expected component value: ["+AutoTestBean.AutoTestConverter.AS_OBJECT_STRING+"]. But was: ["+value+"]");
}
}
-
- public void testValidatorAndValidatorMessageAttributes() {
- setInternalValidation(true);
- clickLoad();
-
- changeValue();
- clickSubmit();
-
- String validatorMessage = getValidatorMessage();
- if (!"".equals(validatorMessage)) {
- Assert.fail("Validator attribute does not work. Validation failed, but should not.");
- }
-
- setInternalValidation(false);
- clickLoad();
-
- changeValue();
- clickSubmit();
-
- validatorMessage = getValidatorMessage();
- if ("".equals(validatorMessage)) {
- Assert.fail("Validator attribute does not work. Validation passed, should be failed.");
- }else if (!AutoTestBean.VALIDATOR_MESSAGE.equals(validatorMessage)) {
- Assert.fail("ValidatorMessage attribute does not work. ValidationMessage expected: [" + AutoTestBean.VALIDATOR_MESSAGE+"].But was [" + validatorMessage + "]");
- }
-
+
+ public void testValidatorAndValidatorMessageAttributes(boolean checkListener) {
+ reset();
+ setInternalValidation(true);
+ clickLoad();
+
+ changeValue();
+ clickSubmit();
+
+ String validatorMessage = getValidatorMessage();
+ if (!"".equals(validatorMessage)) {
+ Assert.fail("Validator attribute does not work. Validation failed, but should not.");
+ }
+
+ if (checkListener) {
+ checkValueChangeListener(true);
+ }
+
+ setInternalValidation(false);
+ clickLoad();
+
+ changeValue();
+ clickSubmit();
+
+ validatorMessage = getValidatorMessage();
+ if ("".equals(validatorMessage)) {
+ Assert.fail("Validator attribute does not work. Validation passed, should be failed.");
+ } else if (!AutoTestBean.VALIDATOR_MESSAGE.equals(validatorMessage)) {
+ Assert.fail("ValidatorMessage attribute does not work. ValidationMessage expected: ["
+ + AutoTestBean.VALIDATOR_MESSAGE + "].But was [" + validatorMessage + "]");
+ }
+
+ if (checkListener) {
+ checkValueChangeListener(false);
+ }
}
public void checkActionListener(boolean passed) {
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2009-01-27 15:59:21 UTC (rev 12439)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/CalendarTest.java 2009-01-27 16:03:24 UTC (rev 12440)
@@ -769,7 +769,7 @@
AutoTester tester = getAutoTester(this);
tester.renderPage(template, RESET_METHOD);
calendarId = tester.getClientId(AutoTester.COMPONENT_ID, template);
- tester.testValidatorAndValidatorMessageAttributes();
+ tester.testValidatorAndValidatorMessageAttributes(false);
}
@Test
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java 2009-01-27 15:59:21 UTC (rev 12439)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java 2009-01-27 16:03:24 UTC (rev 12440)
@@ -82,20 +82,28 @@
tester.testSubmitImmediate();
}
+ @Test
+ public void testValidatorAndValidatorMessageAttributes(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, RESET_METHOD);
+ writeStatus("Check validator and validatorMessage attributes");
+ tester.testValidatorAndValidatorMessageAttributes(true);
+ }
+
private void clickUp() {
- String id = getParentId() + FORM_ID + "spinnerButtons";
+ String id = getParentId() + FORM_ID + "componentIdButtons";
selenium.fireEvent("xpath=//table[@id='" + id + "']/tbody/tr[1]/td", "mousedown");
selenium.fireEvent("xpath=//table[@id='" + id + "']/tbody/tr[1]/td", "mouseup");
}
private void clickDown() {
- String id = getParentId() + FORM_ID + "spinnerButtons";
+ String id = getParentId() + FORM_ID + "componentIdButtons";
selenium.fireEvent("xpath=//table[@id='" + id + "']/tbody/tr[2]/td", "mousedown");
selenium.fireEvent("xpath=//table[@id='" + id + "']/tbody/tr[2]/td", "mouseup");
}
private String getSpinnerValue() {
- return selenium.getValue("name=" + getParentId() + FORM_ID + "spinner");
+ return selenium.getValue("name=" + getParentId() + FORM_ID + "componentId");
}
@Override
15 years, 3 months
JBoss Rich Faces SVN: r12439 - in trunk/test-applications/realworld/web/src/main/webapp: META-INF/skins and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2009-01-27 10:59:21 -0500 (Tue, 27 Jan 2009)
New Revision: 12439
Added:
trunk/test-applications/realworld/web/src/main/webapp/META-INF/skins/
trunk/test-applications/realworld/web/src/main/webapp/META-INF/skins/realworld.skin.properties
trunk/test-applications/realworld/web/src/main/webapp/layout/menu.xhtml
Removed:
trunk/test-applications/realworld/web/src/main/webapp/layout/menu.xhtml
Modified:
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/web.xml
trunk/test-applications/realworld/web/src/main/webapp/layout/template2.xhtml
trunk/test-applications/realworld/web/src/main/webapp/stylesheet/realworld2.css
Log:
Redesign realworld application
Added: trunk/test-applications/realworld/web/src/main/webapp/META-INF/skins/realworld.skin.properties
===================================================================
--- trunk/test-applications/realworld/web/src/main/webapp/META-INF/skins/realworld.skin.properties (rev 0)
+++ trunk/test-applications/realworld/web/src/main/webapp/META-INF/skins/realworld.skin.properties 2009-01-27 15:59:21 UTC (rev 12439)
@@ -0,0 +1,75 @@
+#Colors
+headerBackgroundColor=#000000
+headerGradientColor=#F2F7FF
+headerTextColor=#000000
+headerWeightFont=bold
+
+generalBackgroundColor=#D7D7D7
+generalTextColor=#000000
+generalSizeFont=11px
+generalFamilyFont=Arial, Verdana, sans-serif
+
+controlTextColor=#000000
+controlBackgroundColor=#ffffff
+additionalBackgroundColor=#ECF4FE
+
+shadowBackgroundColor=#000000
+shadowOpacity=1
+
+panelBorderColor=#000000
+subBorderColor=#ffffff
+
+tabBackgroundColor=#C6DEFF
+tabDisabledTextColor=#8DB7F3
+
+trimColor=#D6E6FB
+
+tipBackgroundColor=#FAE6B0
+tipBorderColor=#E5973E
+
+selectControlColor=#E79A00
+
+
+generalLinkColor=#0078D0
+hoverLinkColor=#0090FF
+visitedLinkColor=#0090FF
+
+# Fonts
+headerSizeFont=11px
+headerFamilyFont=Arial, Verdana, sans-serif
+
+tabSizeFont=11
+tabFamilyFont=Arial, Verdana, sans-serif
+
+buttonSizeFont=11
+buttonFamilyFont=Arial, Verdana, sans-serif
+
+
+tableBackgroundColor=#D7D7D7
+tableFooterBackgroundColor=#cccccc
+tableSubfooterBackgroundColor=#f1f1f1
+tableBorderColor=#C0C0C0
+tableBorderWidth=1px
+
+
+#Calendar colors
+calendarWeekBackgroundColor=#F5F5F5
+
+calendarHolidaysBackgroundColor=#FFEBDA
+calendarHolidaysTextColor=#FF7800
+
+calendarCurrentBackgroundColor=#FF7800
+calendarCurrentTextColor=#FFEBDA
+
+calendarSpecBackgroundColor=#E4F5E2
+calendarSpecTextColor=#000000
+
+
+warningColor=#FFE6E6
+warningBackgroundColor=#FF0000
+
+editorBackgroundColor=#F1F1F1
+editBackgroundColor=#FEFFDA
+
+#Gradients
+gradientType=plain
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/META-INF/skins/realworld.skin.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Modified: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/web.xml 2009-01-27 15:46:10 UTC (rev 12438)
+++ trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/web.xml 2009-01-27 15:59:21 UTC (rev 12439)
@@ -25,9 +25,9 @@
</filter-mapping>
<context-param>
- <param-name>org.richfaces.SKIN</param-name>
- <param-value>blueSky</param-value>
- </context-param>
+ <param-name>org.richfaces.SKIN</param-name>
+ <param-value>realworld</param-value>
+ </context-param>
<context-param>
<param-name>facelets.LIBRARIES</param-name>
Deleted: trunk/test-applications/realworld/web/src/main/webapp/layout/menu.xhtml
===================================================================
(Binary files differ)
Added: trunk/test-applications/realworld/web/src/main/webapp/layout/menu.xhtml
===================================================================
--- trunk/test-applications/realworld/web/src/main/webapp/layout/menu.xhtml (rev 0)
+++ trunk/test-applications/realworld/web/src/main/webapp/layout/menu.xhtml 2009-01-27 15:59:21 UTC (rev 12439)
@@ -0,0 +1,68 @@
+<!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">
+ <a4j:form id="menuform">
+
+ <rich:toolBar height="37" styleClass="main-menu-toolbar" id="menu" contentClass="main-menu-toolbar-content">
+
+ <rich:toolBarGroup >
+ <h:graphicImage rendered="#{!renderLogic.isUserGuest()}"
+ value="/img/shell/general_panelbar_bullet.gif" />
+ <h:graphicImage height="30"
+ rendered="#{!renderLogic.isUserGuest() and messageManager.countUnreadedMessages > 0}"
+ value="/img/icons/message.gif">
+ <rich:toolTip followMouse="true" direction="top-right"
+ showDelay="100" styleClass="tooltip">
+ <span style="white-space: nowrap">
+ #{messages['menu.message.tooltip']}</span>
+ </rich:toolTip>
+ </h:graphicImage>
+ <a4j:commandLink rendered="#{!renderLogic.isUserGuest()}"
+ value="#{messages['menu.messages']}"
+ actionListener="#{conversationState.setMainArea(navigationHelper.navigationEnumReadMessages)}"
+ reRender="mainform:mainArea" />
+ <h:graphicImage rendered="#{!renderLogic.isUserGuest()}"
+ value="/img/shell/general_panelbar_bullet.gif" />
+ <a4j:commandLink value="#{messages['menu.search']}"
+ actionListener="#{conversationState.setMainArea(navigationHelper.navigationEnumSearch)}"
+ reRender="mainform:mainArea" />
+ <h:graphicImage rendered="#{!renderLogic.isUserGuest()}"
+ value="/img/shell/general_panelbar_bullet.gif" />
+ <a4j:commandLink rendered="#{!renderLogic.isUserGuest()}"
+ value="#{messages['menu.image']}"
+ actionListener="#{conversationState.setMainArea(navigationHelper.navigationEnumImagePreview)}"
+ reRender="mainform:mainArea" />
+ <h:graphicImage rendered="#{!renderLogic.isUserGuest()}"
+ value="/img/shell/general_panelbar_bullet.gif" />
+ <a4j:commandLink rendered="#{!renderLogic.isUserGuest()}"
+ value="#{messages['menu.user']}"
+ actionListener="#{conversationState.showUserProfile(user)}"
+ reRender="mainform:mainArea" />
+ <h:graphicImage rendered="#{!renderLogic.isUserGuest()}"
+ value="/img/shell/general_panelbar_bullet.gif" />
+ <a4j:commandLink rendered="#{!renderLogic.isUserGuest()}"
+ value="#{messages['menu.file']}"
+ actionListener="#{treeManager.setMainArea(navigationHelper.navigationEnumFileUpload)}"
+ reRender="mainform:mainArea" />
+ </rich:toolBarGroup>
+ <rich:toolBarGroup location="right">
+ <h:panelGroup>
+ <h:commandLink action="#{localeSelector.selectLanguage('en')}">
+ <h:graphicImage url="/img/gb.png" />
+ </h:commandLink>
+
+ <h:commandLink action="#{localeSelector.selectLanguage('ru')}">
+ <h:graphicImage url="/img/ru.png" />
+ </h:commandLink>
+ </h:panelGroup>
+ </rich:toolBarGroup>
+ </rich:toolBar>
+ </a4j:form>
+</ui:composition>
\ No newline at end of file
Modified: trunk/test-applications/realworld/web/src/main/webapp/layout/template2.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/stylesheet/realworld2.css
===================================================================
--- trunk/test-applications/realworld/web/src/main/webapp/stylesheet/realworld2.css 2009-01-27 15:46:10 UTC (rev 12438)
+++ trunk/test-applications/realworld/web/src/main/webapp/stylesheet/realworld2.css 2009-01-27 15:59:21 UTC (rev 12439)
@@ -4,10 +4,17 @@
height: 100%;
}
-.header-div {
+.header-panel {
height: 116px;
+ border: none;
+ padding: 0px;
+ background: none;
}
+.header-panel-body {
+ padding: 0px;
+}
+
.header-content-div {
height: 79px;
position: relative;
@@ -27,6 +34,11 @@
top: 14px;
}
+.top-right-menu-toolbar {
+ background: none;
+ border: none;
+}
+
.top-right-menu-item {
vertical-align: top;
}
@@ -38,31 +50,43 @@
font-weight: normal;
}
-.main-menu {
+.main-menu-panel {
height: 37px;
position: relative;
+ border: none;
+ padding: 0px;
background: url(../img/shell/general_panelbar_bg.gif) repeat-x #A84807;
- padding-left: 15px;
}
-.body-main-div {
+.main-menu-panel-body {
+ border: none;
+ padding: 0px;
+}
+
+.body-main-panel {
background: url(../img/shell/general_panel_bg.gif) right top repeat-y;
height: 100%;
+ padding: 0px;
+ border: none;
}
-.body-main-div-top {
+.body-main-panel-header {
height: 15px;
background: url(../img/shell/general_panel_header_bg.gif) right top;
font-size: 1px;
+ padding: 0px;
+ border: none;
}
-.footer-div {
+.footer-panel {
height: 82px;
position: relative;
background: url(../img/shell/footer_bg.gif) repeat-x #000000;
+ border: none;
+ padding: 0px;
}
-.footer-div-content {
+.footer-panel-content {
position: absolute;
left: 8px;
top: 51px;
15 years, 3 months