JBoss Rich Faces SVN: r12397 - trunk/test-applications/realworld/web/src/main/webapp/img.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-01-23 08:46:53 -0500 (Fri, 23 Jan 2009)
New Revision: 12397
Removed:
trunk/test-applications/realworld/web/src/main/webapp/img/Thumbs.db
Log:
Deleted: trunk/test-applications/realworld/web/src/main/webapp/img/Thumbs.db
===================================================================
(Binary files differ)
15 years, 11 months
JBoss Rich Faces SVN: r12396 - in trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld: modalpanel and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-01-23 08:45:49 -0500 (Fri, 23 Jan 2009)
New Revision: 12396
Added:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/
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/ConfirmationPopupHelper.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/ImagePopupHelper.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/LinkBuilder.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/test.java
Log:
Added items remotely
E:\richfaces\test-applications\realworld\web\src\main\java\org\richfaces\realworld\modalpanel
Added: 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 (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/AlbumPopupHelper.java 2009-01-23 13:45:49 UTC (rev 12396)
@@ -0,0 +1,109 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+package org.richfaces.realworld.modalpanel;
+
+import java.io.Serializable;
+
+import javax.faces.event.ActionEvent;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Out;
+import org.jboss.seam.annotations.Scope;
+import org.richfaces.realworld.domain.Album;
+import org.richfaces.realworld.manager.AlbumManager;
+
+@Name("albumPopupHelper")
+(a)Scope(ScopeType.CONVERSATION)
+public class AlbumPopupHelper implements Serializable{
+
+ private static final long serialVersionUID = 2561824019376412988L;
+
+ private String caption;
+
+ private String actionName;
+
+ @In(create=true, required=true) @Out
+ private Album album;
+
+ private Album parent;
+
+ @In(create=true, required=true)
+ private AlbumManager albumManager;
+
+ public void initAlbumData( String actionName, String caption, Album album){
+ this.caption = caption;
+ this.actionName = actionName;
+ if(null != album){
+ this.album = album;
+ this.parent = album.getParent();
+ }else{
+ this.album = new Album();
+ this.parent = null;
+ }
+
+ }
+
+ public void initAlbumData( String actionName, String caption, Album album, Album parent){
+ this.caption = caption;
+ this.actionName = actionName;
+ if(null != album){
+ this.album = album;
+ }else{
+ this.album = new Album();
+ }
+ this.parent= parent;
+ }
+
+ public void editAlbum(ActionEvent event){
+ albumManager.editAlbum(this.album);
+ }
+
+ public String getCaption() {
+ return caption;
+ }
+
+ public void setCaption(String caption) {
+ this.caption = caption;
+ }
+
+ public String getActionName() {
+ return actionName;
+ }
+
+ public void setActionName(String actionName) {
+ this.actionName = actionName;
+ }
+
+ public void addAlbum(ActionEvent event){
+ this.album.setParent(parent);
+ albumManager.addAlbum();
+ }
+
+ public Album getParent() {
+ return parent;
+ }
+
+ public void setParent(Album parent) {
+ this.parent = parent;
+ }
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/AlbumPopupHelper.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/ConfirmationPopupHelper.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/ConfirmationPopupHelper.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/ConfirmationPopupHelper.java 2009-01-23 13:45:49 UTC (rev 12396)
@@ -0,0 +1,106 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+package org.richfaces.realworld.modalpanel;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+
+import javax.faces.event.ActionEvent;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Out;
+import org.jboss.seam.annotations.Scope;
+import org.richfaces.realworld.domain.Album;
+import org.richfaces.realworld.domain.Image;
+import org.richfaces.realworld.domain.MetaTag;
+import org.richfaces.realworld.manager.AlbumManager;
+import org.richfaces.realworld.manager.ImageManager;
+
+@Name("confirmationPopupHelper")
+(a)Scope(ScopeType.CONVERSATION)
+public class ConfirmationPopupHelper implements Serializable{
+
+ private static final long serialVersionUID = 2561824019376412988L;
+
+ private String caption;
+
+ private String actionName;
+
+ @In(create=true, required=true) @Out(required=false)
+ private Image image;
+
+ @In(create=true, required=true) @Out(required=false)
+ private Album album;
+
+ @In(create=true, required=true)
+ private AlbumManager albumManager;
+
+ @In(create=true, required=true)
+ private ImageManager imageManager;
+
+ public void initImagePopup( String actionName, String caption, Image image){
+ this.caption = caption;
+ this.actionName = actionName;
+ if(null != image){
+ this.image = image;
+ image.setMeta(new ArrayList<MetaTag>(image.getTags()));
+ }else{
+ this.image = new Image();
+ }
+ }
+
+ public void initAlbumData( String actionName, String caption, Album album){
+ this.caption = caption;
+ this.actionName = actionName;
+ if(null != album){
+ this.album = album;
+ }else{
+ this.album = new Album();
+ }
+ }
+
+ public void deleteAlbum(ActionEvent event){
+ albumManager.deleteAlbum(this.album);
+ }
+
+ public String getCaption() {
+ return caption;
+ }
+
+ public void setCaption(String caption) {
+ this.caption = caption;
+ }
+
+ public String getActionName() {
+ return actionName;
+ }
+
+ public void setActionName(String actionName) {
+ this.actionName = actionName;
+ }
+
+ public void deleteImage(ActionEvent event){
+ imageManager.deleteImage(this.image);
+ }
+
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/ConfirmationPopupHelper.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/ImagePopupHelper.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/ImagePopupHelper.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/ImagePopupHelper.java 2009-01-23 13:45:49 UTC (rev 12396)
@@ -0,0 +1,61 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+package org.richfaces.realworld.modalpanel;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+
+import javax.faces.event.ActionEvent;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Out;
+import org.jboss.seam.annotations.Scope;
+import org.richfaces.realworld.domain.Image;
+import org.richfaces.realworld.domain.MetaTag;
+import org.richfaces.realworld.manager.ImageManager;
+
+@Name("imagePopupHelper")
+(a)Scope(ScopeType.CONVERSATION)
+public class ImagePopupHelper implements Serializable{
+
+ private static final long serialVersionUID = 2561824019376412988L;
+
+ @In(create=true, required=true) @Out
+ private Image image;
+
+ @In(create=true, required=true)
+ private ImageManager imageManager;
+
+ public void initImagePopup(Image image){
+ if(null != image){
+ this.image = image;
+ image.setMeta(new ArrayList<MetaTag>(image.getTags()));
+ }else{
+ this.image = new Image();
+ }
+ }
+
+ public void editImage(ActionEvent event){
+ imageManager.editImage(this.image);
+ }
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/ImagePopupHelper.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/LinkBuilder.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/LinkBuilder.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/LinkBuilder.java 2009-01-23 13:45:49 UTC (rev 12396)
@@ -0,0 +1,116 @@
+package org.richfaces.realworld.modalpanel;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.context.FacesContext;
+import javax.faces.model.SelectItem;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletRequest;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+
+@Name("linkBuilder")
+(a)Scope(ScopeType.CONVERSATION)
+public class LinkBuilder implements Serializable{
+
+ private static final long serialVersionUID = 2561824019376412988L;
+ private static final String MINI_FORMAT = "_mini";
+ private static final String MEDIUM_FORMAT = "_medium";
+ @In("#{messages['small']}") private String SMALL;
+ @In("#{messages['medium']}") private String MEDIUM;
+ @In("#{messages['full']}") private String FULL;
+ private Long scaleChoice = 1L;
+ private String generatedLink;
+ private String currentFormat = URL;
+ private String path;
+ private static String URL = "URL";
+ private static String HTML = "HTML";
+ private static String FORUM = "Forum";
+ private static String HTML_PATTERN = "<a href='%s'><img src='%s' border='0'></a>";
+ private static String FORUM_PATTERN = "[URL=%s][IMG]%s[/IMG][/URL]";
+
+ public String getGeneratedLink() {
+
+ ServletRequest servletRequest = ((ServletRequest)(FacesContext.getCurrentInstance().getExternalContext().getRequest()));
+ ServletContext s = (ServletContext)(FacesContext.getCurrentInstance().getExternalContext().getContext());
+ String protocol = servletRequest.getProtocol().equals("HTTP/1.1") || servletRequest.getProtocol().equals("HTTP/1.0") ? "http://" : "https://" ;
+ String servletPath = protocol + servletRequest.getLocalAddr() + ":" + servletRequest.getLocalPort() + s.getContextPath();
+ String link = null;
+ String tempPath = null;
+ if(getScaleChoice() == 3L){
+ tempPath = MINI_FORMAT;
+ }else if(getScaleChoice() == 2L){
+ tempPath = MEDIUM_FORMAT;
+ }else if(getScaleChoice() == 1L){
+ tempPath="";
+ }
+ if(null == path){
+ return "";
+ }
+ if(getCurrentFormat().equals(URL)){
+ link = servletPath + "/picture/" + transformPath(path, tempPath);
+ }else
+ if(getCurrentFormat().equals(HTML)){
+ link = String.format(HTML_PATTERN, servletPath, servletPath+ "/pictures/" + transformPath(path, tempPath));
+ }else
+ if(getCurrentFormat().equals(FORUM)){
+ link = String.format(FORUM_PATTERN, servletPath, servletPath+ "/pictures/" + transformPath(path, tempPath));
+ }
+ return link;
+ }
+
+ private String transformPath(String target, String substitute){
+ String begin = target.substring(0, target.lastIndexOf("."));
+ String end = target.substring(target.lastIndexOf("."));
+ return begin + substitute + end;
+ }
+
+ public void setGeneratedLink(String generatedLink) {
+ this.generatedLink = generatedLink;
+ }
+
+ public List<SelectItem> getItems() {
+ List<SelectItem> list = new ArrayList<SelectItem>(4);
+ list.add(new SelectItem(Long.valueOf(1L), FULL));
+ list.add(new SelectItem(Long.valueOf(2L), MEDIUM));
+ list.add(new SelectItem(Long.valueOf(3L), SMALL));
+ return list;
+ }
+
+ public Long getScaleChoice() {
+ return scaleChoice;
+ }
+
+ public void setScaleChoice(Long scaleChoice) {
+ this.scaleChoice = scaleChoice;
+ }
+
+ public void selectFormat(String format){
+ setCurrentFormat(format);
+ }
+
+ public String getCurrentFormat() {
+ return currentFormat;
+ }
+
+ public void setCurrentFormat(String currentFormat) {
+ this.currentFormat = currentFormat;
+ }
+
+ public String getPath() {
+ return path;
+ }
+
+ public void setPath(String path) {
+ this.path = path;
+ }
+
+ public void setScale(Long choice){
+ setScaleChoice(choice);
+ }
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/LinkBuilder.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/test.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/test.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/test.java 2009-01-23 13:45:49 UTC (rev 12396)
@@ -0,0 +1,246 @@
+package org.richfaces.realworld.modalpanel;
+
+import java.awt.Graphics2D;
+import java.awt.RenderingHints;
+import java.awt.geom.AffineTransform;
+import java.awt.image.AffineTransformOp;
+import java.awt.image.BufferedImage;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.imageio.ImageIO;
+
+import org.richfaces.realworld.domain.Album;
+import org.richfaces.realworld.domain.Image;
+
+public class test {
+
+ /**
+ * @param args
+ * @throws IOException
+ */
+ public static void main(String[] args) throws IOException {
+ //String directory ="C:\\Documents and Settings\\Administrator\\Desktop\\Fun";
+ //writeFiles(directory, "_mini", 100, 100);
+ //transform();
+ //String oldDirectory = "E:\\richfaces\\test-applications\\realworld\\Upload\\amarkhel\\Cars\\Child2";
+ //String newDirectory = "E:\\richfaces\\test-applications\\realworld\\Upload\\amarkhel\\Cars\\Child1\\Child2";
+ //renameDirectory(oldDirectory, newDirectory);
+
+ //Album a = init();
+ //renameAllImagesFromAlbumAndChilds(a, "Album", "Albums/Album");
+ String s1 = "amarkhel+qwe";
+ String s2 = "amarkhel-qwe+rich";
+ String s3 = "amarkhel";
+ String s4 = "";
+ String s5 = "+amarkhel";
+ String s6 = "a+b";
+ String s7 = "as+we+dfg-ret-df+deee-dff+ffgh";
+ ArrayList<String> a = new ArrayList<String>();
+ ArrayList<String> b = new ArrayList<String>();
+
+ //parse(s1, a, b);
+ a.clear();
+ b.clear();
+ //parse(s2, a, b);
+ a.clear();
+ b.clear();
+ //parse(s3, a, b);
+ a.clear();
+ b.clear();
+ //parse(s4, a, b);
+ a.clear();
+ b.clear();
+ //parse(s5, a, b);
+ a.clear();
+ b.clear();
+ //parse(s6, a, b);
+ a.clear();
+ b.clear();
+ //parse(s7, a, b);
+ a.clear();
+ b.clear();
+ }
+
+ private static Album init() {
+ Album a = new Album();
+ a.setName("Album");
+ Album a1 = new Album();
+ a1.setName("Album1");
+ Album a2 = new Album();
+ a2.setName("Album2");
+ Album a3 = new Album();
+ a3.setName("Album3");
+ Image i = new Image();
+ i.setPath("user/amarkhel/Album/i.jpg");
+ Image i1 = new Image();
+ i1.setPath("user/amarkhel/Album/Album1/i1.jpg");
+ Image i2 = new Image();
+ i2.setPath("user/amarkhel/Album/Album1/Album2/i2.jpg");
+ Image i3 = new Image();
+ i3.setPath("user/amarkhel/Album/Album3/i3.jpg");
+
+ a.addImage(i);
+ a1.addImage(i1);
+ a2.addImage(i2);
+ a3.addImage(i3);
+ a1.addChildAlbum(a2);
+ a.addChildAlbum(a1);
+ a.addChildAlbum(a3);
+ return a;
+ }
+
+ public static void renameAllImagesFromAlbumAndChilds(Album album, String replace,
+ String forReplace) {
+ for(Image image: album.getImages()){
+ System.out.println(image.getPath());
+ image.setPath(image.getPath().replaceAll(replace, forReplace));
+ System.out.println(image.getPath());
+ }
+
+ for(Album a:album.getChildAlbums()){
+ String replace2 = replace + "/" + a.getName();
+ String forReplace2 = forReplace + "/" + a.getName();
+ renameAllImagesFromAlbumAndChilds(a, replace2, forReplace2);
+ }
+ }
+
+ private static void writeFiles(String directory, String pattern, int width, int height) {
+ File f = new File(directory);
+ for(String s: f.list()){
+ File temp = new File(directory +"\\"+ s);
+ if(temp.isDirectory() && !(directory +"\\"+ s).endsWith("avatars")){
+ writeFiles(directory +"\\"+ s,pattern, width, height);
+ }
+ if(s.endsWith(".jpg") && !s.endsWith("_mini.jpg")&& !s.endsWith("_medium.jpg")){
+ BufferedImage bsrc =null;
+ try {
+ bsrc = ImageIO.read(temp);
+ } catch (IOException e1) {
+ // TODO Auto-generated catch block
+ e1.printStackTrace();
+ }
+ BufferedImage bdest = new BufferedImage(width, height,
+ BufferedImage.TYPE_INT_RGB);
+ Graphics2D g = bdest.createGraphics();
+ int width2 = bsrc.getWidth();
+ int height2 = bsrc.getHeight();
+ double d = (double) width
+ / width2;
+ double e = (double) height / height2;
+ AffineTransform at = AffineTransform.getScaleInstance(d, e);
+ Map<RenderingHints.Key, Object> hints = new HashMap<RenderingHints.Key, Object>();
+ hints.put(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
+ g.addRenderingHints(hints);
+ g.drawRenderedImage(bsrc, at);
+ String dest = transformPath(directory +"\\"+ s, pattern);
+ try {
+ ImageIO.write(bdest, "JPG", new File(dest));
+ } catch (IOException ex) {
+ // TODO Auto-generated catch block
+ ex.printStackTrace();
+ }
+ }
+ }
+ }
+
+ private static String transformPath(String target, String substitute){
+ String begin = target.substring(0, target.lastIndexOf("."));
+ String end = target.substring(target.lastIndexOf("."));
+ return begin + substitute + end;
+ }
+
+ private boolean parse(String str, List<String> adds, List<String> removes){
+ str = str.trim();
+ if(str.startsWith("+") || str.startsWith("-") || str.endsWith("+") || str.endsWith("-") || str.length() == 0){
+ System.out.println("Error");
+ return false;
+ }
+ if(str.lastIndexOf('+')==-1 && str.lastIndexOf('-')==-1){
+ adds.add(str);
+ return false;
+ }
+ int curIndex=0;
+ int prevIndex=0;
+ boolean prevSignplus =true;
+ boolean signedPreviousChar = false;
+ for(int i =0; i< str.length(); i++){
+ char c = str.charAt(i);
+ if(c == '+' ){
+ if(signedPreviousChar == false){
+
+ curIndex = i;
+ if(prevSignplus){
+ if(prevIndex ==0){
+ adds.add(str.substring(prevIndex, curIndex));
+ }else{
+ adds.add(str.substring(prevIndex+1, curIndex));
+ }
+ }else{
+ removes.add(str.substring(prevIndex+1, curIndex));
+ }
+ prevSignplus=true;
+ signedPreviousChar=true;
+ prevIndex =i;
+ }else {
+ System.out.println("Error");
+ return false;
+ }
+
+ }else if(c == '-'){
+ if(signedPreviousChar == false){
+ curIndex = i;
+ signedPreviousChar=true;
+ if(prevSignplus){
+ if(prevIndex ==0){
+ adds.add(str.substring(prevIndex, curIndex));
+ }else{
+ adds.add(str.substring(prevIndex+1, curIndex));
+ }
+ }else{
+ removes.add(str.substring(prevIndex+1, curIndex));
+ }
+ prevSignplus=false;
+
+ prevIndex =i;
+ }else {
+ System.out.println("Error");
+ return false;
+ }
+ }else{
+ signedPreviousChar=false;
+ }
+ }
+ char c2 = str.charAt(prevIndex);
+ if(c2 == '+'){
+ adds.add(str.substring(prevIndex+1));
+ }else if(c2 == '-'){
+ removes.add(str.substring(prevIndex+1));
+ }
+ adds.remove(0);
+ return true;
+ }
+
+ private static void transform() throws IOException{
+ File temp = new File("E:\\richfaces\\test-applications\\realworld\\Upload\\galleries\\Nature\\1.jpg");
+ BufferedImage bsrc =null;
+ bsrc = ImageIO.read(temp);
+ AffineTransform transform = new AffineTransform();
+ //transform.scale(scalex, scaley);
+ //transform.shear(30, 30);
+ transform.translate(100, 100);
+ //transform.rotate(radians, bufferedImage.getWidth()/2,
+ //bufferedImage.getHeight()/2);
+
+ AffineTransformOp op = new AffineTransformOp(transform,
+ AffineTransformOp.TYPE_NEAREST_NEIGHBOR);
+ bsrc = op.filter(bsrc, null);
+ ImageIO.write(bsrc, "JPG", temp);
+ }
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/modalpanel/test.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
15 years, 11 months
JBoss Rich Faces SVN: r12394 - in trunk/test-applications/realworld/web/src/main/webapp/WEB-INF: tags and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-01-23 08:40:57 -0500 (Fri, 23 Jan 2009)
New Revision: 12394
Removed:
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/comment.xhtml
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/error.xhtml
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/message.xhtml
Modified:
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/pages.xml
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/realWorld-taglib.xml
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/album.xhtml
trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/image.xhtml
Log:
Modified: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/pages.xml
===================================================================
--- trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/pages.xml 2009-01-23 13:35:36 UTC (rev 12393)
+++ trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/pages.xml 2009-01-23 13:40:57 UTC (rev 12394)
@@ -23,10 +23,7 @@
</navigation>
</page>
- <page view-id="/index.xhtml">
-
- <action execute="#{identity.login}"
- if="#{validation.succeeded}"/>
+ <page view-id="/index.xhtml" action="#{conversation.begin}">
<navigation>
<rule if="#{identity.loggedIn}">
Modified: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/realWorld-taglib.xml
===================================================================
--- trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/realWorld-taglib.xml 2009-01-23 13:35:36 UTC (rev 12393)
+++ trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/realWorld-taglib.xml 2009-01-23 13:40:57 UTC (rev 12394)
@@ -17,19 +17,7 @@
<source>templates/image.xhtml</source>
</tag>
<tag>
- <tag-name>comment</tag-name>
- <source>templates/comment.xhtml</source>
- </tag>
- <tag>
- <tag-name>message</tag-name>
- <source>templates/message.xhtml</source>
- </tag>
- <tag>
<tag-name>linkPanel</tag-name>
<source>templates/linkPanel.xhtml</source>
</tag>
- <tag>
- <tag-name>error</tag-name>
- <source>templates/error.xhtml</source>
- </tag>
</facelet-taglib>
\ No newline at end of file
Modified: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/album.xhtml
===================================================================
(Binary files differ)
Deleted: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/comment.xhtml
===================================================================
(Binary files differ)
Deleted: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/error.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/image.xhtml
===================================================================
(Binary files differ)
Deleted: trunk/test-applications/realworld/web/src/main/webapp/WEB-INF/tags/templates/message.xhtml
===================================================================
(Binary files differ)
15 years, 11 months
JBoss Rich Faces SVN: r12393 - in trunk/test-applications/realworld/web/src/main/webapp: includes and 7 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-01-23 08:35:36 -0500 (Fri, 23 Jan 2009)
New Revision: 12393
Added:
trunk/test-applications/realworld/web/src/main/webapp/includes/message/
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/misc/errorPanel.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/misc/status.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/panelBar/favoriteAlbums.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/panelBar/treeFriends.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/register/
trunk/test-applications/realworld/web/src/main/webapp/includes/register/regInfo.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/userPrefs/friendTab.xhtml
Removed:
trunk/test-applications/realworld/web/src/main/webapp/includes/panelBar/friends.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/panelBar/sharedAlbums.xhtml
Modified:
trunk/test-applications/realworld/web/src/main/webapp/includes/messages.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/misc/messagePooler.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/misc/modalPanels.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/misc/slideShowPooler.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/panelBar/tree.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/search.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/loginPrefsTab.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/userPrefs/userPrefsTab.xhtml
trunk/test-applications/realworld/web/src/main/webapp/index.xhtml
trunk/test-applications/realworld/web/src/main/webapp/layout/menu.xhtml
trunk/test-applications/realworld/web/src/main/webapp/layout/panelBar.xhtml
trunk/test-applications/realworld/web/src/main/webapp/layout/template.xhtml
trunk/test-applications/realworld/web/src/main/webapp/main.xhtml
trunk/test-applications/realworld/web/src/main/webapp/register.xhtml
Log:
Added: trunk/test-applications/realworld/web/src/main/webapp/includes/message/history.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/includes/message/history.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/realworld/web/src/main/webapp/includes/message/incoming.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/includes/message/incoming.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/realworld/web/src/main/webapp/includes/message/outcoming.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/includes/message/outcoming.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/messages.xhtml
===================================================================
(Binary files differ)
Added: trunk/test-applications/realworld/web/src/main/webapp/includes/misc/errorPanel.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/includes/misc/errorPanel.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/misc/messagePooler.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/misc/modalPanels.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/misc/slideShowPooler.xhtml
===================================================================
(Binary files differ)
Added: trunk/test-applications/realworld/web/src/main/webapp/includes/misc/status.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/includes/misc/status.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/realworld/web/src/main/webapp/includes/panelBar/favoriteAlbums.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/includes/panelBar/favoriteAlbums.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Deleted: trunk/test-applications/realworld/web/src/main/webapp/includes/panelBar/friends.xhtml
===================================================================
(Binary files differ)
Deleted: trunk/test-applications/realworld/web/src/main/webapp/includes/panelBar/sharedAlbums.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/panelBar/tree.xhtml
===================================================================
(Binary files differ)
Added: trunk/test-applications/realworld/web/src/main/webapp/includes/panelBar/treeFriends.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/includes/panelBar/treeFriends.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/realworld/web/src/main/webapp/includes/register/regInfo.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/includes/register/regInfo.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
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/search.xhtml
===================================================================
(Binary files differ)
Added: trunk/test-applications/realworld/web/src/main/webapp/includes/userPrefs/friendTab.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/includes/userPrefs/friendTab.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
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)
Modified: trunk/test-applications/realworld/web/src/main/webapp/index.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/layout/menu.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/layout/panelBar.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/layout/template.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/main.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld/web/src/main/webapp/register.xhtml
===================================================================
(Binary files differ)
15 years, 11 months
JBoss Rich Faces SVN: r12392 - in trunk/test-applications/realworld/web/src/main: webapp/includes and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-01-23 08:34:49 -0500 (Fri, 23 Jan 2009)
New Revision: 12392
Added:
trunk/test-applications/realworld/web/src/main/webapp/includes/image/breadCrumb.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/image/folders.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/image/friendFolders.xhtml
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/image/comments.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/image/imagePreview.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/image/slideshow.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/imagePreview.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/index/login.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-23 13:34:18 UTC (rev 12391)
+++ trunk/test-applications/realworld/web/src/main/resources/messages_en.properties 2009-01-23 13:34:49 UTC (rev 12392)
@@ -91,7 +91,7 @@
error=Error
errorStub=Something bad happened :-(
-fileUpload.header=You will upload files in album: #{selectionHelper.selectedAlbum.name}. If you want upload in another album, select it.
+fileUpload.header=You will upload files in album: #{conversationState.selectedAlbum.name}. If you want upload in another album, select it.
fileUpload.header2=Choose album:
fileUpload.uploadedPanelHeader=Uploaded Files Info
fileUpload.fileNameLabel=File Name:
@@ -102,11 +102,11 @@
fileUpload.clearLabel=Clear Uploaded Data
fileUpload.clearSelectedLabel=Clear Selected
-comment.label=View comments(#{selectionHelper.selectedImage.comments.size})
-comment.author=Author: #{record.author.login}
+comment.label=View comments(#{conversationState.selectedImage.comments.size})
+comment.author=Author: #{comment.author.login}
comment.askForFriend=Ask for friendship
comment.askForFriend.message=Please, add me to your friends
-comment.date=Date: #{record.date}
+comment.date=Date: #{comment.date}
comment.delete=Delete comment
comment.edit=Edit Comment
comment.noComments=No Comments for this image
@@ -158,13 +158,13 @@
scroller.prev=Prev
scroller.next=Next
scroller.pager.begin=Image
-scroller.pager.end=of #{selectionHelper.selectedAlbum.images.size}
+scroller.pager.end=of #{conversationState.selectedAlbum.images.size}
image.rating=Current Rating: #{record.rank.rating}
image.numberVotes=Number of votes: #{record.rank.hits}
image.vote=Vote for this picture
image.vote.short=Vote
-image.panelHeader=Image Preview: Selected Album: #{selectionHelper.selectedAlbum.name}
+image.panelHeader=Image Preview: Selected Album: #{conversationState.selectedAlbum.name}
image.delete=Delete
image.delete.confirm=Are you sure? Click OK to proceed, else click Cancel.
image.edit=Edit Properties
@@ -197,7 +197,7 @@
search.rank=Rank:
search.numberVotes=Number of votes:
search.date=Date created
-search.addShared=Add to shared Albums
+search.addShared=Add to favorite Albums
search.preview=Preview
search.search=Search
search.popular=Popular Images
@@ -228,7 +228,7 @@
menu.welcome=Welcome, #{identity.username}!
menu.welcome.guest=Welcome, guest! If you want access to full version of application, please register or login.
-menu.message.tooltip=You have #{userManager.countUnreadedMessages} not-readed messages
+menu.message.tooltip=You have #{messageManager.countUnreadedMessages} not-readed messages
menu.messages=Read Messages
menu.search=Search
menu.image=Image Preview
@@ -241,7 +241,7 @@
panel.albumHeader=Album Management
panel.my=My albums
panel.friend=Friend Albums
-panel.shared=Shared albums
+panel.shared=Favorites
samplename=Sample Name
sampledesc=Sample Description
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-23 13:34:18 UTC (rev 12391)
+++ trunk/test-applications/realworld/web/src/main/resources/messages_ru.properties 2009-01-23 13:34:49 UTC (rev 12392)
@@ -31,7 +31,7 @@
error=\u041E\u0448\u0438\u0431\u043A\u0430
errorStub=\u0421\u043B\u0443\u0447\u0438\u043B\u043E\u0441\u044C \u0447\u0442\u043E-\u0442\u043E \u043D\u0435\u043F\u0440\u0435\u0434\u0432\u0438\u0434\u0435\u043D\u043D\u043E\u0435 \:-(
-fileUpload.header=\u0412\u0430\u0448\u0438 \u0444\u0430\u0439\u043B\u044B \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u044B \u0432 \u0430\u043B\u044C\u0431\u043E\u043C\: \#{selectionHelper.selectedAlbum.name}. \u0415\u0441\u043B\u0438 \u0432\u044B \u0445\u043E\u0442\u0438\u0442\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0438\u0445 \u0432 \u0434\u0440\u0443\u0433\u043E\u0439 \u0430\u043B\u044C\u0431\u043E\u043C, \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0435\u0433\u043E.
+fileUpload.header=\u0412\u0430\u0448\u0438 \u0444\u0430\u0439\u043B\u044B \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u044B \u0432 \u0430\u043B\u044C\u0431\u043E\u043C\: \#{conversationState.selectedAlbum.name}. \u0415\u0441\u043B\u0438 \u0432\u044B \u0445\u043E\u0442\u0438\u0442\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0438\u0445 \u0432 \u0434\u0440\u0443\u0433\u043E\u0439 \u0430\u043B\u044C\u0431\u043E\u043C, \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0435\u0433\u043E.
fileUpload.header2=\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u043B\u044C\u0431\u043E\u043C\:
fileUpload.uploadedPanelHeader=\u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F \u043E \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043D\u044B\u0445 \u0444\u0430\u0439\u043B\u0430\u0445
fileUpload.fileNameLabel=\u0418\u043C\u044F \u0444\u0430\u0439\u043B\u0430\:
@@ -42,11 +42,11 @@
fileUpload.clearLabel=\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0432\u0441\u0435
fileUpload.clearSelectedLabel=\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u043D\u044B\u0435
-comment.label=\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0438 (\#{selectionHelper.selectedImage.comments.size})
-comment.author=\u0410\u0432\u0442\u043E\u0440\: \#{record.author.login}
+comment.label=\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0438 (\#{conversationState.selectedImage.comments.size})
+comment.author=\u0410\u0432\u0442\u043E\u0440\: \#{comment.author.login}
comment.askForFriend=\u0417\u0430\u043F\u0440\u043E\u0441 \u043D\u0430 \u0434\u0440\u0443\u0436\u0431\u0443
comment.askForFriend.message=\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0434\u043E\u0431\u0430\u0432\u044C\u0442\u0435 \u043C\u0435\u043D\u044F \u0432 \u0441\u043F\u0438\u0441\u043E\u043A \u0432\u0430\u0448\u0438\u0445 \u0434\u0440\u0443\u0437\u0435\u0439.
-comment.date=\u0414\u0430\u0442\u0430\: \#{record.date}
+comment.date=\u0414\u0430\u0442\u0430\: \#{comment.date}
comment.delete=\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439
comment.edit=\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439
comment.noComments=\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0438 \u043A \u044D\u0442\u043E\u0439 \u0444\u043E\u0442\u043E\u0433\u0440\u0430\u0444\u0438\u0438 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442
@@ -98,13 +98,13 @@
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 \#{selectionHelper.selectedAlbum.images.size}
+scroller.pager.end= \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.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\: \#{selectionHelper.selectedAlbum.name}
+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}
image.delete=\u0423\u0434\u0430\u043B\u0438\u0442\u044C
image.delete.confirm=\u0412\u044B \u0443\u0432\u0435\u0440\u0435\u043D\u044B?
image.edit=\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430
@@ -168,7 +168,7 @@
menu.welcome=\u0414\u043E\u0431\u0440\u043E \u043F\u043E\u0436\u0430\u043B\u043E\u0432\u0430\u0442\u044C, \#{identity.username}\!
menu.welcome.guest=\u0414\u043E\u0431\u0440\u043E \u043F\u043E\u0436\u0430\u043B\u043E\u0432\u0430\u0442\u044C, \u0433\u043E\u0441\u0442\u044C\! \u0415\u0441\u043B\u0438 \u0432\u044B \u0445\u043E\u0442\u0438\u0442\u0435 \u0438\u043C\u0435\u0442\u044C \u0434\u043E\u0441\u0442\u0443\u043F \u043A\u043E \u0432\u0441\u0435\u043C \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E\u0441\u0442\u044F\u043C \u0441\u0438\u0441\u0442\u0435\u043C\u044B, \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0439\u0442\u0435\u0441\u044C
-menu.message.tooltip=\u0423 \u0432\u0430\u0441 \#{userManager.countUnreadedMessages} \u043D\u0435\u043F\u0440\u043E\u0447\u0438\u0442\u0430\u043D\u043D\u044B\u0445 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439
+menu.message.tooltip=\u0423 \u0432\u0430\u0441 \#{messageManager.countUnreadedMessages} \u043D\u0435\u043F\u0440\u043E\u0447\u0438\u0442\u0430\u043D\u043D\u044B\u0445 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439
menu.messages=\u0421\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F
menu.search=\u041F\u043E\u0438\u0441\u043A
menu.image=\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u043A\u0430\u0440\u0442\u0438\u043D\u043E\u043A
Added: trunk/test-applications/realworld/web/src/main/webapp/includes/image/breadCrumb.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/includes/image/breadCrumb.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/image/comments.xhtml
===================================================================
(Binary files differ)
Added: trunk/test-applications/realworld/web/src/main/webapp/includes/image/folders.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/includes/image/folders.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/realworld/web/src/main/webapp/includes/image/friendFolders.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/includes/image/friendFolders.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/image/imagePreview.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/image/slideshow.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/index/login.xhtml
===================================================================
(Binary files differ)
15 years, 11 months
JBoss Rich Faces SVN: r12391 - in trunk/test-applications/realworld/web/src/main/webapp/img: shell and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-01-23 08:34:18 -0500 (Fri, 23 Jan 2009)
New Revision: 12391
Added:
trunk/test-applications/realworld/web/src/main/webapp/img/folder.jpg
trunk/test-applications/realworld/web/src/main/webapp/img/locked.jpg
trunk/test-applications/realworld/web/src/main/webapp/img/shell/
trunk/test-applications/realworld/web/src/main/webapp/img/shell/bullet.gif
trunk/test-applications/realworld/web/src/main/webapp/img/shell/footer_bg.gif
trunk/test-applications/realworld/web/src/main/webapp/img/shell/general_panel_bg.gif
trunk/test-applications/realworld/web/src/main/webapp/img/shell/general_panel_header_bg.gif
trunk/test-applications/realworld/web/src/main/webapp/img/shell/general_panelbar_bg.gif
trunk/test-applications/realworld/web/src/main/webapp/img/shell/general_panelbar_bullet.gif
trunk/test-applications/realworld/web/src/main/webapp/img/shell/logo_bottom.gif
trunk/test-applications/realworld/web/src/main/webapp/img/shell/logo_top.gif
trunk/test-applications/realworld/web/src/main/webapp/img/shell/page_bg.gif
trunk/test-applications/realworld/web/src/main/webapp/img/shell/top_tight_bullet.gif
Log:
Added: trunk/test-applications/realworld/web/src/main/webapp/img/folder.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/img/folder.jpg
___________________________________________________________________
Name: svn:mime-type
+ image/jpeg
Added: trunk/test-applications/realworld/web/src/main/webapp/img/locked.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/img/locked.jpg
___________________________________________________________________
Name: svn:mime-type
+ image/jpeg
Added: trunk/test-applications/realworld/web/src/main/webapp/img/shell/bullet.gif
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/img/shell/bullet.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/test-applications/realworld/web/src/main/webapp/img/shell/footer_bg.gif
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/img/shell/footer_bg.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/test-applications/realworld/web/src/main/webapp/img/shell/general_panel_bg.gif
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/img/shell/general_panel_bg.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/test-applications/realworld/web/src/main/webapp/img/shell/general_panel_header_bg.gif
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/img/shell/general_panel_header_bg.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/test-applications/realworld/web/src/main/webapp/img/shell/general_panelbar_bg.gif
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/img/shell/general_panelbar_bg.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/test-applications/realworld/web/src/main/webapp/img/shell/general_panelbar_bullet.gif
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/img/shell/general_panelbar_bullet.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/test-applications/realworld/web/src/main/webapp/img/shell/logo_bottom.gif
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/img/shell/logo_bottom.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/test-applications/realworld/web/src/main/webapp/img/shell/logo_top.gif
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/img/shell/logo_top.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/test-applications/realworld/web/src/main/webapp/img/shell/page_bg.gif
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/img/shell/page_bg.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/test-applications/realworld/web/src/main/webapp/img/shell/top_tight_bullet.gif
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/img/shell/top_tight_bullet.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
15 years, 11 months
JBoss Rich Faces SVN: r12390 - in trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld: ui and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-01-23 08:33:50 -0500 (Fri, 23 Jan 2009)
New Revision: 12390
Added:
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/ConversationState.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/EditorBean.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/History.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/MetaInformationBinder.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/RatingBinder.java
trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/RenderLogic.java
Log:
Added: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/ConversationState.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/ConversationState.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/ConversationState.java 2009-01-23 13:33:50 UTC (rev 12390)
@@ -0,0 +1,106 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+package org.richfaces.realworld.ui;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.richfaces.realworld.domain.Album;
+import org.richfaces.realworld.domain.Image;
+import org.richfaces.realworld.domain.User;
+import org.richfaces.realworld.tree.TreeMyAlbumsItem;
+
+@Name("conversationState")
+(a)Scope(ScopeType.CONVERSATION)
+public class ConversationState implements Serializable{
+
+ private static final long serialVersionUID = 5656562187249324512L;
+
+ private Integer selectedImageIndex = 1;
+
+ private Image selectedImage;
+
+ private Album selectedAlbum;
+
+ private User selectedUser;
+
+ private User secondSelectedUser;
+
+ @In(required=false) private TreeMyAlbumsItem treeMyAlbumsItem;
+
+ public Integer getSelectedImageIndex() {
+ return selectedImageIndex;
+ }
+
+ public void setSelectedImageIndex(Integer selectedImageIndex) {
+ this.selectedImageIndex = selectedImageIndex;
+ }
+
+ public Image getSelectedImage() {
+ return selectedImage;
+ }
+
+ public void setSelectedImage(Image selectedImage) {
+ this.selectedImage = selectedImage;
+ }
+
+ public Album getSelectedAlbum() {
+ return selectedAlbum;
+ }
+
+ public void setSelectedAlbum(Album selectedAlbum) {
+ this.selectedAlbum = selectedAlbum;
+ }
+
+ public String getSelectedAlbumName() {
+ if(null == selectedAlbum){
+ return "";
+ }
+ return selectedAlbum.getAlbumPathFromParents(selectedAlbum, new ArrayList<String>(), "/");
+ }
+
+ public void setSelectedAlbumName(String selectedAlbumName) {
+ selectedAlbumName = selectedAlbumName.substring(0, selectedAlbumName.length() -1);
+ int lastIndexOf = selectedAlbumName.lastIndexOf("/");
+ String prevPathEnd = selectedAlbumName.substring(lastIndexOf+1);
+ this.selectedAlbum = treeMyAlbumsItem.getAlbumByName(prevPathEnd).getAlbum();
+ }
+
+ public User getSelectedUser() {
+ return selectedUser;
+ }
+
+ public void setSelectedUser(User selectedUser) {
+ this.selectedUser = selectedUser;
+ }
+
+ public User getSecondSelectedUser() {
+ return secondSelectedUser;
+ }
+
+ public void setSecondSelectedUser(User secondSelectedUser) {
+ this.secondSelectedUser = secondSelectedUser;
+ }
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/ConversationState.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/EditorBean.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/EditorBean.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/EditorBean.java 2009-01-23 13:33:50 UTC (rev 12390)
@@ -0,0 +1,36 @@
+package org.richfaces.realworld.ui;
+
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Observer;
+
+@Name("editorBean")
+public class EditorBean {
+
+ private String currentConfiguration = "/org/richfaces/realworld/editor/advanced";
+
+ private boolean liveUpdatesEnabled=false;
+
+ private String message;
+
+ public String getMessage() {
+ return message;
+ }
+
+ @Observer("clearEditor")
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public String getCurrentConfiguration() {
+ return currentConfiguration;
+ }
+
+ public boolean isLiveUpdatesEnabled() {
+ return liveUpdatesEnabled;
+ }
+
+ public void setLiveUpdatesEnabled(boolean liveUpdatesEnabled) {
+ this.liveUpdatesEnabled = liveUpdatesEnabled;
+ }
+
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/EditorBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/History.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/History.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/History.java 2009-01-23 13:33:50 UTC (rev 12390)
@@ -0,0 +1,48 @@
+package org.richfaces.realworld.ui;
+
+import java.util.List;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.richfaces.realworld.domain.Message;
+import org.richfaces.realworld.domain.User;
+import org.richfaces.realworld.service.IUserAction;
+
+@Name("history")
+(a)Scope(ScopeType.CONVERSATION)
+public class History {
+
+ @In(create=true, required=true)
+ private IUserAction userAction;
+
+ private User historyUser;
+
+ private boolean selected;
+
+ public boolean isSelected() {
+ return selected;
+ }
+
+ public void setSelected(boolean selected) {
+ this.selected = selected;
+ }
+
+ public void showHistory(User u){
+ this.setSelected(true);
+ this.setHistoryUser(u);
+ }
+
+ public List<Message> getHistory(){
+ return userAction.getHistory(this.getHistoryUser());
+ }
+
+ public User getHistoryUser() {
+ return historyUser;
+ }
+
+ public void setHistoryUser(User historyUser) {
+ this.historyUser = historyUser;
+ }
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/History.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/MetaInformationBinder.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/MetaInformationBinder.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/MetaInformationBinder.java 2009-01-23 13:33:50 UTC (rev 12390)
@@ -0,0 +1,89 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+package org.richfaces.realworld.ui;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.faces.context.FacesContext;
+
+import org.ajax4jsf.component.UIRepeat;
+import org.jboss.seam.annotations.Name;
+import org.richfaces.component.html.HtmlInputText;
+import org.richfaces.realworld.domain.Image;
+import org.richfaces.realworld.domain.MetaTag;
+
+@Name(value="metainfBinder")
+public class MetaInformationBinder {
+
+ HtmlInputText metaRef;
+ private UIRepeat repeater;
+ private Set<Integer> keys = null;
+
+ public Set<Integer> getKeys() {
+ return keys;
+ }
+
+ public void setKeys(Set<Integer> keys) {
+ this.keys = keys;
+ }
+
+ public void setRepeater(UIRepeat repeater) {
+ this.repeater = repeater;
+ }
+
+ public UIRepeat getRepeater() {
+ return repeater;
+ }
+
+ public HtmlInputText getMetaRef() {
+ return metaRef;
+ }
+
+ public void setMetaRef(HtmlInputText metaRef) {
+ this.metaRef = metaRef;
+ }
+
+ public String change(Image image){
+ Set<Integer> keys = new HashSet<Integer>();
+ int rowKey = getRepeater().getRowIndex();
+ keys.add(rowKey);
+ setKeys(keys);
+ metaRef.processValidators(FacesContext.getCurrentInstance());
+ metaRef.processUpdates(FacesContext.getCurrentInstance());
+ MetaTag metaTag = new MetaTag();
+ metaTag.setTag(metaRef.getValue().toString());
+ metaTag.setParent(image);
+ image.getMeta().add(metaTag);
+ return null;
+ }
+
+ public void addTag(Image image){
+ MetaTag metaTag = new MetaTag();
+ metaTag.setTag("");
+ metaTag.setParent(image);
+ image.getMeta().add(metaTag);
+ }
+
+ public void removeTag(MetaTag tag, Image image){
+ image.getMeta().remove(tag);
+ }
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/MetaInformationBinder.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/RatingBinder.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/RatingBinder.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/RatingBinder.java 2009-01-23 13:33:50 UTC (rev 12390)
@@ -0,0 +1,41 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+package org.richfaces.realworld.ui;
+
+import java.io.Serializable;
+
+import org.jboss.seam.annotations.Name;
+import org.richfaces.component.UIInputNumberSlider;
+
+@Name("ratingBinder")
+public class RatingBinder implements Serializable{
+
+ private static final long serialVersionUID = -7714638502390978362L;
+ private UIInputNumberSlider inputSlider;
+
+ public UIInputNumberSlider getInputSlider() {
+ return inputSlider;
+ }
+
+ public void setInputSlider(UIInputNumberSlider inputSlider) {
+ this.inputSlider = inputSlider;
+ }
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/RatingBinder.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/RenderLogic.java
===================================================================
--- trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/RenderLogic.java (rev 0)
+++ trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/RenderLogic.java 2009-01-23 13:33:50 UTC (rev 12390)
@@ -0,0 +1,107 @@
+package org.richfaces.realworld.ui;
+
+import java.io.Serializable;
+
+import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Scope;
+import org.jboss.seam.security.Identity;
+import org.richfaces.realworld.domain.Album;
+import org.richfaces.realworld.domain.Image;
+import org.richfaces.realworld.domain.User;
+
+@Name("renderLogic")
+(a)Scope(ScopeType.CONVERSATION)
+public class RenderLogic implements Serializable{
+
+ @In User user;
+ @In Identity identity;
+ @In ConversationState conversationState;
+
+ private static final long serialVersionUID = 5656562187249324512L;
+
+ public boolean shouldRenderFriendFolders(){
+ return conversationState.getSelectedUser() == null;
+ }
+
+ public boolean shouldRenderFolders(){
+ return conversationState.getSelectedUser()!=null && conversationState.getSelectedImage() == null;
+ }
+
+ public boolean shouldRenderImage(){
+ return conversationState.getSelectedUser()!=null && conversationState.getSelectedAlbum()!=null && conversationState.getSelectedImage() != null;
+ }
+
+ public boolean shouldRenderImageList(){
+ return conversationState.getSelectedUser()!=null && conversationState.getSelectedAlbum()!=null;
+ }
+
+ public boolean isCurrentUserProfileSelected(){
+ return user.equals(conversationState.getSelectedUser());
+ }
+
+ public boolean isSecondUserProfileSelected(){
+ return conversationState.getSecondSelectedUser() != null;
+ }
+
+ public boolean isUserAlbumSelected(){
+ return conversationState.getSelectedAlbum() != null && conversationState.getSelectedAlbum().getOwner().equals(user);
+ }
+
+ public boolean isUserGuest(){
+ return identity.hasRole("guest");
+ }
+
+ public boolean shouldRenderFileUpload(){
+ return conversationState.getSelectedAlbum()!=null && conversationState.getSelectedAlbum().getOwner().equals(user);
+ }
+
+ public boolean isUserSelected(){
+ return user.equals(conversationState.getSelectedUser());
+ }
+
+ public boolean isFriendSelected(){
+ return conversationState.getSelectedUser() == null || isUserFriend();
+ }
+
+ public boolean isNotFriendSelected(){
+ return !isUserSelected() && !isUserFriend();
+ }
+
+ public boolean isUserFriend(){
+ return user.getFriends() != null && user.getFriends().contains(conversationState.getSelectedUser());
+ }
+
+ public boolean isUserFriend(User u){
+ return user.getFriends() != null && user.getFriends().contains(u);
+ }
+
+ public boolean isAlbumSelected(){
+ return conversationState.getSelectedAlbum() != null;
+ }
+
+ public boolean isImageSelected(){
+ return conversationState.getSelectedImage() != null;
+ }
+
+ public boolean isAccessToAlbumGranted(Album album){
+ return album.getOwner().equals(user) || album.isShared() || isUserFriend(album.getOwner());
+ }
+
+ public boolean isUserAlbum(Album album){
+ if(album == null){
+ return false;
+ }
+ return album.getOwner().equals(user);
+ }
+
+ public boolean isFavoriteAlbum(Album album){
+ return user.getFavoriteAlbums().contains(album);
+ }
+
+ public boolean isFavoriteImage(Image image){
+ return user.getFavoriteImages().contains(image);
+ }
+
+}
Property changes on: trunk/test-applications/realworld/web/src/main/java/org/richfaces/realworld/ui/RenderLogic.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
15 years, 11 months
JBoss Rich Faces SVN: r12389 - in trunk/test-applications/realworld/web/src/main/webapp/includes: contextMenu and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-01-23 08:33:25 -0500 (Fri, 23 Jan 2009)
New Revision: 12389
Added:
trunk/test-applications/realworld/web/src/main/webapp/includes/contextMenu/
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/fileUploader.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload/multyMode.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload/singleMode.xhtml
Modified:
trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload.xhtml
trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload/fileUploadPanel.xhtml
Log:
Added: trunk/test-applications/realworld/web/src/main/webapp/includes/contextMenu/CMForAlbum.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/includes/contextMenu/CMForAlbum.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/realworld/web/src/main/webapp/includes/contextMenu/CMForImage.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/includes/contextMenu/CMForImage.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/realworld/web/src/main/webapp/includes/contextMenu/CMForUser.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/includes/contextMenu/CMForUser.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload/chooseMode.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload/chooseMode.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload/fileUploadPanel.xhtml
===================================================================
(Binary files differ)
Added: trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload/fileUploader.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload/fileUploader.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload/multyMode.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload/multyMode.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload/singleMode.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload/singleMode.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified: trunk/test-applications/realworld/web/src/main/webapp/includes/fileUpload.xhtml
===================================================================
(Binary files differ)
15 years, 11 months