_id stringlengths 2 6 | title stringlengths 0 58 | partition stringclasses 3
values | text stringlengths 52 373k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q18800 | handleGetTransports | train | function handleGetTransports(sUri, sMethod, oData, mOptions, resolve, reject){
if (sUri.match(/^\/sap\/bc\/lrep\/actions\/gettransports\//)){
resolve({
response: {
"transports": [
{
"transportId": "U31K008488",
"description": "The Ultimate Transport",
"owner": "Fantasy Owner",
... | javascript | {
"resource": ""
} |
q18801 | train | function (oChange, aActiveContexts) {
var sChangeContext = oChange.context || "";
if (!sChangeContext) {
// change is free of context (always applied)
return true;
}
return aActiveContexts && aActiveContexts.indexOf(sChangeContext) !== -1;
} | javascript | {
"resource": ""
} | |
q18802 | train | function (aContextObjects) {
var aDesignTimeContextIdsByUrl = this._getContextIdsFromUrl();
if (aDesignTimeContextIdsByUrl.length === 0) {
// [default: runtime] use runtime contexts
return this._getContextParametersFromAPI(aContextObjects)
.then(this._getActiveContextsByAPIParameters.bind(this, aCon... | javascript | {
"resource": ""
} | |
q18803 | train | function (aContextObjects) {
var aRequiredContextParameters = [];
aContextObjects.forEach(function (oContext) {
oContext.parameters.forEach(function (oContextParameter) {
var sSelector = oContextParameter.selector;
if (aRequiredContextParameters.indexOf(sSelector) === -1) {
aRequiredContextPa... | javascript | {
"resource": ""
} | |
q18804 | train | function (aContextObjects, aRuntimeContextParameters) {
var that = this;
var aActiveContexts = [];
aContextObjects.forEach(function (oContext) {
if (that._isContextObjectActive(oContext, aRuntimeContextParameters)) {
aActiveContexts.push(oContext.id);
}
});
return aActiveContexts;
} | javascript | {
"resource": ""
} | |
q18805 | train | function(aContextObjects, aDesignTimeContextIdsByUrl) {
var aActiveContexts = [];
aContextObjects.forEach(function (oContext) {
var bContextActive = ((aDesignTimeContextIdsByUrl ? Array.prototype.indexOf.call(aDesignTimeContextIdsByUrl, oContext.id) : -1)) !== -1;
if (bContextActive) {
aActiveConte... | javascript | {
"resource": ""
} | |
q18806 | train | function(oContext, aRuntimeContextParameters) {
var that = this;
var bContextActive = true;
var aParameterOfContext = oContext.parameters;
aParameterOfContext.every(function (oParameter) {
bContextActive = bContextActive && that._checkContextParameter(oParameter, aRuntimeContextParameters);
return ... | javascript | {
"resource": ""
} | |
q18807 | train | function (oParameter, aRuntimeContext) {
var sSelector = oParameter.selector;
var sOperator = oParameter.operator;
var oValue = oParameter.value;
switch (sOperator) {
case "EQ":
return this._checkEquals(sSelector, oValue, aRuntimeContext);
case "NE":
return !this._checkEquals(sSelector, o... | javascript | {
"resource": ""
} | |
q18808 | train | function () {
var aPublicElements = [];
var mComponents = core.mObjects.component;
var mUIAreas = core.mUIAreas;
for (var i in mComponents) {
aPublicElements = aPublicElements.concat(
getPublicElementsInside(mComponents[i])
);
}
for (var key in mUIAreas) {
aPubli... | javascript | {
"resource": ""
} | |
q18809 | train | function (classNameSelector) {
if (typeof classNameSelector === "string") {
return elements.filter(function (element) {
return element.getMetadata().getName() === classNameSelector;
});
}
if (typeof classNameSelector === "function") {
return elements.filter(function (element) {
... | javascript | {
"resource": ""
} | |
q18810 | train | function (type) {
var log = jQuery.sap.log.getLogEntries(),
loggedObjects = [], elemIds;
// Add logEntries that have support info object,
// and that have the same type as the type provided
log.forEach(function (logEntry) {
if (!logEntry.supportInfo) {
return;
}
if (... | javascript | {
"resource": ""
} | |
q18811 | createUniversalUTCDate | train | function createUniversalUTCDate(oDate, sCalendarType) {
if (sCalendarType) {
return UniversalDate.getInstance(createUTCDate(oDate), sCalendarType);
} else {
return new UniversalDate(createUTCDate(oDate).getTime());
}
} | javascript | {
"resource": ""
} |
q18812 | createUTCDate | train | function createUTCDate(oDate) {
var oUTCDate = new Date(Date.UTC(0, 0, 1));
oUTCDate.setUTCFullYear(oDate.getFullYear(), oDate.getMonth(), oDate.getDate());
return oUTCDate;
} | javascript | {
"resource": ""
} |
q18813 | checkNumericLike | train | function checkNumericLike(value, message) {
if (value == undefined || value === Infinity || isNaN(value)) {//checks also for null.
throw message;
}
} | javascript | {
"resource": ""
} |
q18814 | train | function(element) {
var links = element.querySelectorAll("a.xref, a.link, area"),
i,
link,
href,
startsWithHash,
startsWithHTTP;
for (i = 0; i < links.length; i++) {
link = links[i];
href = link.getAttribute("href");
startsWithHash = href.indexOf("#") == 0;
startsWi... | javascript | {
"resource": ""
} | |
q18815 | train | function (event) {
var href = event.oSource.getHref() || event.oSource.getTarget();
href = href.replace("#/", "").split('/');
/** @type string */
var page = href[0];
/** @type string */
var parameter = href[1];
event.preventDefault();
this.getRouter().navTo(page, {id: parameter}, true);... | javascript | {
"resource": ""
} | |
q18816 | train | function (oEvent) {
var isOpenUI5 = this.getView().getModel("welcomeView").getProperty("/isOpenUI5"),
sUrl = isOpenUI5 ? "http://openui5.org/download.html" : "https://tools.hana.ondemand.com/#sapui5";
window.open(sUrl, "_blank");
} | javascript | {
"resource": ""
} | |
q18817 | train | function(size) {
var result = 0,
i;
this.checkOffset(size);
for (i = this.index + size - 1; i >= this.index; i--) {
result = (result << 8) + this.byteAt(i);
}
this.index += size;
return result;
} | javascript | {
"resource": ""
} | |
q18818 | train | function(asUTF8) {
var result = getRawData(this);
if (result === null || typeof result === "undefined") {
return "";
}
// if the data is a base64 string, we decode it before checking the encoding !
if (this.options.base64) {
result = base64.decode(result);
}
if (asUTF8 && thi... | javascript | {
"resource": ""
} | |
q18819 | train | function(dec, bytes) {
var hex = "",
i;
for (i = 0; i < bytes; i++) {
hex += String.fromCharCode(dec & 0xff);
dec = dec >>> 8;
}
return hex;
} | javascript | {
"resource": ""
} | |
q18820 | train | function() {
var result = {}, i, attr;
for (i = 0; i < arguments.length; i++) { // arguments is not enumerable in some browsers
for (attr in arguments[i]) {
if (arguments[i].hasOwnProperty(attr) && typeof result[attr] === "undefined") {
result[attr] = arguments[i][attr];
... | javascript | {
"resource": ""
} | |
q18821 | train | function(path) {
if (path.slice(-1) == '/') {
path = path.substring(0, path.length - 1);
}
var lastSlash = path.lastIndexOf('/');
return (lastSlash > 0) ? path.substring(0, lastSlash) : "";
} | javascript | {
"resource": ""
} | |
q18822 | train | function(input) {
if (input.length !== 0) {
// with an empty Uint8Array, Opera fails with a "Offset larger than array size"
input = utils.transformTo("uint8array", input);
this.data.set(input, this.index);
this.index += input.length;
}
} | javascript | {
"resource": ""
} | |
q18823 | train | function(name, data, o) {
if (arguments.length === 1) {
if (utils.isRegExp(name)) {
var regexp = name;
return this.filter(function(relativePath, file) {
return !file.options.dir && regexp.test(relativePath);
});
}
... | javascript | {
"resource": ""
} | |
q18824 | train | function(options) {
options = extend(options || {}, {
base64: true,
compression: "STORE",
type: "base64"
});
utils.checkSupport(options.type);
var zipData = [],
localDirLength = 0,
centralDirLength = 0,
writer, i;
... | javascript | {
"resource": ""
} | |
q18825 | stringToArrayLike | train | function stringToArrayLike(str, array) {
for (var i = 0; i < str.length; ++i) {
array[i] = str.charCodeAt(i) & 0xFF;
}
return array;
} | javascript | {
"resource": ""
} |
q18826 | arrayLikeToArrayLike | train | function arrayLikeToArrayLike(arrayFrom, arrayTo) {
for (var i = 0; i < arrayFrom.length; i++) {
arrayTo[i] = arrayFrom[i];
}
return arrayTo;
} | javascript | {
"resource": ""
} |
q18827 | train | function(expectedSignature) {
var signature = this.reader.readString(4);
if (signature !== expectedSignature) {
throw new Error("Corrupted zip or bug : unexpected signature " + "(" + utils.pretty(signature) + ", expected " + utils.pretty(expectedSignature) + ")");
}
} | javascript | {
"resource": ""
} | |
q18828 | train | function() {
var i, file;
for (i = 0; i < this.files.length; i++) {
file = this.files[i];
this.reader.setIndex(file.localHeaderOffset);
this.checkSignature(sig.LOCAL_FILE_HEADER);
file.readLocalPart(this.reader);
file.handleUTF8();
}
... | javascript | {
"resource": ""
} | |
q18829 | train | function() {
var offset = this.reader.lastIndexOfSignature(sig.CENTRAL_DIRECTORY_END);
if (offset === -1) {
throw new Error("Corrupted zip : can't find end of central directory");
}
this.reader.setIndex(offset);
this.checkSignature(sig.CENTRAL_DIRECTORY_END);
... | javascript | {
"resource": ""
} | |
q18830 | train | function(reader, from, length, compression, uncompressedSize) {
return function() {
var compressedFileData = utils.transformTo(compression.uncompressInputType, this.getCompressedContent());
var uncompressedFileData = compression.uncompress(compressedFileData);
if (uncompres... | javascript | {
"resource": ""
} | |
q18831 | train | function (oTreeViewModelRules) {
var aSelectedRules = storage.getSelectedRules();
if (!aSelectedRules) {
return null;
}
if (!oTreeViewModelRules) {
return null;
}
aSelectedRules.forEach(function (oRuleDescriptor) {
Object.keys(oTreeViewModelRules).forEach(function(iKey) {
oTreeVie... | javascript | {
"resource": ""
} | |
q18832 | train | function (aSelectedRules) {
var oTreeViewModelRules = this.model.getProperty("/treeModel");
// deselect all
Object.keys(oTreeViewModelRules).forEach(function(iKey) {
oTreeViewModelRules[iKey].nodes.forEach(function(oRule) {
oRule.selected = false;
});
});
// select those from aSelectedRule... | javascript | {
"resource": ""
} | |
q18833 | train | function (tempTreeModelWithAdditionalRuleSets, oTreeModelWithSelection) {
Object.keys(tempTreeModelWithAdditionalRuleSets).forEach(function(iKey) {
Object.keys(oTreeModelWithSelection).forEach(function(iKey) {
if (tempTreeModelWithAdditionalRuleSets[iKey].id === oTreeModelWithSelection[iKey].id) {
te... | javascript | {
"resource": ""
} | |
q18834 | train | function (oTreeModel, aAdditionalRuleSetsNames) {
if (!aAdditionalRuleSetsNames) {
return;
}
aAdditionalRuleSetsNames.forEach(function (sRuleName) {
Object.keys(oTreeModel).forEach(function(iKey) {
if (oTreeModel[iKey].name === sRuleName) {
oTreeModel[iKey].selected = false;
oTreeMod... | javascript | {
"resource": ""
} | |
q18835 | genValidHourValues | train | function genValidHourValues(b24H, sLeadingChar) {
var iStart = b24H ? 0 : 1,
b2400 = this._oTimePicker.getSupport2400() ? 24 : 23,//if getSupport2400, the user could type 24 in the input
iEnd = b24H ? b2400 : 12;
return genValues(iStart, iEnd, sLeadingChar);
} | javascript | {
"resource": ""
} |
q18836 | train | function (oOptions, sType) {
var oObject;
try {
if (sType === "Component" && !this.async) {
Log.error("sap.ui.core.routing.Target doesn't support loading component in synchronous mode, please switch routing to async");
throw new Error("sap.ui.core.routing.Target doesn't support loading compone... | javascript | {
"resource": ""
} | |
q18837 | train | function (sName, sType, oObject) {
var oInstanceCache;
this._checkName(sName, sType);
assert(sType === "View" || sType === "Component", "sType must be either 'View' or 'Component'");
oInstanceCache = this._oCache[sType.toLowerCase()][sName];
if (!oInstanceCache) {
oInstanceCache = this._oCac... | javascript | {
"resource": ""
} | |
q18838 | train | function () {
EventProvider.prototype.destroy.apply(this);
if (this.bIsDestroyed) {
return this;
}
function destroyObject(oObject) {
if (oObject && oObject.destroy) {
oObject.destroy();
}
}
Object.keys(this._oCache).forEach(function (sType) {
var oTypeCache = this._o... | javascript | {
"resource": ""
} | |
q18839 | train | function (sName, sType) {
if (!sName) {
var sMessage = "A name for the " + sType.toLowerCase() + " has to be defined";
Log.error(sMessage, this);
throw Error(sMessage);
}
} | javascript | {
"resource": ""
} | |
q18840 | train | function(oRM, oControl) {
// render an invisible, but easily identifiable placeholder for the content
oRM.write("<div id=\"" + RenderPrefixes.Dummy + oControl.getId() + "\" style=\"display:none\">");
// Note: we do not render the content string here, but only in onAfterRendering
// This has the advantage t... | javascript | {
"resource": ""
} | |
q18841 | cleanTree | train | function cleanTree (oSymbol) {
delete oSymbol.treeName;
delete oSymbol.parent;
if (oSymbol.children) {
oSymbol.children.forEach(o => cleanTree(o));
}
} | javascript | {
"resource": ""
} |
q18842 | addInfixOperator | train | function addInfixOperator(sId, iLbp) {
// Note: this function is executed at load time only!
mFilterParserSymbols[sId] = {
lbp : iLbp,
led : function (oToken, oLeft) {
oToken.type = "Edm.Boolean"; // Note: currently we only support logical operators
oToken.precedence = iLbp;
oToken.left = oLeft;
... | javascript | {
"resource": ""
} |
q18843 | addLeafSymbol | train | function addLeafSymbol(sId) {
// Note: this function is executed at load time only!
mFilterParserSymbols[sId] = {
lbp : 0,
nud : function (oToken) {
oToken.precedence = 99; // prevent it from being enclosed in brackets
return oToken;
}
};
} | javascript | {
"resource": ""
} |
q18844 | brackets | train | function brackets() {
for (;;) {
oToken = that.advance();
if (!oToken || oToken.id === ';') {
that.expected("')'", oToken);
}
sValue += oToken.value;
if (oToken.id === ")") {
return;
}
if (oToken.id === "(") {
brackets();
}
}
} | javascript | {
"resource": ""
} |
q18845 | tokenizeDoubleQuotedString | train | function tokenizeDoubleQuotedString(sNext, sOption, iAt) {
var c,
sEscape,
bEscaping = false,
i;
for (i = 1; i < sNext.length; i += 1) {
if (bEscaping) {
bEscaping = false;
} else {
c = sNext[i];
if (c === "%") {
sEscape = sNext.slice(i + 1, i + 3);
if (rEscapeDigits.test(sEsca... | javascript | {
"resource": ""
} |
q18846 | tokenize | train | function tokenize(sOption) {
var iAt = 1, // The token's position for error messages; we count starting with 1
sId,
aMatches,
sNext = sOption,
iOffset,
oToken,
aTokens = [],
sValue;
while (sNext.length) {
aMatches = rToken.exec(sNext);
iOffset = 0;
if (aMatches) {
sValue = aMatche... | javascript | {
"resource": ""
} |
q18847 | train | function (sSampleId, sIframePath) {
var aIFramePathParts = sIframePath.split("/"),
i;
for (i = 0; i < aIFramePathParts.length - 1; i++) {
if (aIFramePathParts[i] == "..") {
// iframe path has parts pointing one folder up so remove last part of the sSampleId
sSampleId = sSampleId.substring... | javascript | {
"resource": ""
} | |
q18848 | train | function(oSyncPoint) {
// application cachebuster mechanism (copy of array for later modification)
var oConfig = oConfiguration.getAppCacheBuster();
if (oConfig && oConfig.length > 0) {
oConfig = oConfig.slice();
// flag to activate the cachebuster
var bActive = true;
// fallback fo... | javascript | {
"resource": ""
} | |
q18849 | train | function() {
// activate the session (do not create the session for compatibility reasons with mIndex previously)
oSession.active = true;
// store the original function / property description to intercept
fnValidateProperty = ManagedObject.prototype.validateProperty;
descScriptSrc = Object.getOwnP... | javascript | {
"resource": ""
} | |
q18850 | train | function(descriptor) {
var newDescriptor = {
get: descriptor.get,
set: function(val) {
if (fnIsACBUrl(val)) {
val = fnConvertUrl(val);
}
descriptor.set.call(this, val);
},
enumerable: descriptor.enumerable,
configurable: descriptor.configurable
};
... | javascript | {
"resource": ""
} | |
q18851 | train | function() {
// remove the function interceptions
ManagedObject.prototype.validateProperty = fnValidateProperty;
// only remove xhr interception if xhr#open was not modified meanwhile
if (XMLHttpRequest.prototype.open === fnEnhancedXhrOpen) {
XMLHttpRequest.prototype.open = fnXhrOpenOrig;
}
... | javascript | {
"resource": ""
} | |
q18852 | train | function(sUrl) {
// local resources are registered with "./" => we remove the leading "./"!
// (code location for this: sap/ui/Global.js:sap.ui.localResources)
// we by default normalize all relative URLs for a common base
var oUri = URI(sUrl || "./");
if (oUri.is("relative")) { //(sUrl.match(/^\.\... | javascript | {
"resource": ""
} | |
q18853 | _traverseFilter | train | function _traverseFilter (vFilters, fnCheck) {
vFilters = vFilters || [];
if (vFilters instanceof Filter) {
vFilters = [vFilters];
}
// filter has more sub-filter instances (we ignore the subfilters below the any/all operators)
for (var i = 0; i < vFilters.length; i++) {
// check single Filter
var ... | javascript | {
"resource": ""
} |
q18854 | train | function () {
//get all open popups from InstanceManager
var aAllOpenPopups = fnGetPopups();
var aValidatedPopups = [];
var aInvalidatedPopups = [];
aAllOpenPopups.forEach(function(oOpenPopup) {
// check if non-adaptable popup
var bValid = _aPopupFilters.every(function (fnFilter) {
return f... | javascript | {
"resource": ""
} | |
q18855 | train | function (iCurrent) {
// deduct indices reserved from current z-index
var iMaxZIndex = iCurrent - Z_INDICES_RESERVED;
// initial minimum z-index
var iMinZIndex = iCurrent - Z_INDEX_STEP;
var iNextZIndex = fnGetLastZIndex(iMinZIndex, iMaxZIndex, aAssignedZIndices);
aAssignedZIndices.push(iNextZIndex);
... | javascript | {
"resource": ""
} | |
q18856 | setClientDevice | train | function setClientDevice() {
var iClientId = 0;
if (Device.system.combi) {
iClientId = 1;
} else if (Device.system.desktop) {
iClientId = 2;
} else if (Device.system.tablet) {
iClientId = 4;
} else if (Device.system.phone) {
iClientId = 3;
}
return iClientId;
} | javascript | {
"resource": ""
} |
q18857 | createFESR | train | function createFESR(oInteraction, oFESRHandle) {
return [
format(ROOT_ID, 32), // root_context_id
format(sFESRTransactionId, 32), // transaction_id
format(oInteraction.navigation, 16), // client_navigation_time
format(oInteraction.roundtrip, 16), // client_round_trip_time
format(oFESRHandle.timeToInter... | javascript | {
"resource": ""
} |
q18858 | createFESRopt | train | function createFESRopt(oInteraction, oFESRHandle) {
return [
format(oFESRHandle.appNameShort, 20, true), // application_name
format(oFESRHandle.stepName, 20, true), // step_name
"", // not assigned
format(CLIENT_MODEL, 20), // client_model
format(oInteraction.bytesSent, 16), // client_data_sent
form... | javascript | {
"resource": ""
} |
q18859 | format | train | function format(vField, iLength, bCutFromFront) {
if (!vField) {
vField = vField === 0 ? "0" : "";
} else if (typeof vField === "number") {
var iField = vField;
vField = Math.round(vField).toString();
// Calculation of figures may be erroneous because incomplete performance entries lead to negative
/... | javascript | {
"resource": ""
} |
q18860 | train | function(oComponent) {
var aTechnicalParameters = flUtils.getTechnicalParametersForComponent(oComponent);
return aTechnicalParameters
&& aTechnicalParameters[VariantUtil.variantTechnicalParameterName]
&& Array.isArray(aTechnicalParameters[VariantUtil.variantTechnicalParameterName])
&& aTechnicalParame... | javascript | {
"resource": ""
} | |
q18861 | train | function() {
this._ExtensionHelper = ExtensionHelper;
this._ColumnResizeHelper = ColumnResizeHelper;
this._InteractiveResizeHelper = InteractiveResizeHelper;
this._ReorderHelper = ReorderHelper;
this._ExtensionDelegate = ExtensionDelegate;
this._RowHoverHandler = RowHoverHandler;
this._KNOWNCLICKAB... | javascript | {
"resource": ""
} | |
q18862 | train | function(iColIndex, oEvent) {
var oTable = this.getTable();
if (oTable && TableUtils.Column.isColumnMovable(oTable.getColumns()[iColIndex])) {
// Starting column drag & drop. We wait 200ms to make sure it is no click on the column to open the menu.
oTable._mTimeouts.delayedColumnReorderTimerId = setTimeou... | javascript | {
"resource": ""
} | |
q18863 | train | function(oRm) {
oRm.write("<div");
oRm.addClass("sapMListUl");
oRm.addClass("sapMGrowingList");
oRm.writeAttribute("id", this._oControl.getId() + "-triggerList");
oRm.addStyle("display", "none");
oRm.writeClasses();
oRm.writeStyles();
oRm.write(">");
oRm.renderControl(this._getTrigger());
... | javascript | {
"resource": ""
} | |
q18864 | train | function() {
if (!this._oControl || this._bLoading) {
return;
}
// if max item count not reached or if we do not know the count
var oBinding = this._oControl.getBinding("items");
if (oBinding && !oBinding.isLengthFinal() || this._iLimit < this._oControl.getMaxItemsCount()) {
// The GrowingEnable... | javascript | {
"resource": ""
} | |
q18865 | train | function(sChangeReason) {
this._bLoading = false;
this._updateTriggerDelayed(false);
this._oControl.onAfterPageLoaded(this.getInfo(), sChangeReason);
// After the data has been loaded, restore the busy indicator handling of the parent control.
if (this._oControl.setEnableBusyIndicator) {
this._oCont... | javascript | {
"resource": ""
} | |
q18866 | train | function() {
var sTriggerID = this._oControl.getId() + "-trigger",
sTriggerText = this._oControl.getGrowingTriggerText();
sTriggerText = sTriggerText || sap.ui.getCore().getLibraryResourceBundle("sap.m").getText("LOAD_MORE_DATA");
this._oControl.addNavSection(sTriggerID);
if (this._oTrigger) {
thi... | javascript | {
"resource": ""
} | |
q18867 | train | function(oBinding) {
var aSorters = oBinding.aSorters || [];
var oSorter = aSorters[0] || {};
return (oSorter.fnGroup) ? oSorter.sPath || "" : "";
} | javascript | {
"resource": ""
} | |
q18868 | train | function(oContext, oBindingInfo, bSuppressInvalidate) {
var oControl = this._oControl,
oBinding = oBindingInfo.binding,
oItem = this.createListItem(oContext, oBindingInfo);
if (oBinding.isGrouped()) {
// creates group header if need
var aItems = oControl.getItems(true),
oLastItem = aItems[a... | javascript | {
"resource": ""
} | |
q18869 | train | function(oContext, oBindingInfo) {
this._iRenderedDataItems++;
var oItem = oBindingInfo.factory(ManagedObjectMetadata.uid("clone"), oContext);
return oItem.setBindingContext(oContext, oBindingInfo.model);
} | javascript | {
"resource": ""
} | |
q18870 | train | function(aContexts, oModel) {
if (!aContexts.length) {
return;
}
var aItems = this._oControl.getItems(true);
for (var i = 0, c = 0, oItem; i < aItems.length; i++) {
oItem = aItems[i];
// group headers are not in binding context
if (!oItem.isGroupHeader()) {
oItem.setBindingContext(aCo... | javascript | {
"resource": ""
} | |
q18871 | train | function(aContexts, oBindingInfo, bSuppressInvalidate) {
for (var i = 0; i < aContexts.length; i++) {
this.addListItem(aContexts[i], oBindingInfo, bSuppressInvalidate);
}
} | javascript | {
"resource": ""
} | |
q18872 | train | function(aContexts, oBindingInfo, bSuppressInvalidate) {
this.destroyListItems(bSuppressInvalidate);
this.addListItems(aContexts, oBindingInfo, bSuppressInvalidate);
if (bSuppressInvalidate) {
var bHasFocus = this._oContainerDomRef.contains(document.activeElement);
this.applyChunk(false);
bHasFocus... | javascript | {
"resource": ""
} | |
q18873 | train | function(oContext, oBindingInfo, iIndex) {
var oItem = this.createListItem(oContext, oBindingInfo);
this._oControl.insertAggregation("items", oItem, iIndex, true);
this._aChunk.push(oItem);
} | javascript | {
"resource": ""
} | |
q18874 | train | function(sChangeReason) {
if (!this._bDataRequested) {
this._bDataRequested = true;
this._onBeforePageLoaded(sChangeReason);
}
// set iItemCount to initial value if not set or no items at the control yet
if (!this._iLimit || this.shouldReset(sChangeReason) || !this._oControl.getItems(true).length) ... | javascript | {
"resource": ""
} | |
q18875 | train | function(bLoading) {
var oTrigger = this._oTrigger,
oControl = this._oControl;
// If there are no visible columns then also hide the trigger.
if (!oTrigger || !oControl || !oControl.shouldRenderItems() || !oControl.getDomRef()) {
return;
}
var oBinding = oControl.getBinding("items");
if (!oB... | javascript | {
"resource": ""
} | |
q18876 | train | function () {
var sTargetName;
EventProvider.prototype.destroy.apply(this);
for (sTargetName in this._mTargets) {
if (this._mTargets.hasOwnProperty(sTargetName)) {
this._mTargets[sTargetName].destroy();
}
}
this._mTargets = null;
this._oCache = null;
this._oConfig = null;
... | javascript | {
"resource": ""
} | |
q18877 | train | function (sName, oTargetOptions) {
var oOldTarget = this.getTarget(sName),
oTarget;
if (oOldTarget) {
Log.error("Target with name " + sName + " already exists", this);
} else {
oTarget = this._createTarget(sName, oTargetOptions);
this._addParentTo(oTarget);
}
return this;
} | javascript | {
"resource": ""
} | |
q18878 | train | function (sName, oTargetOptions) {
var oTarget,
oOptions;
oOptions = jQuery.extend(true, { _name: sName }, this._oConfig, oTargetOptions);
oTarget = this._constructTarget(oOptions);
oTarget.attachDisplay(function (oEvent) {
var oParameters = oEvent.getParameters();
this.fireDisplay({
... | javascript | {
"resource": ""
} | |
q18879 | addSapParams | train | function addSapParams(oUri) {
['sap-client', 'sap-server'].forEach(function(sName) {
if (!oUri.hasSearch(sName)) {
var sValue = sap.ui.getCore().getConfiguration().getSAPParam(sName);
if (sValue) {
oUri.addSearch(sName, sValue);
}
}
});
} | javascript | {
"resource": ""
} |
q18880 | mergeDefinitionSource | train | function mergeDefinitionSource(mDefinitions, mDefinitionSource, mSourceData, oSource) {
if (mSourceData) {
for (var sName in mDefinitions) {
if (!mDefinitionSource[sName] && mSourceData[sName] && mSourceData[sName].uri) {
mDefinitionSource[sName] = oSource;
}
}
}
} | javascript | {
"resource": ""
} |
q18881 | getManifestEntry | train | function getManifestEntry(oMetadata, oManifest, sKey, bMerged) {
var oData = oManifest.getEntry(sKey);
// merge / extend should only be done for objects or when entry wasn't found
if (oData !== undefined && !isPlainObject(oData)) {
return oData;
}
// merge the configuration of the parent manifest with lo... | javascript | {
"resource": ""
} |
q18882 | createMetadataProxy | train | function createMetadataProxy(oMetadata, oManifest) {
// create a proxy for the metadata object and simulate to be an
// instance of the original metadata object of the Component
// => retrieving the prototype from the original metadata to
// support to proxy sub-classes of ComponentMetadata
var oMetadataP... | javascript | {
"resource": ""
} |
q18883 | activateServices | train | function activateServices(oComponent) {
var oServices = oComponent.getManifestEntry("/sap.ui5/services");
for (var sService in oServices) {
if (oServices[sService].lazy === false) {
oComponent.getService(sService);
}
}
} | javascript | {
"resource": ""
} |
q18884 | getPreloadModelConfigsFromManifest | train | function getPreloadModelConfigsFromManifest(oManifest, oComponentData, mCacheTokens) {
var mModelConfigs = {
afterManifest: {},
afterPreload: {}
};
// deep clone is needed as the mainfest only returns a read-only copy (freezed object)
var oManifestDataSources = jQuery.extend(true, {}, oManifest.getEntry(... | javascript | {
"resource": ""
} |
q18885 | collectLoadManifestPromises | train | function collectLoadManifestPromises(oMetadata, oManifest) {
// ComponentMetadata classes with a static manifest or with legacy metadata
// do already have a manifest, so no action required
if (!oMetadata._oManifest) {
// TODO: If the "manifest" property is set, the code to load the manifest.json could be ... | javascript | {
"resource": ""
} |
q18886 | train | function() {
// create a copy of arguments for local modification
// and later handover to Component constructor
var args = Array.prototype.slice.call(arguments);
// inject the manifest to the settings object
var mSettings;
if (args.length === 0 || typeof args[0] === "object") {
mS... | javascript | {
"resource": ""
} | |
q18887 | train | function(oPromise) {
// In order to make the error handling of the Promise.all() happen after all Promises finish, we catch all rejected Promises and make them resolve with an marked object.
oPromise = oPromise.then(
function(v) {
return {
result: v,
rejected: false
};
... | javascript | {
"resource": ""
} | |
q18888 | train | function(sTemplateName) {
var sUrl = sap.ui.require.toUrl(sTemplateName.replace(/\./g, "/")) + ".fragment.html";
var sHTML = _mHTMLTemplates[sUrl];
var sResourceName;
if (!sHTML) {
sResourceName = sTemplateName.replace(/\./g, "/") + ".fragment.html";
sHTML = LoaderExtensions.loadResource(sResourceN... | javascript | {
"resource": ""
} | |
q18889 | train | function() {
var sName;
// lazy load of LocaleData to avoid cyclic dependencies
if ( !LocaleData ) {
LocaleData = sap.ui.requireSync("sap/ui/core/LocaleData");
}
if (this.calendarType) {
for (sName in CalendarType) {
if (sName.toLowerCase() === this.calendarType.toLowerCase()) {
this... | javascript | {
"resource": ""
} | |
q18890 | train | function(sFormatLocale) {
var oFormatLocale = convertToLocaleOrNull(sFormatLocale),
mChanges;
check(sFormatLocale == null || typeof sFormatLocale === "string" && oFormatLocale, "sFormatLocale must be a BCP47 language tag or Java Locale id or null");
if ( toLanguageTag(oFormatLocale) !== toLanguageTag(thi... | javascript | {
"resource": ""
} | |
q18891 | train | function(sAnimationMode) {
checkEnum(Configuration.AnimationMode, sAnimationMode, "animationMode");
// Set the animation to on or off depending on the animation mode to ensure backward compatibility.
this.animation = (sAnimationMode !== Configuration.AnimationMode.minimal && sAnimationMode !== Configuration.A... | javascript | {
"resource": ""
} | |
q18892 | train | function(bRTL) {
check(bRTL === null || typeof bRTL === "boolean", "bRTL must be null or a boolean");
var oldRTL = this.getRTL(),
mChanges;
this.rtl = bRTL;
if ( oldRTL != this.getRTL() ) { // also take the derived RTL flag into account for the before/after comparison!
mChanges = this._collect();
... | javascript | {
"resource": ""
} | |
q18893 | train | function(mSettings) {
function applyAll(ctx, m) {
var sName, sMethod;
for ( sName in m ) {
sMethod = "set" + sName.slice(0,1).toUpperCase() + sName.slice(1);
if ( sName === 'formatSettings' && ctx.oFormatSettings ) {
applyAll(ctx.oFormatSettings, m[sName]);
} else if ( typeof ctx[sMetho... | javascript | {
"resource": ""
} | |
q18894 | checkEnum | train | function checkEnum(oEnum, sValue, sPropertyName) {
var aValidValues = [];
for (var sKey in oEnum) {
if (oEnum.hasOwnProperty(sKey)) {
if (oEnum[sKey] === sValue) {
return;
}
aValidValues.push(oEnum[sKey]);
}
}
throw new Error("Unsupported Enumeration value for " + sPropertyName + ", valid... | javascript | {
"resource": ""
} |
q18895 | train | function() {
function fallback(that) {
var oLocale = that.oConfiguration.language;
// if any user settings have been defined, add the private use subtag "sapufmt"
if ( !jQuery.isEmptyObject(that.mSettings) ) {
// TODO move to Locale/LocaleData
var l = oLocale.toString();
if ( l.indexOf("-x... | javascript | {
"resource": ""
} | |
q18896 | train | function(sStyle, sPattern) {
check(sStyle == "short" || sStyle == "medium" || sStyle == "long" || sStyle == "full", "sStyle must be short, medium, long or full");
this._set("dateFormats-" + sStyle, sPattern);
return this;
} | javascript | {
"resource": ""
} | |
q18897 | train | function(sType, sSymbol) {
check(sType == "decimal" || sType == "group" || sType == "plusSign" || sType == "minusSign", "sType must be decimal, group, plusSign or minusSign");
this._set("symbols-latn-" + sType, sSymbol);
return this;
} | javascript | {
"resource": ""
} | |
q18898 | train | function(mCurrencies) {
check(typeof mCurrencies === "object" || mCurrencies == null, "mCurrencyDigits must be an object");
Object.keys(mCurrencies || {}).forEach(function(sCurrencyDigit) {
check(typeof sCurrencyDigit === "string");
check(typeof mCurrencies[sCurrencyDigit] === "object");
});
this._s... | javascript | {
"resource": ""
} | |
q18899 | train | function(sFormatId) {
sFormatId = sFormatId ? String(sFormatId).toUpperCase() : "";
check(!sFormatId || M_ABAP_DATE_FORMAT_PATTERN.hasOwnProperty(sFormatId), "sFormatId must be one of ['1','2','3','4','5','6','7','8','9','A','B','C'] or empty");
var mChanges = this.oConfiguration._collect();
this.sLegacyDat... | javascript | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.