1 /* Licensed to the Apache Software Foundation (ASF) under one or more 2 * contributor license agreements. See the NOTICE file distributed with 3 * this work for additional information regarding copyright ownership. 4 * The ASF licenses this file to you under the Apache License, Version 2.0 5 * (the "License"); you may not use this file except in compliance with 6 * the License. You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 18 /** 19 * @class 20 * @name _IFrameRequest 21 * @memberOf myfaces._impl.xhrCore 22 * @extends myfaces._impl.xhrCore._AjaxRequest 23 * @description specialized implementation of the jsf js ajax request class 24 * which utilizes an iframe transport for communications to the server 25 */ 26 _MF_CLS(_PFX_XHR+"_IFrameRequest", myfaces._impl.xhrCore._AjaxRequest, 27 /** @lends myfaces._impl.xhrCore._IFrameRequest.prototype */ 28 { 29 30 /** 31 * @constant 32 * @description request marker that the request is an iframe based request 33 */ 34 JX_PART_IFRAME: "javax.faces.partial.iframe", 35 /** 36 * @constant 37 * @description request marker that the request is an apache myfaces iframe request based request 38 */ 39 MF_PART_IFRAME: "org.apache.myfaces.partial.iframe", 40 41 constructor_: function(arguments) { 42 this._callSuper("constructor_", arguments); 43 }, 44 45 getFormData: function() { 46 var ret = new myfaces._impl.xhrCore.engine.FormData(this._sourceForm); 47 //marker that this is an ajax iframe request 48 ret.append(this.JX_PART_IFRAME, "true"); 49 ret.append(this.MF_PART_IFRAME, "true"); 50 return ret; 51 }, 52 53 _formDataToURI: function(/*formData*/) { 54 //http get alwyays sends the form data 55 return ""; 56 }, 57 58 _getTransport: function() { 59 return new myfaces._impl.xhrCore.engine.IFrame(); 60 } 61 62 }); 63