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:06:35 UTC

svn commit: r929242 - in /myfaces/trinidad/trunk: ./ 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:06:35 2010
New Revision: 929242

URL: http://svn.apache.org/viewvc?rev=929242&view=rev
Log:
TRINIDAD-1768 Fix for iframe ppr

Modified:
    myfaces/trinidad/trunk/   (props changed)
    myfaces/trinidad/trunk/trinidad-examples/trinidad-demo/src/main/webapp/components/inputFile.jspx   (contents, props changed)
    myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/xhr/RequestQueue.js

Propchange: myfaces/trinidad/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 30 20:06:35 2010
@@ -5,6 +5,6 @@
 /myfaces/trinidad/branches/ar-1715:908782
 /myfaces/trinidad/branches/ar_clientBehaviors:881469-891464
 /myfaces/trinidad/branches/jwaldman_StyleMap:754977-770778
-/myfaces/trinidad/branches/trinidad-1.2.x:923447,923460
+/myfaces/trinidad/branches/trinidad-1.2.x:923447,923460,929241
 /myfaces/trinidad/branches/trinidad-2.0.x:823098-895949
 /myfaces/trinidad/trunk:819601,819622,834147,886881,888973,893043,896231-908455,908699-921461

Modified: myfaces/trinidad/trunk/trinidad-examples/trinidad-demo/src/main/webapp/components/inputFile.jspx
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-examples/trinidad-demo/src/main/webapp/components/inputFile.jspx?rev=929242&r1=929241&r2=929242&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-examples/trinidad-demo/src/main/webapp/components/inputFile.jspx (original)
+++ myfaces/trinidad/trunk/trinidad-examples/trinidad-demo/src/main/webapp/components/inputFile.jspx Tue Mar 30 20:06:35 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="&lt;b>inputFile&lt;/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="&lt;b>inputFile&lt;/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/trunk/trinidad-examples/trinidad-demo/src/main/webapp/components/inputFile.jspx
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/xhr/RequestQueue.js
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/xhr/RequestQueue.js?rev=929242&r1=929241&r2=929242&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/xhr/RequestQueue.js (original)
+++ myfaces/trinidad/trunk/trinidad-impl/src/main/javascript/META-INF/adf/jsLibs/xhr/RequestQueue.js Tue Mar 30 20:06:35 2010
@@ -503,8 +503,7 @@ TrRequestQueue.prototype._doRequestThrou
   htmlForm.target = frameName;
 
   this._appendParamNode(domDocument, htmlForm, "Tr-XHR-Message", "true");
-  // FIXME: the "partial" parameter is unnecessary
-  this._appendParamNode(domDocument, htmlForm, "partial", "true");
+  //this._appendParamNode(domDocument, htmlForm, "partial", "true");
 
   if(params)
   {
@@ -561,6 +560,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;