JBoss Rich Faces SVN: r13112 - trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-03-23 12:37:30 -0400 (Mon, 23 Mar 2009)
New Revision: 13112
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileUploadBean.java
Log:
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileUploadBean.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileUploadBean.java 2009-03-23 15:36:04 UTC (rev 13111)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileUploadBean.java 2009-03-23 16:37:30 UTC (rev 13112)
@@ -37,8 +37,12 @@
import org.richfaces.model.UploadItem;
import org.richfaces.realworld.domain.Image;
import org.richfaces.realworld.manager.FileManager;
+import org.richfaces.realworld.manager.ImageManager;
import org.richfaces.realworld.manager.Model;
+import org.richfaces.realworld.manager.NavigationEnum;
import org.richfaces.realworld.service.Constants;
+import org.richfaces.realworld.service.IImageAction;
+import org.richfaces.realworld.util.FlushStrategy;
import com.drew.imaging.jpeg.JpegMetadataReader;
import com.drew.imaging.jpeg.JpegProcessingException;
@@ -62,6 +66,8 @@
@In("#{messages['file_saving_error']}")
private String FILE_SAVE_ERROR;
+ @In IImageAction imageAction;
+ @In FlushStrategy flushStrategy;
@In @Out
FileWrapper fileWrapper;
@@ -79,7 +85,7 @@
public synchronized void listener(UploadEvent event) throws Exception {
UploadItem item = event.getUploadItem();
Image image = constructImage(item);
- fileManager.writeFile(item.getFile().getPath(), item.getFile().getPath(), "_mini", 100, false);
+ //fileManager.writeFile(item.getFile().getPath(), item.getFile().getPath(), "_mini", 100, false);
try {
extractMetadata(item, image);
} catch (JpegProcessingException e1) {
@@ -90,10 +96,14 @@
return;
}
image.setAlbum(model.getSelectedAlbum());
+ String newPath = model.getSelectedAlbum().getOwner().getLogin() + "/" + model.getSelectedAlbum().getName() + "/" +item.getFileName();
+ image.setPath(newPath);
fileWrapper.getFiles().add(image);
- if(!fileManager.addImage(item.getFileName(), item.getFile().getPath())){
+ if(!fileManager.addImage(newPath, item.getFile().getPath())){
Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception(FILE_SAVE_ERROR));
}
+ imageAction.addImage(image, flushStrategy.isDatabaseStoreStrategy());
+ Events.instance().raiseEvent("imageAdded");
item.getFile().delete();
}
15 years, 9 months
JBoss Rich Faces SVN: r13111 - trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2009-03-23 11:36:04 -0400 (Mon, 23 Mar 2009)
New Revision: 13111
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ProgressBarTest.java
Log:
RF-6523
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ProgressBarTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ProgressBarTest.java 2009-03-23 15:34:49 UTC (rev 13110)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ProgressBarTest.java 2009-03-23 15:36:04 UTC (rev 13111)
@@ -123,15 +123,6 @@
}
@Test
- public void testActionListeners(Template template) {
- //FIXME actionListener not work in progressBar RF-5500
- AutoTester tester = getAutoTester(this);
- tester.renderPage(template, null);
- writeStatus("Test action listener attribute");
- tester.testActionListener();
- }
-
- @Test
public void testActionListenersWithExternalValidationFailure(
Template template) {
AutoTester tester = getAutoTester(this);
@@ -173,15 +164,6 @@
}
@Test
- public void testNestedActionListener(Template template) {
- //FIXME actionListener not work in progressBar RF-5500
- AutoTester tester = getAutoTester(this);
- tester.renderPage(template, null);
- writeStatus("Test actionListener defined as nested tag are invoked on the server ");
- tester.testNestedActionListener();
- }
-
- @Test
public void testListenersAreNotInvokedInCaseOfExternalValidationFailure(
Template template) {
AutoTester tester = getAutoTester(this);
15 years, 9 months
JBoss Rich Faces SVN: r13110 - trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-03-23 11:34:49 -0400 (Mon, 23 Mar 2009)
New Revision: 13110
Removed:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia
Log:
Deleted: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia 2009-03-23 15:26:18 UTC (rev 13109)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia 2009-03-23 15:34:49 UTC (rev 13110)
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<PROCESS model-entity="JSFProcess">
- <PROCESS-ITEM NAME="rules:#pages#ajaxInclude#step1.xhtml"
- PATH="/pages/ajaxInclude/step1.xhtml" SHAPE="32,17,0,0" model-entity="JSFProcessGroup">
- <PROCESS-ITEM ID="rules:#pages#ajaxInclude#step1.xhtml:0" NAME="item"
- PATH="/pages/ajaxInclude/step1.xhtml" model-entity="JSFProcessItem">
- <PROCESS-ITEM-OUTPUT ID="next::#pages#ajaxInclude#step2.xhtml"
- NAME="output" PATH="/pages/ajaxInclude/step2.xhtml"
- TARGET="rules:#pages#ajaxInclude#step2.xhtml" TITLE="next" model-entity="JSFProcessItemOutput"/>
- </PROCESS-ITEM>
- </PROCESS-ITEM>
- <PROCESS-ITEM NAME="rules:#pages#ajaxInclude#step2.xhtml"
- PATH="/pages/ajaxInclude/step2.xhtml" SHAPE="240,33,0,0" model-entity="JSFProcessGroup">
- <PROCESS-ITEM ID="rules:#pages#ajaxInclude#step2.xhtml:0" NAME="item"
- PATH="/pages/ajaxInclude/step2.xhtml" model-entity="JSFProcessItem">
- <PROCESS-ITEM-OUTPUT ID="previous::#pages#ajaxInclude#step1.xhtml"
- NAME="output" PATH="/pages/ajaxInclude/step1.xhtml"
- TARGET="rules:#pages#ajaxInclude#step1.xhtml" TITLE="previous" model-entity="JSFProcessItemOutput"/>
- </PROCESS-ITEM>
- </PROCESS-ITEM>
- <PROCESS-ITEM
- NAME="rules:#pages#ajaxSupport#testAjaxSingleAttribute3.xhtml"
- PATH="/pages/ajaxSupport/testAjaxSingleAttribute3.xhtml"
- SHAPE="32,129,0,0" model-entity="JSFProcessGroup">
- <PROCESS-ITEM
- ID="rules:#pages#ajaxSupport#testAjaxSingleAttribute3.xhtml:0"
- NAME="item" PATH="/pages/ajaxSupport/testAjaxSingleAttribute3.xhtml" model-entity="JSFProcessItem">
- <PROCESS-ITEM-OUTPUT
- ID="navigate::#pages#ajaxSupport#successNavigation.xhtml"
- NAME="output" PATH="/pages/ajaxSupport/successNavigation.xhtml"
- TARGET="rules:#pages#ajaxSupport#successNavigation.xhtml"
- TITLE="navigate" model-entity="JSFProcessItemOutput"/>
- </PROCESS-ITEM>
- </PROCESS-ITEM>
- <PROCESS-ITEM NAME="rules:#*" PATH="/*" SHAPE="32,241,0,0" model-entity="JSFProcessGroup">
- <PROCESS-ITEM ID="rules:#*:0" NAME="item" PATH="/*" model-entity="JSFProcessItem">
- <PROCESS-ITEM-OUTPUT
- ID="autoTestNavigation::#layout#autotest#autoTestNavigationPage.xhtml"
- NAME="output" PATH="/layout/autotest/autoTestNavigationPage.xhtml"
- TARGET="rules:#layout#autotest#autoTestNavigationPage.xhtml"
- TITLE="autoTestNavigation" model-entity="JSFProcessItemOutput"/>
- </PROCESS-ITEM>
- </PROCESS-ITEM>
- <PROCESS-ITEM
- NAME="rules:#layout#autotest#autoTestNavigationPage.xhtml"
- PATH="/layout/autotest/autoTestNavigationPage.xhtml"
- SHAPE="240,257,0,0" model-entity="JSFProcessGroup"/>
- <PROCESS-ITEM NAME="rules:#pages#ajaxSupport#successNavigation.xhtml"
- PATH="/pages/ajaxSupport/successNavigation.xhtml" SHAPE="240,145,0,0" model-entity="JSFProcessGroup"/>
-</PROCESS>
15 years, 9 months
JBoss Rich Faces SVN: r13109 - trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2009-03-23 11:26:18 -0400 (Mon, 23 Mar 2009)
New Revision: 13109
Modified:
trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
Log:
https://jira.jboss.org/jira/browse/RF-5226
Modified: trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
===================================================================
--- trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2009-03-23 15:20:38 UTC (rev 13108)
+++ trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2009-03-23 15:26:18 UTC (rev 13109)
@@ -1509,13 +1509,14 @@
var menuItem = RichFaces.Menu.findMenuItem(element.id);
var classes = 'dr-menu-item dr-menu-item-enabled rich-menu-item rich-menu-item-enabled';
if (menuItem) {
- classes =+ ' '+menuItem.options.styleClass;
+ if (menuItem.options.styleClass) classes =+ ' '+menuItem.options.styleClass;
+ element.className = classes;
if (menuItem.options.onselect) menuItem.options.onselect(event);
} else if (attr){
if (attr.styleClass) classes += ' '+attr.styleClass;
+ element.className = classes;
if (attr.onselect) attr.onselect(event);
}
- element.className = classes;
}
RichFaces.Menu.submitForm = function (event, element, params, target, attr) {
15 years, 9 months
JBoss Rich Faces SVN: r13108 - in trunk/ui/menu-components/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2009-03-23 11:20:38 -0400 (Mon, 23 Mar 2009)
New Revision: 13108
Modified:
trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java
trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
Log:
https://jira.jboss.org/jira/browse/RF-5226
Modified: trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java
===================================================================
--- trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java 2009-03-23 15:18:57 UTC (rev 13107)
+++ trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java 2009-03-23 15:20:38 UTC (rev 13108)
@@ -182,6 +182,30 @@
}
variables.setVariable("icon", resource);
+ // create attributes string for item without parent
+ StringBuffer attr = new StringBuffer();
+ String attrStr = "";
+ if (!(menuItem.getParent() instanceof MenuComponent))
+ {
+ String styleClass = (String) menuItem.getAttributes().get("styleClass");
+ String str = "";
+ attr.append(",{");
+ if (null!=styleClass && styleClass.length()>0) {
+ attr.append("styleClass:");
+ attr.append(ScriptUtils.toScript(styleClass));
+ str = ",";
+ }
+ String onselect = (String) menuItem.getAttributes().get("onselect");
+ if (null!=onselect && onselect.length()>0) {
+ attr.append(str);
+ attr.append("onselect:function(event){");
+ attr.append(onselect);
+ attr.append("}");
+ }
+ attr.append("}");
+ if (attr.length()>3) attrStr = attr.toString();
+ }
+
if (menuItem.isDisabled()) {
variables.setVariable("iconDisabledClasses",
"dr-menu-icon-disabled rich-menu-item-icon-disabled");
@@ -197,6 +221,9 @@
String mode = resolveSubmitMode(menuItem);
if (MenuComponent.MODE_AJAX.equalsIgnoreCase(mode)) {
+ scriptValue.append("RichFaces.Menu.updateItem(event,this");
+ scriptValue.append(attrStr);
+ scriptValue.append(");");
scriptValue.append(AjaxRendererUtils.buildOnClick(
menuItem, context).toString());
} else if (MenuComponent.MODE_SERVER.equalsIgnoreCase(mode)) {
@@ -242,30 +269,14 @@
scriptValue.append(",");
scriptValue.append(ScriptUtils.toScript(target));
}
- StringBuffer attr = new StringBuffer();
- if (!(menuItem.getParent() instanceof MenuComponent))
- {
- String styleClass = (String) menuItem.getAttributes().get("styleClass");
- String str = "";
- attr.append(",{");
- if (null!=styleClass && styleClass.length()>0) {
- scriptValue.append("styleClass:");
- scriptValue.append(ScriptUtils.toScript(styleClass));
- str = ",";
- }
- String onselect = (String) menuItem.getAttributes().get("onselect");
- if (null!=onselect && onselect.length()>0) {
- scriptValue.append(str);
- scriptValue.append("onselect:function(event){");
- scriptValue.append(onselect);
- scriptValue.append("}");
- }
- attr.append("}");
- if (attr.length()>3) scriptValue.append(attr);
- }
+
+ scriptValue.append(attrStr);
scriptValue.append(")");
} else {
+ scriptValue.append("RichFaces.Menu.updateItem(event,this");
+ scriptValue.append(attrStr);
+ scriptValue.append(");");
scriptValue.append(getStringAttributeOrEmptyString(menuItem, "onclick"));
}
if (resource.length() > 0) {
Modified: trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
===================================================================
--- trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2009-03-23 15:18:57 UTC (rev 13107)
+++ trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2009-03-23 15:20:38 UTC (rev 13108)
@@ -1505,7 +1505,7 @@
return menuItem;
}
-RichFaces.Menu.submitForm = function (event, element, params, target, attr) {
+RichFaces.Menu.updateItem = function (event, element, attr) {
var menuItem = RichFaces.Menu.findMenuItem(element.id);
var classes = 'dr-menu-item dr-menu-item-enabled rich-menu-item rich-menu-item-enabled';
if (menuItem) {
@@ -1516,6 +1516,10 @@
if (attr.onselect) attr.onselect(event);
}
element.className = classes;
+}
+
+RichFaces.Menu.submitForm = function (event, element, params, target, attr) {
+ RichFaces.Menu.updateItem(event, element, attr);
var form=A4J.findForm(element);
if (!params) params={};
if (!target) target='';
15 years, 9 months
JBoss Rich Faces SVN: r13107 - in trunk/test-applications/realworld2: doc and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: atsebro
Date: 2009-03-23 11:18:57 -0400 (Mon, 23 Mar 2009)
New Revision: 13107
Added:
trunk/test-applications/realworld2/doc/
trunk/test-applications/realworld2/doc/desc_draft.odt
Log:
https://jira.jboss.org/jira/browse/RF-6441
Added: trunk/test-applications/realworld2/doc/desc_draft.odt
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld2/doc/desc_draft.odt
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
15 years, 9 months
JBoss Rich Faces SVN: r13106 - trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-03-23 10:41:39 -0400 (Mon, 23 Mar 2009)
New Revision: 13106
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Model.java
Log:
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Model.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Model.java 2009-03-23 14:40:51 UTC (rev 13105)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/manager/Model.java 2009-03-23 14:41:39 UTC (rev 13106)
@@ -40,7 +40,7 @@
@Observer(Constants.UPDATE_MAIN_AREA_EVENT)
public void setMainArea(NavigationEnum mainArea) {
- if(this.mainArea.equals(NavigationEnum.FILE_UPLOAD)){
+ if(this.mainArea != null && this.mainArea.equals(NavigationEnum.FILE_UPLOAD)){
Events.instance().raiseEvent("clearFileUpload");
}
this.mainArea = mainArea;
15 years, 9 months
JBoss Rich Faces SVN: r13105 - in trunk/test-applications/realworld2/web/src/main/webapp: img and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-03-23 10:40:51 -0400 (Mon, 23 Mar 2009)
New Revision: 13105
Added:
trunk/test-applications/realworld2/web/src/main/webapp/img/modal/ico_help.png
trunk/test-applications/realworld2/web/src/main/webapp/img/modal/ico_warning.png
Removed:
trunk/test-applications/realworld2/web/src/main/webapp/img/alert.jpeg
Modified:
trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/tags/templates/album.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/tags/templates/confirmation.xhtml
trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/tags/templates/shelf.xhtml
Log:
Modified: trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/tags/templates/album.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/tags/templates/confirmation.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/realworld2/web/src/main/webapp/WEB-INF/tags/templates/shelf.xhtml
===================================================================
(Binary files differ)
Deleted: trunk/test-applications/realworld2/web/src/main/webapp/img/alert.jpeg
===================================================================
(Binary files differ)
Added: trunk/test-applications/realworld2/web/src/main/webapp/img/modal/ico_help.png
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld2/web/src/main/webapp/img/modal/ico_help.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: trunk/test-applications/realworld2/web/src/main/webapp/img/modal/ico_warning.png
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/realworld2/web/src/main/webapp/img/modal/ico_warning.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
15 years, 9 months
JBoss Rich Faces SVN: r13104 - trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-03-23 10:09:13 -0400 (Mon, 23 Mar 2009)
New Revision: 13104
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileUploadBean.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileWrapper.java
Log:
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileUploadBean.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileUploadBean.java 2009-03-23 14:02:33 UTC (rev 13103)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileUploadBean.java 2009-03-23 14:09:13 UTC (rev 13104)
@@ -78,15 +78,10 @@
public synchronized void listener(UploadEvent event) throws Exception {
UploadItem item = event.getUploadItem();
- FileItem file = new FileItem();
- file.setLength(item.getFileSize());
- file.setFile(item.getFile());
- file.setSelected(false);
- file.setName(event.getUploadItem().getFileName());
- Image image = constructImage(item, file);
- fileManager.writeFile(file.getFile().getPath(), file.getFile().getPath(), "_mini", 100, false);
+ Image image = constructImage(item);
+ fileManager.writeFile(item.getFile().getPath(), item.getFile().getPath(), "_mini", 100, false);
try {
- extractMetadata(file, image);
+ extractMetadata(item, image);
} catch (JpegProcessingException e1) {
Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception(FILE_PROCESSING_ERROR));
return;
@@ -95,26 +90,25 @@
return;
}
image.setAlbum(model.getSelectedAlbum());
- file.setImage(image);
- fileWrapper.getFiles().add(file);
- if(!fileManager.addImage(file.getName(), file.getFile().getPath())){
+ fileWrapper.getFiles().add(image);
+ if(!fileManager.addImage(item.getFileName(), item.getFile().getPath())){
Events.instance().raiseEvent(Constants.ADD_ERROR_EVENT, new Exception(FILE_SAVE_ERROR));
}
- file.getFile().delete();
+ item.getFile().delete();
}
- private Image constructImage(UploadItem item, FileItem file) {
+ private Image constructImage(UploadItem item) {
Image image = new Image();
image.setUploaded(new Date());
image.setDescription(SAMPLE_DESCRIPTION);
image.setName(SAMPLE_NAME);
- image.setSize(file.getLength());
+ image.setSize(item.getFileSize());
return image;
}
- private void extractMetadata(FileItem file, Image image)
+ private void extractMetadata(UploadItem item, Image image)
throws JpegProcessingException, MetadataException, FileNotFoundException {
- InputStream in = new FileInputStream(file.getFile());
+ InputStream in = new FileInputStream(item.getFile());
Metadata metadata = JpegMetadataReader.readMetadata(in);
Directory exifDirectory = metadata.getDirectory(ExifDirectory.class);
Directory jpgDirectory = metadata.getDirectory(JpegDirectory.class);
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileWrapper.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileWrapper.java 2009-03-23 14:02:33 UTC (rev 13103)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileWrapper.java 2009-03-23 14:09:13 UTC (rev 13104)
@@ -28,22 +28,23 @@
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Observer;
import org.jboss.seam.annotations.Scope;
+import org.richfaces.realworld.domain.Image;
@Name("fileWrapper")
@Scope(ScopeType.SESSION)
@AutoCreate
public class FileWrapper {
- private List<FileItem> files = new ArrayList<FileItem>();
+ private List<Image> files = new ArrayList<Image>();
public int getSize() {
return getFiles().size();
}
- public List<FileItem> getFiles() {
+ public List<Image> getFiles() {
return files;
}
- public void setFiles(List<FileItem> files) {
+ public void setFiles(List<Image> files) {
this.files = files;
}
15 years, 9 months
JBoss Rich Faces SVN: r13103 - trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2009-03-23 10:02:33 -0400 (Mon, 23 Mar 2009)
New Revision: 13103
Modified:
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileUploadBean.java
trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileWrapper.java
Log:
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileUploadBean.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileUploadBean.java 2009-03-23 13:58:14 UTC (rev 13102)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileUploadBean.java 2009-03-23 14:02:33 UTC (rev 13103)
@@ -62,7 +62,7 @@
@In("#{messages['file_saving_error']}")
private String FILE_SAVE_ERROR;
- @In(create = true) @Out
+ @In @Out
FileWrapper fileWrapper;
@In Model model;
Modified: trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileWrapper.java
===================================================================
--- trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileWrapper.java 2009-03-23 13:58:14 UTC (rev 13102)
+++ trunk/test-applications/realworld2/web/src/main/java/org/richfaces/realworld/ui/FileWrapper.java 2009-03-23 14:02:33 UTC (rev 13103)
@@ -21,26 +21,29 @@
package org.richfaces.realworld.ui;
import java.util.ArrayList;
+import java.util.List;
import org.jboss.seam.ScopeType;
+import org.jboss.seam.annotations.AutoCreate;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Observer;
import org.jboss.seam.annotations.Scope;
@Name("fileWrapper")
@Scope(ScopeType.SESSION)
+@AutoCreate
public class FileWrapper {
- private ArrayList<FileItem> files = new ArrayList<FileItem>();
+ private List<FileItem> files = new ArrayList<FileItem>();
public int getSize() {
return getFiles().size();
}
- public ArrayList<FileItem> getFiles() {
+ public List<FileItem> getFiles() {
return files;
}
- public void setFiles(ArrayList<FileItem> files) {
+ public void setFiles(List<FileItem> files) {
this.files = files;
}
15 years, 9 months