Author: konstantin.mishin
Date: 2010-12-03 15:03:23 -0500 (Fri, 03 Dec 2010)
New Revision: 20385
Removed:
sandbox/trunk/ui/fileupload/ui/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java
sandbox/trunk/ui/fileupload/ui/src/main/templates/fileupload.template.xml
Log:
RF-9921
Deleted:
sandbox/trunk/ui/fileupload/ui/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java
===================================================================
---
sandbox/trunk/ui/fileupload/ui/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java 2010-12-03
20:00:01 UTC (rev 20384)
+++
sandbox/trunk/ui/fileupload/ui/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java 2010-12-03
20:03:23 UTC (rev 20385)
@@ -1,46 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright ${year}, 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.
- */
-package org.richfaces.renderkit;
-
-import javax.faces.component.UIComponent;
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-
-import org.richfaces.event.UploadEvent;
-import org.richfaces.request.MultipartRequest;
-
-/**
- * @author Konstantin Mishin
- *
- */
-public class FileUploadRendererBase extends RendererBase {
-
- @Override
- protected void doDecode(FacesContext context, UIComponent component) {
- ExternalContext externalContext = context.getExternalContext();
- Object request = externalContext.getRequest();
- if (request instanceof MultipartRequest
- &&
externalContext.getRequestParameterMap().containsKey(component.getClientId(context))) {
- component.queueEvent(new UploadEvent(component, ((MultipartRequest)
request).getUploadItems()));
- }
- }
-}
Deleted: sandbox/trunk/ui/fileupload/ui/src/main/templates/fileupload.template.xml
===================================================================
--- sandbox/trunk/ui/fileupload/ui/src/main/templates/fileupload.template.xml 2010-12-03
20:00:01 UTC (rev 20384)
+++ sandbox/trunk/ui/fileupload/ui/src/main/templates/fileupload.template.xml 2010-12-03
20:03:23 UTC (rev 20385)
@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-JBoss, Home of Professional Open Source
-Copyright ${year}, 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.
--->
-<cdk:root
xmlns="http://jboss.org/schema/richfaces/cdk/xhtml-el"
xmlns:cdk="http://jboss.org/schema/richfaces/cdk/core"
-
xmlns:cc="http://jboss.org/schema/richfaces/cdk/jsf/composite"
xmlns:c="http://jboss.org/schema/richfaces/cdk/jstl/core"
-
xmlns:xi="http://www.w3.org/2001/XInclude">
- <cc:interface>
- <cdk:class>org.richfaces.renderkit.html.FileUploadRenderer</cdk:class>
- <cdk:superclass>org.richfaces.renderkit.FileUploadRendererBase</cdk:superclass>
- <cdk:component-family>org.richfaces.FileUpload</cdk:component-family>
- <cdk:renderer-type>org.richfaces.FileUploadRenderer</cdk:renderer-type>
- <cdk:resource-dependency library="org.richfaces"
name="fileupload.ecss" />
- <cdk:resource-dependency library="org.richfaces"
name="ajax.reslib" />
- <cdk:resource-dependency library="org.richfaces"
name="base-component.reslib" />
- <cdk:resource-dependency name="richfaces-event.js" />
- <cdk:resource-dependency library="org.richfaces"
name="fileupload.js" />
- </cc:interface>
- <cc:implementation>
- <cdk:object name="attributes"
value="#{component.attributes}"/>
- <cdk:object name="enabled"
value="#{attributes['enabled']}"/>
- <div id="#{clientId}" class="rf-fu
#{attributes['styleClass']}"
- cdk:passThroughWithExclusions="">
- <div class="rf-fu-hdr">
- <span class="rf-fu-btns-lft">
- <span class="rf-fu-btn-add#{enabled ? '' :
'-dis'}">
- <span class="rf-fu-btn-cnt-add#{enabled ? '' :
'-dis'}">
- <c:if test="#{enabled}">
- <span class="rf-fu-inp-cntr"> <!-- This span is needed for IE7
only. -->
- <input type="file" class="rf-fu-inp"/>
- </span>
- </c:if>
- <cdk:object name="addLabel"
value="#{attributes['addLabel']}"/>
- #{addLabel != null ? addLabel : 'Add...'}
- </span>
- </span>
- <c:if test="#{enabled}">
- <span class="rf-fu-btn-upl">
- <cdk:object name="uploadLabel"
value="#{attributes['uploadLabel']}"/>
- <span class="rf-fu-btn-cnt-upl">#{uploadLabel != null ?
uploadLabel : 'Upload'}</span>
- </span>
- </c:if>
- </span>
- <c:if test="#{enabled}">
- <span class="rf-fu-btns-rgh">
- <span class="rf-fu-btn-clr">
- <cdk:object name="clearAllLabel"
value="#{attributes['clearAllLabel']}"/>
- <span class="rf-fu-btn-cnt-clr">#{clearAllLabel != null ?
clearAllLabel : 'Clear All'}</span>
- </span>
- </span>
- </c:if>
- </div>
- <div class="rf-fu-lst"/>
- <c:if test="#{enabled}">
- <div class="rf-fu-cntr-hdn">
- <iframe name="#{clientId}"/>
- <cdk:object name="progressBar"
value="#{component.facets['progress']}"/>
- <c:if test="#{progressBar != null and progressBar.isRendered()}">
- <cdk:call expression="progressBar.encodeAll(facesContext)" />
- </c:if>
- </div>
- <cdk:scriptObject name="options">
- <cdk:scriptOption attributes="acceptedTypes noDuplicate onfilesubmit
onuploadcomplete doneLabel
- sizeExceededLabel stoppedLabel serverErrorLabel clearLabel deleteLabel"/>
- </cdk:scriptObject>
- <script type="text/javascript">new
RichFaces.ui.FileUpload(#{toScriptArgs(clientId, options)});</script>
- </c:if>
- </div>
- </cc:implementation>
-</cdk:root>