You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ar...@apache.org on 2010/03/30 22:04:32 UTC
svn commit: r929241 - in /myfaces/trinidad/branches/trinidad-1.2.x:
trinidad-examples/trinidad-demo/src/main/webapp/components/inputFile.jspx
trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/xhr/RequestQueue.js
Author: arobinson74
Date: Tue Mar 30 20:04:32 2010
New Revision: 929241
URL: http://svn.apache.org/viewvc?rev=929241&view=rev
Log:
Fix for iframe ppr
Modified:
myfaces/trinidad/branches/trinidad-1.2.x/trinidad-examples/trinidad-demo/src/main/webapp/components/inputFile.jspx (contents, props changed)
myfaces/trinidad/branches/trinidad-1.2.x/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/xhr/RequestQueue.js
Modified: myfaces/trinidad/branches/trinidad-1.2.x/trinidad-examples/trinidad-demo/src/main/webapp/components/inputFile.jspx
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-1.2.x/trinidad-examples/trinidad-demo/src/main/webapp/components/inputFile.jspx?rev=929241&r1=929240&r2=929241&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-1.2.x/trinidad-examples/trinidad-demo/src/main/webapp/components/inputFile.jspx (original)
+++ myfaces/trinidad/branches/trinidad-1.2.x/trinidad-examples/trinidad-demo/src/main/webapp/components/inputFile.jspx Tue Mar 30 20:04:32 2010
@@ -1,48 +1,49 @@
-<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
-
--->
-<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
- xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
- xmlns:trh="http://myfaces.apache.org/trinidad/html"
- xmlns:tr="http://myfaces.apache.org/trinidad">
- <jsp:directive.page contentType="text/html;charset=utf-8"/>
- <f:view>
- <tr:document title="InputFile Demo">
- <tr:form usesUpload="true">
- <tr:panelGroupLayout layout="vertical">
- <f:facet name="separator">
- <tr:separator/>
- </f:facet>
- <tr:panelGroupLayout layout="horizontal">
- <tr:commandLink immediate="true" text="Component Guide" action="guide"/>
- <tr:spacer width="10"/>
- <tr:goLink destination="http://myfaces.apache.org/trinidad/trinidad-api/tagdoc/tr_inputFile.html"
- text="Tag Documentation"/>
- </tr:panelGroupLayout>
- <tr:outputFormatted styleUsage="instruction" value="<b>inputFile</b>"/>
- <tr:inputFile binding="#{editor.component}" label="Label"
- valueChangeListener="#{ui.fileUploaded}"/>
- <tr:commandButton text="Submit"/>
- <jsp:directive.include file="editor.jspf"/>
- </tr:panelGroupLayout>
- </tr:form>
- </tr:document>
- </f:view>
-</jsp:root>
+<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
+ xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:trh="http://myfaces.apache.org/trinidad/html"
+ xmlns:tr="http://myfaces.apache.org/trinidad">
+ <jsp:directive.page contentType="text/html;charset=utf-8"/>
+ <f:view>
+ <tr:document title="InputFile Demo">
+ <tr:form usesUpload="true">
+ <tr:panelGroupLayout layout="vertical">
+ <f:facet name="separator">
+ <tr:separator/>
+ </f:facet>
+ <tr:panelGroupLayout layout="horizontal">
+ <tr:commandLink immediate="true" text="Component Guide" action="guide"/>
+ <tr:spacer width="10"/>
+ <tr:goLink destination="http://myfaces.apache.org/trinidad/trinidad-api/tagdoc/tr_inputFile.html"
+ text="Tag Documentation"/>
+ </tr:panelGroupLayout>
+ <tr:outputFormatted styleUsage="instruction" value="<b>inputFile</b>"/>
+ <tr:inputFile binding="#{editor.component}" label="Label"
+ valueChangeListener="#{ui.fileUploaded}"
+ partialTriggers="cb1" />
+ <tr:commandButton text="Submit" id="cb1" partialSubmit="true" />
+ <jsp:directive.include file="editor.jspf"/>
+ </tr:panelGroupLayout>
+ </tr:form>
+ </tr:document>
+ </f:view>
+</jsp:root>
Propchange: myfaces/trinidad/branches/trinidad-1.2.x/trinidad-examples/trinidad-demo/src/main/webapp/components/inputFile.jspx
------------------------------------------------------------------------------
svn:eol-style = native
Modified: myfaces/trinidad/branches/trinidad-1.2.x/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/xhr/RequestQueue.js
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/trinidad-1.2.x/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/xhr/RequestQueue.js?rev=929241&r1=929240&r2=929241&view=diff
==============================================================================
--- myfaces/trinidad/branches/trinidad-1.2.x/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/xhr/RequestQueue.js (original)
+++ myfaces/trinidad/branches/trinidad-1.2.x/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/xhr/RequestQueue.js Tue Mar 30 20:04:32 2010
@@ -561,6 +561,25 @@ TrRequestQueue.prototype._appendParamNod
this._paramNodes = nodes;
}
+ if (name == "source")
+ {
+ // The FormRenderer adds a source to the postscript element. As a result, the
+ // value needs to be set, not appended
+ var sourceElements = domDocument.getElementsByName("source");
+ if (sourceElements.length > 0)
+ {
+ for (var i = 0, size = sourceElements.length; i < size; ++i)
+ {
+ var element = sourceElements[i];
+ if (element.tagName == "INPUT")
+ {
+ element.value = value;
+ return;
+ }
+ }
+ }
+ }
+
var node = domDocument.createElement("input");
node.type = "hidden";
node.name = name;