⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 liveframework.js

📁 Sun的高速缓存CachedRowSet方案资料档
💻 JS
📖 第 1 页 / 共 5 页
字号:
boolLockSection=false;CheckComplete();}
}
objBatch.abort=function()
{fnCallback=null;var iCount=arrBatch.length;for(var i=0;i<iCount;i++)
arrBatch[i].abort();boolExecuting=false;}
return objBatch;}
function dispose()
{objNetwork.abortAll(true);arrStream=objNetwork.oninvoke=objNetwork.onfinished=objNetwork.onabort=objNetwork.onhttperror=objNetwork.onprofile=objNetwork.onerror=objNetwork.ontimeout=objNetwork.onrequest=null;}
__Web_Runtime.onunload.attach(dispose);}
__Web_Network.Flags=__Web_Flags.create("SERIALIZE",1,"DUPLICATE",2,"NOTIFY",4,"CACHEONLY",8);__Web_Network.Type=__Web_Enum.create("XML","Image","Script","XMLPost","XMLGet","CSS","Stream");__Web_Network.StreamState=__Web_Enum.create("Loading","Update","BatchUpdate","Flush","Complete","Timeout");__Web_Network.MAXACTIVE=2;__Web_Network.ApplyAppDomain=false;if(!document.head)_dh=document.head=_get("head")[0];__Web_Network.Fpp=function(p_strUrl,cfg)
{var defaultRetry=2;var p_enumFlags=0;var oFppHeaders={};oFppHeaders["Content-Type"]="application/x-www-form-urlencoded";if(typeof(cfg)=="undefined")
{cfg={};}
if((typeof(cfg.ServerTunnelingUrl)=="string")&&
(typeof(cfg.UseClientXmlProxy)=="undefined"||cfg.UseClientXmlProxy==false))
{oFppHeaders["FPPRPURL"]=cfg.ServerTunnelingUrl;}
if(typeof(cfg.CommandType)=="undefined")
{cfg.CommandType=0;}
if(typeof(cfg.Version)=="undefined")
{cfg.Version=0;}
if(typeof(cfg.PartnerId)=="undefined")
{cfg.PartnerId="";}
if(typeof(cfg.SessionId)=="undefined")
{cfg.SessionId="";}
if(__Web_Type.isNumber(cfg.DefaultRetry))
{defaultRetry=cfg.DefaultRetry;}
if(__Web_Type.isBoolean(cfg.Notify)&&cfg.Notify)
{p_enumFlags=p_enumFlags|__Web_Network.Flags.NOTIFY;}
oFppHeaders["X-FPP-Command"]=cfg.CommandType;if(cfg.PartnerId==null)
{cfg.PartnerId=0;}
function FppFinished(proxy,obj)
{__Web_Network.onfinished.fire(obj);var pkg={"ErrorCode":0,"Context":obj.context,"Proxy":proxy,"Error":null};try
{if(proxy==null)
{pkg.ErrorCode=-4;}
else if((proxy.statusText==null)||(proxy.statusText==""))
{pkg.ErrorCode=-5;}
else if((proxy.status!=200)&&(proxy.status!=500))
{pkg.ErrorCode=-7;}
}
catch(ex)
{pkg.ErrorCode=-5;}
if(pkg.ErrorCode!=0)
{if(++obj.nRetry<=defaultRetry)
{obj.bRetry=true;return;}
__Web_Network.onerror.fire(pkg);if(obj.cbErr)
{obj.cbErr(pkg.ErrorCode,pkg.Context,pkg.Proxy,pkg.Error);}
}
else
{try
{var strUrl=proxy.getResponseHeader("FPPRPURL");if(strUrl!=""&&strUrl!=null)
{oFppHeaders["FPPRPURL"]=strUrl;}
}
catch(ex)
{}
var oFppPkg;try
{if(cfg.CommandType==0)
{oFppPkg=eval(proxy.responseText);}
else if(cfg.CommandType==1)
{oFppPkg=eval('('+proxy.responseText+')');}
}
catch(ex)
{pkg.ErrorCode=-6;pkg.Error=ex;if(++obj.nRetry<=defaultRetry)
{obj.bRetry=true;return;}
__Web_Network.onerror.fire(pkg);if(obj.cbErr)
{obj.cbErr(pkg.ErrorCode,pkg.Context,pkg.Proxy,pkg.Error);}
}
__Web_Network.onprofile.fire(oFppPkg.ProfilingInfo);if(obj.oProfile!=null)
{obj.oProfile.EndProfile(oFppPkg.ProfilingInfo);}
if(oFppPkg.Status==0)
{var arrArgs=oFppPkg.OutRefParams;arrArgs.unshift(obj.context);arrArgs.unshift(oFppPkg.Value);obj.callback.apply(null,arrArgs);}
else
{pkg.ErrorCode=oFppPkg.Status;pkg.Error=oFppPkg.Error;__Web_Network.onerror.fire(pkg);if(obj.cbErr)
{obj.cbErr(pkg.ErrorCode,pkg.Context,pkg.Proxy,pkg.Error);}
}
}
obj.bRetry=false;}
this.invoke=function(xmlType,cn,mn,d,cb,oContext,cbErr,nTimeout,p_strGroup,p_ePriority)
{if(cn==null||mn==null||cb==null)
{throw new Error("invalid arguments for __Web_Network.Fpp");}
if(typeof(cb)!="function")
{throw new Error("__Web_Network.Fpp arg list mismatch:  cb must be of type function.");}
if(!p_ePriority)
{p_ePriority=__Web_Utility.Prioritizer.Priorities.High;}
var strData="cn="+cn+"&mn="+mn+"&d="+d+"&v="+cfg.Version;var strPost;var strUrl;var defaultTimeout=__Web_Network.defaultTimeout;var objContext={context:oContext,callback:cb,cbErr:cbErr,bRetry:false,nRetry:0};if(xmlType==__Web_Network.Type.XMLPost)
{strPost=strData;var urlDomainMatch=p_strUrl.match("http\://.+[.](.+\.com)/","i");var docDomainMatch=document.domain.match(".+[.](.+\.com)","i");if(typeof(cfg.CanaryToken)=="string"&&
urlDomainMatch!=null&&urlDomainMatch.length>1&&docDomainMatch!=null&&docDomainMatch.length>1&&
urlDomainMatch[1]==docDomainMatch[1])
{var mt=document.cookie.indexOf(cfg.CanaryToken+"=");if(mt!=-1)
{var end=document.cookie.indexOf(";",mt);if(end==-1)
end=document.cookie.length;strPost=strPost+"&"+cfg.CanaryToken+"="+document.cookie.substring(mt+cfg.CanaryToken.length+1,end);}
}
strUrl=p_strUrl+"?cnmn="+cn+"."+mn+"&ptid="+cfg.PartnerId+"&a="+cfg.SessionId;}
else if(xmlType==__Web_Network.Type.XMLGet)
{strUrl=p_strUrl+"?"+strData+"&ptid="+cfg.PartnerId+"&a="+cfg.SessionId;}
if(typeof(FireAnt)!="undefined"&&typeof(FireAnt.Debug)!="undefined"&&FireAnt.Debug!=null)
{objContext.oProfile=FireAnt.Debug.StartProfile(cn+"."+mn);FireAnt.Debug.Trace(cn+"."+mn);}
if(p_strGroup)
{__Web_Network.abortGroup(p_strGroup);}
if(nTimeout)
{defaultTimeout=nTimeout;}
var request=__Web_Network.createRequest(xmlType,strUrl,objContext,FppFinished,p_ePriority,strPost,oFppHeaders,p_enumFlags,defaultTimeout,p_strGroup,cfg.UseClientXmlProxy);request.execute();return request;}
}
__Web_Network.FppProxy=function(p_strServiceName)
{var m_obj=this;var m_proxy;var m_cfg;this.initialize=function(url,partnerId,sessionId,tunnelUrl,useClientProxy,canaryToken)
{var cfg=
{"Version":0,
"CommandType":0,
"PartnerId":partnerId,
"SessionId":sessionId,
"ServerTunnelingUrl":tunnelUrl,
"UseClientXmlProxy":useClientProxy,
"CanaryToken":canaryToken
};return m_obj.initializeEx(url,cfg);}
this.initializeEx=function(url,cfg)
{m_proxy=new __Web_Network.Fpp(url,cfg);m_cfg=cfg;return m_obj;}
function ClassManager(p_strName,p_arrMembers)
{function AssignProperties()
{var m_this={};var iCount=p_arrMembers.length;for(var i=0;i<iCount;i++)
{m_this[p_arrMembers[i]]=arguments[i];}
m_this.toString=function(includeType)
{var sbProps=[];if(m_cfg.CommandType==0&&includeType)
{sbProps.push(p_strServiceName,".",p_strName,":");}
sbProps.push("{");for(var i=0;i<iCount;i++)
{if(m_cfg.CommandType==1)
{if(typeof(p_arrMembers[i].toString())=="undefined")
{sbProps.push(p_arrMembers[i].type+":");}
else
{sbProps.push(p_arrMembers[i].toString()+":");}
}
sbProps.push(p_arrMembers[i].escape(m_this[p_arrMembers[i]],m_cfg.Version,m_cfg.CommandType==0));sbProps.push(",");}
if(iCount>0)sbProps.pop();sbProps.push("}");return sbProps.join("");}
m_this.__isFppObject=true;return m_this;}
return AssignProperties;}
function MethodManager(p_strMethod,p_arrMembers,p_NetworkType,p_strGroup,p_strNamespace)
{function invoke()
{var sbArgs=[];var intMembers=p_arrMembers.length;for(var i=0;i<intMembers;i++)
{if(m_cfg.CommandType==1)
{if(typeof(p_arrMembers[i].toString())=="undefined")
{sbArgs.push(p_arrMembers[i].type+":");}
else
{sbArgs.push(p_arrMembers[i].toString()+":");}
}
sbArgs.push(p_arrMembers[i].escape(arguments[i],m_cfg.Version,m_cfg.CommandType==0),",")
}
if(intMembers>0)sbArgs.pop();return m_proxy.invoke(p_NetworkType||__Web_Network.Type.XMLPost,p_strNamespace,p_strMethod,sbArgs.join(""),arguments[intMembers],arguments[intMembers+1],arguments[intMembers+2],arguments[intMembers+3],p_strGroup);}
return invoke;}
this.registerFppClass=function(p_strName,p_arrArgs)
{this[p_strName]=ClassManager(p_strName,p_arrArgs);}
this.registerFppMethod=function(p_strName,p_arrArgs,p_strMethod,p_NetworkType,p_strGroup,p_strNameSpace)
{this[p_strName]=MethodManager(p_strMethod||p_strName,p_arrArgs,p_NetworkType||__Web_Network.Type.XMLPost,p_strGroup,p_strNameSpace||strDefaultNamespace);}
this.seal=function()
{this.RegisterClass=this.RegisterMethod=this.Seal=null;}
}
__Web_Network.FppProxy.TypeSystem=function(p_strType,p_strName)
{this.toString=function(){return p_strName}
this.type=p_strType;return this;}
__Web_Network.FppProxy.dateToISO8601=function(date)
{var fmtStr="{0}-{1}-{2}T{3}:{4}:{5}";var hour=date.getHours();if(hour<10)
hour="0"+hour;var minute=date.getMinutes();if(minute<10)
minute="0"+minute;var second=date.getSeconds();if(second<10)
second="0"+second;return __Web_Network.FppProxy.escape(fmtStr.format(date.getFullYear(),date.getMonth()+1,date.getDate(),hour,minute,second));}
__Web_Network.FppProxy.arrayToString=function(p_array,v,includeType)
{var retValue="";if(p_array==null){return retValue;}
if(__Web_Type.isArray(p_array))
{var joinArray=[];joinArray.push("[");for(var i=0;i<p_array.length;i++)
{joinArray.push(__Web_Network.FppProxy.objToStringImpl(p_array[i],v,includeType));joinArray.push(",");}
if(p_array.length>0)joinArray.pop();joinArray.push("]");return joinArray.join("");}
else
{throw new Error("p_array = "+p_array+" is not an array");}
}
__Web_Network.FppProxy.escape=function(p_str,v)
{if(p_str==null)
{return p_str;}
else
{var s="";if(v==0)
{s=p_str.toString();s=encodeURIComponent(s.replace(/([\{|\}\[|\]\,\\])/g,"\\$1"));}
else
{s="\""+p_str.toString()+"\"";s=encodeURIComponent(s.replace(/([\{|\}\[|\]\,\\:])/g,"\\$1"));}
return s;}
}
__Web_Network.FppProxy.objToStringImpl=function(p_strValue,v,includeType)
{var array=[];if((p_strValue==null)||
(typeof(p_strValue)=="undefined"))
{if(includeType)
array.push("null:");array.push("null");}
else if(typeof(p_strValue)=="string")
{if(includeType)
array.push("System.String:");array.push(__Web_Network.FppProxy.escape(p_strValue,v));}
else if(p_strValue.constructor._typeName=="Date")
{if(includeType)
array.push("System.DateTime:");array.push(__Web_Network.FppProxy.dateToISO8601(p_strValue));}
else if(__Web_Type.isArray(p_strValue))
{if(includeType)
array.push("System.Array:");array.push(__Web_Network.FppProxy.arrayToString(p_strValue,v,includeType));}
else if(typeof(p_strValue)=="object")
{if(p_strValue.__isFppObject==true)
{array.push(p_strValue.toString(includeType));}
else
{if(includeType)
array.push("System.Collections.Hashtable:");array.push(__Web_Network.FppProxy.objToString(p_strValue,v,includeType));}
}
else
{if(includeType)
array.push("System.String:");array.push(p_strValue.toString());}
return array.join("");}
__Web_Network.FppProxy.objToString=function(p_strValue,v,includeType)
{var array=[];array.push("{");for(var key in p_strValue)
{array.push(__Web_Network.FppProxy.escape(key,v),":",__Web_Network.FppProxy.objToStringImpl(p_strValue[key],v,includeType),",");}
array.pop();array.push("}");return array.join("");}
__Web_Network.FppProxy.TypeSystem.prototype.escape=function(p_strValue,v,includeType)
{if((p_strValue==null)||(typeof(p_strValue)=="undefined"))
{return "null";}
switch(this.type)
{case "__string":
return __Web_Network.FppProxy.escape(p_strValue,v);case "__date":
return __Web_Network.FppProxy.dateToISO8601(p_strValue);case "__array":
return __Web_Network.FppProxy.arrayToString(p_strValue,v,false);case "__oArray":
case "__object":
return __Web_Network.FppProxy.objToStringImpl(p_strValue,v,includeType);case "__primitive":
case "__enum":
return p_strValue;default:
if(p_strValue.__isFppObject==true)
{return p_strValue;}
else
{return __Web_Network.FppProxy.objToString(p_strValue,v,includeType);}
}
}
__Web_Network.FppProxy.__string=function(p_strName){return new __Web_Network.FppProxy.TypeSystem("__string",p_strName)}
__Web_Network.FppProxy.__date=function(p_strName){return new __Web_Network.FppProxy.TypeSystem("__date",p_strName)}
__Web_Network.FppProxy.__array=function(p_strName){return new __Web_Network.FppProxy.TypeSystem("__array",p_strName)}
__Web_Network.FppProxy.__oArray=function(p_strName){return new __Web_Network.FppProxy.TypeSystem("__oArray",p_strName)}
__Web_Network.FppProxy.__primitive=function(p_strName){return new __Web_Network.FppProxy.TypeSystem("__primitive",p_strName)}
__Web_Network.FppProxy.__object=function(p_strName){return new __Web_Network.FppProxy.TypeSystem("__object",p_strName)}
__Web_Network.FppProxy.__enum=function(p_strName){return new __Web_Network.FppProxy.TypeSystem("__enum",p_strName)}
__Web_Network.FppProxy.__custom=function(p_fnType,strName){return new __Web_Network.FppProxy.TypeSystem(p_fnType,strName)}
registerNamespace("Web.Bindings");var __Web_Bindings=Web.Bindings=new function()
{var objWebBinding=this,m_unloading=false,_de=document.documentElement;this.onerror=__Web_Event.create();function Scope()
{var objOwner,childBindings={},aobjRegistrations={},aobjDefinitions=[];childBindings["_untyped"]=[];this.initialize=function(p_objBinding)
{objOwner=p_objBinding;}
this.getBinding=function()
{return objOwner||this;}
var __documentElement=_de;function CheckRegistration(p_objBinding,p_blnLoad)
{var childList=p_objBinding.constructor._childBase;if(childList)
{var iCount=childList.length;for(var iClass=0;iClass<iCount;iClass++)
{var objReg=aobjRegistrations[childList[iClass]];if(objReg)
{for(var i=objReg.length-1;i>=0;i--)
{var objItem=objReg[i];if(objItem.elRoot===__documentElement||objItem.elRoot.contains(p_objBinding._element))
{objItem.fnCallback(p_objBinding,p_blnLoad);}
}
}
}
}
}
this.add=function(p_objBinding)
{var objConstructor=p_objBinding.constructor,strType=objConstructor._typeName;if(!strType)
{childBindings["_untyped"].push(p_objBinding);}
else
{if(!childBindings[strType])
childBindings[strType]=[p_objBinding];else 
childBindings[strType].push(p_objBinding);}
CheckRegistration(p_objBinding,true);}
this.addDefinition=f

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -