All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.adf.jsLibs.Page.js Maven / Gradle / Ivy

The newest version!
function TrPage()
{
this._requestQueue=new TrRequestQueue(window);
this._loadedLibraries=TrPage._collectLoadedLibraries();
}
TrPage._VIEW_STATE_ID="javax.faces.ViewState";
TrPage.getInstance=function()
{
if(TrPage._INSTANCE==null)
TrPage._INSTANCE=new TrPage();
return TrPage._INSTANCE;
}
TrPage.prototype.getRequestQueue=function()
{
return this._requestQueue;
}
TrPage.prototype.sendPartialFormPost=function(a0,a1,a2,a3)
{
var a4=this.getRequestQueue();
if(!this._xhrInited)
{
this._xhrInited=true;
if(this._noPprOverJsfAjax)
{
a4.__disableJsfBuiltInAjaxForXhr();
}
else if(a4.__useJsfBuiltInAjaxForXhr())
{
jsf.ajax.addOnEvent(TrUIUtils.createCallback(this,this._jsfAjaxCallback));
}
}
a4.sendFormPost(this,this._requestStatusChanged,a0,a1,a2,a3);
}
TrPage.prototype._requestStatusChanged=function(a5)
{
if(a5.getStatus()==TrXMLRequestEvent.STATUS_COMPLETE)
{
var a6=a5.getResponseStatusCode();
if(a6>=200&&a6<300)
{
_pprStopBlocking(window);
if(a5.isPprResponse())
{
var a7=a5.getResponseXML();
if(a7!=null)
{
if(a5.isJsfAjaxRequest())
{
this._handleJsfAjaxResponse(a5);
}
else
{
this._handlePprResponse(a5,a7);
}
}
}
else
{
}
}
else if(a6>=400)
{
_pprStopBlocking(window);
}
}
if(a5.isJsfAjaxRequest())
{
this._handleJsfAjaxResponse(a5);
}
}
TrPage.prototype._handleJsfAjaxResponse=function(a8)
{
try
{
var a9=a8.getResponseStatusCode();
if(a9>=200&&a9<300)
{
if(this._ajaxOldDomElements)
{
this._notifyDomReplacementListeners(this._ajaxOldDomElements);
}
if(this._activeNode)
{
var a10=this._activeNode;
delete this._activeNode;
var a11=-1;
if(a10.id)
{
for(var a12=0,size=this._ajaxOldDomElements.length;a12=0)
{
a10=document.getElementById(a10.id);
window._trActiveElement=a10;
if(a10)
{
a10.focus();
}
}
}
}
}
}
finally
{
delete this._ajaxOldDomElements;
delete this._activeNode;
}
}
TrPage.prototype._handlePprResponse=function(a13,a14)
{
var a15=a14.documentElement;
var a16=TrPage._getNodeName(a15);
if(a16=="partial-response")
{
var a17=a15.childNodes;
var a18=a17.length;
for(var a19=0;a19=300)
{
return null;
}
var a125=a124.getElementsByTagName("partial-response");
var a126=a125.length?a125[0].firstChild:null;
if(!a126||a126.nodeName!=="changes")
{
return null;
}
var a127=a126.childNodes;
var a128=[];
for(var a129=0,size=a127.length;a129




© 2015 - 2024 Weber Informatics LLC | Privacy Policy