Author: jjamrich
Date: 2012-01-16 19:33:46 -0500 (Mon, 16 Jan 2012)
New Revision: 23152
Added:
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/rf-11825.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/resources/jjatest/
modules/tests/metamer/trunk/application/src/main/webapp/resources/jjatest/testFileUpload.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/list.xhtml
Log:
RF-11825: add example for fileUpload component within composite component.
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/list.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/list.xhtml 2012-01-16
14:12:30 UTC (rev 23151)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/list.xhtml 2012-01-17
00:33:46 UTC (rev 23152)
@@ -34,6 +34,11 @@
<metamer:testPageLink id="simple" outcome="simple"
value="Simple">
Simple page containing <b>rich:fileUpload</b> and inputs for
all its attributes.
</metamer:testPageLink>
+
+ <metamer:testPageLink id="rf-11825" outcome="rf-11825"
value="RF-11825">
+ Simple page containing composite component containing
<b>rich:fileUpload</b>
+ to demonstrate <a
href="https://issues.jboss.org/browse/RF-11825">RF-11825<...
+ </metamer:testPageLink>
</ui:define>
Copied:
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/rf-11825.xhtml
(from rev 23151,
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/list.xhtml)
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/rf-11825.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/rf-11825.xhtml 2012-01-17
00:33:46 UTC (rev 23152)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:c="http://java.sun.com/jsp/jstl/core"
+
xmlns:metamer="http://java.sun.com/jsf/composite/metamer"
+
xmlns:jja="http://java.sun.com/jsf/composite/jjatest">
+
+ <!--
+JBoss, Home of Professional Open Source
+Copyright 2010-2011, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software 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 software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+ <ui:composition template="/templates/template.xhtml">
+
+ <ui:define name="view">
+ <f:metadata>
+ <f:viewParam name="templates"
value="#{templateBean.templates}">
+ <f:converter converterId="templatesListConverter" />
+ </f:viewParam>
+ </f:metadata>
+ </ui:define>
+
+ <ui:define name="component">
+ <!-- composite component containing rich:fileUpload -->
+ <p>File picked from system dialog should be added into list
twice</p>
+ <jja:testFileUpload />
+ </ui:define>
+
+ <ui:define name="outOfTemplateAfter">
+ </ui:define>
+
+ </ui:composition>
+</html>
\ No newline at end of file
Added:
modules/tests/metamer/trunk/application/src/main/webapp/resources/jjatest/testFileUpload.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/resources/jjatest/testFileUpload.xhtml
(rev 0)
+++
modules/tests/metamer/trunk/application/src/main/webapp/resources/jjatest/testFileUpload.xhtml 2012-01-17
00:33:46 UTC (rev 23152)
@@ -0,0 +1,29 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:composite="http://java.sun.com/jsf/composite"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+<head>
+<title>Not present in rendered output</title>
+</head>
+<body>
+<composite:interface>
+
+</composite:interface>
+<composite:implementation>
+ <rich:fileUpload id="fileUploadComposite"
+ addLabel="Add new images..."
+ clearAllLabel="Clear all..."
+ clearLabel="Clear"
+
data="#{richFileUploadBean.attributes['data'].value}"
+ doneLabel="Ok, it is here!"
+ uploadLabel="C'mon, upload it!" >
+ </rich:fileUpload>
+
+</composite:implementation>
+</body>
+</html>