_id stringlengths 2 6 | title stringlengths 0 58 | partition stringclasses 3
values | text stringlengths 52 373k | language stringclasses 1
value | meta_information dict |
|---|---|---|---|---|---|
q18900 | train | function(sFormatId) {
check(!sFormatId || M_ABAP_TIME_FORMAT_PATTERN.hasOwnProperty(sFormatId), "sFormatId must be one of ['0','1','2','3','4'] or empty");
var mChanges = this.oConfiguration._collect();
this.sLegacyTimeFormat = mChanges.legacyTimeFormat = sFormatId = sFormatId || "";
this.setTimePattern("sh... | javascript | {
"resource": ""
} | |
q18901 | train | function(sFormatId) {
sFormatId = sFormatId ? sFormatId.toUpperCase() : "";
check(!sFormatId || M_ABAP_NUMBER_FORMAT_SYMBOLS.hasOwnProperty(sFormatId), "sFormatId must be one of [' ','X','Y'] or empty");
var mChanges = this.oConfiguration._collect();
this.sLegacyNumberFormat = mChanges.legacyNumberFormat = ... | javascript | {
"resource": ""
} | |
q18902 | train | function(aMappings) {
check(Array.isArray(aMappings), "aMappings must be an Array");
var mChanges = this.oConfiguration._collect();
this.aLegacyDateCalendarCustomizing = mChanges.legacyDateCalendarCustomizing = aMappings;
this.oConfiguration._endCollect();
return this;
} | javascript | {
"resource": ""
} | |
q18903 | train | function(oEvent) {
var oTable = this.getTable();
if (!oTable || TableUtils.getCellInfo(oEvent.target).cell == null) {
return;
}
if (oTable._mTimeouts._cleanupACCExtension) {
clearTimeout(oTable._mTimeouts._cleanupACCExtension);
oTable._mTimeouts._cleanupACCExtension = null;
}
this.updateAc... | javascript | {
"resource": ""
} | |
q18904 | train | function(oEvent) {
var oTable = this.getTable();
if (!oTable) {
return;
}
oTable.$("sapUiTableGridCnt").attr("role", ExtensionHelper.getAriaAttributesFor(this, "CONTENT", {}).role);
oTable._mTimeouts._cleanupACCExtension = setTimeout(function() {
var oTable = this.getTable();
if (!oTable) {
... | javascript | {
"resource": ""
} | |
q18905 | train | function(aPositions) {
for (var index = 0; index < aPositions.length; index++) {
var oPosition = aPositions[index];
var oChildControl = oPosition.getControl();
if (oChildControl) {
AbsoluteLayout.cleanUpControl(oChildControl);
}
}
} | javascript | {
"resource": ""
} | |
q18906 | train | function(oControl){
var bAdapted = false;
if (oControl.getParent() && oControl.getParent().getComputedPosition) {
var oPos = oControl.getParent().getComputedPosition();
if (oPos.top && oPos.bottom || oPos.height) {
jQuery(oControl.getDomRef()).css("height", "100%");
bAdapted = true;
}
if (oPos.l... | javascript | {
"resource": ""
} | |
q18907 | train | function(oThis, sProp, oValue, sChangeType) {
var bHasDomRef = !!oThis.getDomRef();
oThis.setProperty(sProp, oValue, bHasDomRef);
if (bHasDomRef) {
oThis.contentChanged(null, sChangeType);
}
return oThis;
} | javascript | {
"resource": ""
} | |
q18908 | adjustConstraints | train | function adjustConstraints(oType, oConstraints) {
var oAdjustedConstraints = {};
if (oConstraints) {
switch (oConstraints.displayFormat) {
case "Date":
oAdjustedConstraints.isDateOnly = true;
break;
case undefined:
break;
default:
Log.warning("Illegal displayFormat: " + oConstraints.dis... | javascript | {
"resource": ""
} |
q18909 | train | function(oTable, iColumnIndex, bHoverFirstMenuItem, oCell) {
if (!oTable ||
iColumnIndex == null || iColumnIndex < 0) {
return;
}
if (bHoverFirstMenuItem == null) {
bHoverFirstMenuItem = false;
}
var oColumns = oTable.getColumns();
if (iColumnIndex >= oColumns.length) {
return;
}
... | javascript | {
"resource": ""
} | |
q18910 | train | function(oTable, iColumnIndex) {
if (!oTable ||
iColumnIndex == null || iColumnIndex < 0) {
return;
}
var oColumns = oTable.getColumns();
if (iColumnIndex >= oColumns.length) {
return;
}
var oColumn = oColumns[iColumnIndex];
oColumn._closeMenu();
} | javascript | {
"resource": ""
} | |
q18911 | train | function(oTable) {
if (!oTable) {
return;
}
var oMenu = oTable._oCellContextMenu;
var bMenuOpen = oMenu != null && oMenu.bOpen;
if (bMenuOpen) {
oMenu.close();
}
} | javascript | {
"resource": ""
} | |
q18912 | train | function(oTable) {
if (!oTable || !oTable._oCellContextMenu) {
return;
}
oTable._oCellContextMenu.destroy();
oTable._oCellContextMenu = null;
} | javascript | {
"resource": ""
} | |
q18913 | train | function(assert, mActual, mExpected, sMessage) {
var aUnexpectedElements = [];
for (var sId in mActual) {
if (!mExpected[sId]) {
aUnexpectedElements.push(mActual[sId]);
}
}
// enrich with helpful info to more easily identify the leaked control
for (var i = 0; i < aUnexpectedElements.length; i++) {... | javascript | {
"resource": ""
} | |
q18914 | getSortComparator | train | function getSortComparator(fnCompare) {
return function(vValue1, vValue2) {
if (vValue1 === vValue2) {
return 0;
}
if (vValue1 === null) {
return -1;
}
if (vValue2 === null) {
return 1;
}
return fnCompare(vValue1, vValue2);
};
} | javascript | {
"resource": ""
} |
q18915 | reset | train | function reset() {
aBuffer = that.aBuffer = [];
aRenderedControls = that.aRenderedControls = [];
aStyleStack = that.aStyleStack = [{}];
} | javascript | {
"resource": ""
} |
q18916 | triggerBeforeRendering | train | function triggerBeforeRendering(oControl){
bLocked = true;
try {
var oEvent = jQuery.Event("BeforeRendering");
// store the element on the event (aligned with jQuery syntax)
oEvent.srcControl = oControl;
oControl._handleEvent(oEvent);
} finally {
bLocked = false;
}
} | javascript | {
"resource": ""
} |
q18917 | isDomPatchingEnabled | train | function isDomPatchingEnabled() {
if (bDomPatching === undefined) {
bDomPatching = sap.ui.getCore().getConfiguration().getDomPatching();
if (bDomPatching) {
Log.warning("DOM Patching is enabled: This feature should be used only for testing purposes!");
}
}
return bDomPatching;
} | javascript | {
"resource": ""
} |
q18918 | train | function(oRm, oControl) {
if (oControl.getResizeEnabled()) {
fnRenderToggler(oRm, oControl);
}
if (oControl.hasItems()) {
if (oControl.getVisibleStatus() == NotificationBarStatus.Max) {
fnWriteItemsMaximized(oRm, oControl);
} else {
fnWriteItemsDefault(oRm, oControl);
}
}
} | javascript | {
"resource": ""
} | |
q18919 | train | function(oRm, oNotifier, bMessageNotifier) {
var sId = oNotifier.getId();
oRm.write("<li");
oRm.writeElementData(oNotifier);
oRm.addClass("sapUiNotifier");
oRm.writeClasses();
// ItemNavigation can only handle focusable items
oRm.writeAttribute("tabindex", "-1");
oRm.writeAttribute("aria-descr... | javascript | {
"resource": ""
} | |
q18920 | train | function(oRm, aNotifiers) {
for ( var i = 0; i < aNotifiers.length; i++) {
fnRenderNotifier(oRm, aNotifiers[i], false);
}
} | javascript | {
"resource": ""
} | |
q18921 | train | function (oRm, sUri, bMessageNotifier) {
if (sUri == null || sUri == "") {
var icon = new Icon({
useIconTooltip: false
});
icon.addStyleClass("sapUiNotifierIcon");
if (bMessageNotifier) {
icon.setSrc("sap-icon://alert");
} else {
icon.setSrc("sap-icon://notification-2");
}
... | javascript | {
"resource": ""
} | |
q18922 | train | function(oRm, oNotifier, oNotiBar) {
fnRenderNotifier(oRm, oNotifier, true);
fnRenderMessageNotifierMessageArea(oRm, oNotifier, oNotiBar);
} | javascript | {
"resource": ""
} | |
q18923 | train | function(oRm, oMessageNotifier, oNotiBar) {
if (oMessageNotifier.hasItems()) {
var aMessages = oMessageNotifier.getMessages();
var lastItem = aMessages[aMessages.length - 1];
var oMA = oMessageNotifier._oMessageArea;
// this ensures that this message is selectable from the bar
oMA._message = las... | javascript | {
"resource": ""
} | |
q18924 | getViewSettingsItemByKey | train | function getViewSettingsItemByKey(aViewSettingsItems, sKey) {
var i, oItem;
// convenience, also allow strings
// find item with this key
for (i = 0; i < aViewSettingsItems.length; i++) {
if (aViewSettingsItems[i].getKey() === sKey) {
oItem = aViewSettingsItems[i];
break;
}
}
return oItem;
... | javascript | {
"resource": ""
} |
q18925 | findViewSettingsItemByKey | train | function findViewSettingsItemByKey(vItemOrKey, aViewSettingsItems, sErrorMessage) {
var oItem;
// convenience, also allow strings
if (typeof vItemOrKey === "string") {
// find item with this key
oItem = getViewSettingsItemByKey(aViewSettingsItems, vItemOrKey);
if (!oItem) {
Log.error(sErrorMessage)... | javascript | {
"resource": ""
} |
q18926 | restoreCustomTabContentAggregation | train | function restoreCustomTabContentAggregation(sAggregationName, oCustomTab) {
// Make sure page1 exists, as this method may be called on destroy(), after the page was destroyed
// Suppress creation of new page as the following logic is needed only when a page already exists
if (!this._getPage1(true)) {
return;
... | javascript | {
"resource": ""
} |
q18927 | train | function(sOperator) {
this.sOperator = sOperator || StringFilterOperator.StartsWith;
switch (this.sOperator) {
case StringFilterOperator.Equals:
this.fnOperator = fnEquals;
break;
case StringFilterOperator.Contains:
this.fnOperator = fnContains;
break;
case StringFilterOperator.StartsWith:... | javascript | {
"resource": ""
} | |
q18928 | getText | train | function getText(sKey, aParams) {
return sap.ui.getCore().getLibraryResourceBundle().getText(sKey, aParams);
} | javascript | {
"resource": ""
} |
q18929 | train | function (oIssue) {
var element = sap.ui.getCore().byId(oIssue.context.id),
className = "";
if (oIssue.context.id === "WEBPAGE") {
className = "sap.ui.core";
} else if (element) {
className = element.getMetadata().getName();
}
return {
severity: oIssue.severity,
name: oIssue.rule.ti... | javascript | {
"resource": ""
} | |
q18930 | train | function (rules, selectedRulesIDs, issues) {
var rulesViewModel = {},
issueCount = 0,
group = {},
library = {},
rule = {},
rulesCopy = jQuery.extend(true, {}, rules),
issuesCopy = jQuery.extend(true, {}, issues);
for (group in rulesCopy) {
rulesViewModel[group] = jQuery.exten... | javascript | {
"resource": ""
} | |
q18931 | train | function(oRules) {
var index = 0,
innerIndex = 0,
treeTableModel = {},
rulesViewModel,
rule,
rules = [];
rulesViewModel = this.getRulesViewModel(oRules, [], []);
for (var libraryName in rulesViewModel) {
treeTableModel[index] = {
name: libraryName,
id: libraryName ... | javascript | {
"resource": ""
} | |
q18932 | train | function(issuesModel) {
var treeTableModel = {},
index = 0,
innerIndex = 0,
issueCount = 0,
oSortedSeverityCount,
iHighSeverityCount = 0,
iMediumSeverityCount = 0,
iLowSeverityCount = 0;
for (var libName in issuesModel) {
treeTableModel[index] = {
name: libName,
... | javascript | {
"resource": ""
} | |
q18933 | train | function (oIssues) {
var viewModel = [];
for (var i = 0; i < oIssues.length; i++) {
viewModel.push(_convertIssueToViewModel(oIssues[i]));
}
return viewModel;
} | javascript | {
"resource": ""
} | |
q18934 | train | function (oIssues) {
var groupedIssues = {},
issue = {};
for (var i = 0; i < oIssues.length; i++) {
issue = oIssues[i];
if (!groupedIssues[issue.ruleLibName]) {
groupedIssues[issue.ruleLibName] = {};
}
if (!groupedIssues[issue.ruleLibName][issue.ruleId]) {
groupedIssues[i... | javascript | {
"resource": ""
} | |
q18935 | train | function(rm, sClassName, bShouldAdd) {
if (sClassName && (!!bShouldAdd || arguments.length == 2)) {
rm.addClass(sClassName);
if (TAGCONTEXT) {
TAGCONTEXT.writeClasses = true;
}
}
return TableRendererUtils;
} | javascript | {
"resource": ""
} | |
q18936 | train | function(rm, sName, oValue, bShouldAdd) {
if (sName && oValue && (!!bShouldAdd || arguments.length == 3)) {
rm.addStyle(sName, oValue);
if (TAGCONTEXT) {
TAGCONTEXT.writeStyles = true;
}
}
return TableRendererUtils;
} | javascript | {
"resource": ""
} | |
q18937 | train | function(rm, oTable, oConfig) {
oConfig = oConfig || {};
rm.write("<", oConfig.tag || "div");
TAGCONTEXT = oConfig;
if (oConfig.furtherSettings) {
oConfig.furtherSettings(rm, oTable);
}
if (Array.isArray(oConfig.classname) && oConfig.classname.length) {
for (var i = 0; i < oConfig.classname... | javascript | {
"resource": ""
} | |
q18938 | train | function(rm, oTable, oConfig) {
TableRendererUtils.startElement(rm, oTable, oConfig);
TableRendererUtils.endElement(rm, oConfig ? oConfig.tag : null);
return TableRendererUtils;
} | javascript | {
"resource": ""
} | |
q18939 | train | function (listener, listenerContext, priority) {
validateListener(listener, 'add');
return this._registerListener(listener, false, listenerContext, priority);
} | javascript | {
"resource": ""
} | |
q18940 | train | function (listener, context) {
validateListener(listener, 'remove');
var i = this._indexOfListener(listener, context);
if (i !== -1) {
this._bindings[i]._destroy(); //no reason to a SignalBinding exist if it isn't attached to a signal
this._bindings.s... | javascript | {
"resource": ""
} | |
q18941 | train | function (sRoute, oData) {
var oHistory = History.getInstance();
var oPrevHash = oHistory.getPreviousHash();
if (oPrevHash !== undefined) {
window.history.go(-1);
} else {
var bReplace = true; // otherwise we go backwards with a forward history
this.navTo(sRoute, oData, bReplace);
}
} | javascript | {
"resource": ""
} | |
q18942 | train | function (o, oExtension, sTypeClass, sNonDefaultValue, bDeepCopy) {
if (sTypeClass === "EntitySet" && oExtension.value === sNonDefaultValue) {
// potentially nested structure so do deep copy
if (bDeepCopy) {
jQuery.extend(true, o, mV2ToV4[oExtension.name]);
} else {
// Warning: Passing false fo... | javascript | {
"resource": ""
} | |
q18943 | train | function (sV2AnnotationName, oEntitySet, oProperty) {
var aNames = mV2ToV4PropertyCollection[sV2AnnotationName],
sTerm = aNames[0],
sCollection = aNames[1],
oAnnotation = oEntitySet[sTerm] || {},
aCollection = oAnnotation[sCollection] || [];
aCollection.push({ "PropertyPath" : oProperty.name });
... | javascript | {
"resource": ""
} | |
q18944 | train | function (o, oExtension, sTypeClass) {
switch (oExtension.name) {
case "aggregation-role":
if (oExtension.value === "dimension") {
o["com.sap.vocabularies.Analytics.v1.Dimension"] = oBoolTrue;
} else if (oExtension.value === "measure") {
o["com.sap.vocabularies.Analytics.v1.Measure"] = oBoo... | javascript | {
"resource": ""
} | |
q18945 | train | function (aArray, vExpectedPropertyValue, sPropertyName) {
var i, n;
sPropertyName = sPropertyName || "name";
if (aArray) {
for (i = 0, n = aArray.length; i < n; i += 1) {
if (aArray[i][sPropertyName] === vExpectedPropertyValue) {
return i;
}
}
}
return -1;
} | javascript | {
"resource": ""
} | |
q18946 | train | function (aArray, vExpectedPropertyValue, sPropertyName) {
var iIndex = Utils.findIndex(aArray, vExpectedPropertyValue, sPropertyName);
return iIndex < 0 ? null : aArray[iIndex];
} | javascript | {
"resource": ""
} | |
q18947 | train | function (oAnnotations, sQualifiedName, bInContainer) {
var o = bInContainer
? oAnnotations.EntityContainer
: oAnnotations.propertyAnnotations;
return o && o[sQualifiedName] || {};
} | javascript | {
"resource": ""
} | |
q18948 | train | function (oEntityContainer, sArrayName, sName, bAsPath) {
var k,
vResult = bAsPath ? undefined : null;
if (oEntityContainer) {
k = Utils.findIndex(oEntityContainer[sArrayName], sName);
if (k >= 0) {
vResult = bAsPath
? oEntityContainer.$path + "/" + sArrayName + "/" + k
: oEntityCont... | javascript | {
"resource": ""
} | |
q18949 | train | function (vModel, sNamespace) {
var oSchema = null,
aSchemas = Array.isArray(vModel)
? vModel
: vModel.getObject("/dataServices/schema");
if (aSchemas) {
aSchemas.forEach(function (o) {
if (o.namespace === sNamespace) {
oSchema = o;
return false; // break
}
});
}
... | javascript | {
"resource": ""
} | |
q18950 | train | function (oAnnotations, oData, oMetaModel) {
var aSchemas = oData.dataServices.schema;
if (!aSchemas) {
return;
}
aSchemas.forEach(function (oSchema, i) {
var sSchemaVersion;
// remove datajs artefact for inline annotations in $metadata
delete oSchema.annotations;
Utils.liftSAPData(oS... | javascript | {
"resource": ""
} | |
q18951 | train | function (aChildren, mChildAnnotations, sTypeClass, aSchemas, fnCallback,
iStartIndex) {
if (!aChildren) {
return;
}
if (iStartIndex) {
aChildren = aChildren.slice(iStartIndex);
}
aChildren.forEach(function (oChild) {
// lift SAP data for easy access to SAP Annotations for OData V 2.0
... | javascript | {
"resource": ""
} | |
q18952 | train | function (oAnnotations, oSchema, oEntityContainer, oFunctionImport) {
var mAnnotations;
if (!oFunctionImport.parameter) {
return;
}
mAnnotations = Utils.getChildAnnotations(oAnnotations,
oSchema.namespace + "." + oEntityContainer.name, true);
oFunctionImport.parameter.forEach(
function (oPar... | javascript | {
"resource": ""
} | |
q18953 | findIndexInArray | train | function findIndexInArray(aArray, fnPredicate) {
if (aArray == null) {
throw new TypeError('findIndex called with null or undefined array');
}
if (typeof fnPredicate !== 'function') {
throw new TypeError('predicate must be a function');
}
var iLength = aArray.length;
var fnThisArg = arguments... | javascript | {
"resource": ""
} |
q18954 | train | function (oEvent) {
var iPageY = oEvent.touches && oEvent.touches.length ? oEvent.touches[0].pageY : oEvent.pageY;
this._bIsDrag = false;
if (!this.getIsExpanded()) {
return;
}
this._stopAnimation();
this._startDrag(iPageY);
oEvent.preventDefault();
this._mousedown = true;
} | javascript | {
"resource": ""
} | |
q18955 | train | function (oEvent) {
var iPageY = oEvent.touches && oEvent.touches.length ? oEvent.touches[0].pageY : oEvent.pageY;
if (!this._mousedown || !this.getIsExpanded()) {
return;
}
//galaxy s5 android 5.0 fires touchmove every time - so see if it's far enough to call it a drag
if (!this._bIsDrag && this._... | javascript | {
"resource": ""
} | |
q18956 | train | function (oEvent) {
var iPageY = oEvent.changedTouches && oEvent.changedTouches.length ? oEvent.changedTouches[0].pageY : oEvent.pageY;
if (this._bIsDrag === false) {
this.fireTap(oEvent);
this._dragSession = null;
}
this._bIsDrag = true;
if (!this.getIsExpanded()) {
this._dragSession = nu... | javascript | {
"resource": ""
} | |
q18957 | checkModifierKeys | train | function checkModifierKeys(oEvent, bCtrlKey, bAltKey, bShiftKey) {
return oEvent.shiftKey == bShiftKey && oEvent.altKey == bAltKey && getCtrlKey(oEvent) == bCtrlKey;
} | javascript | {
"resource": ""
} |
q18958 | train | function (sType) {
if (!sType) {
return null;
} else {
// remove core prefix
sType = sType.replace("sap.ui.core.", "");
// only take text after last dot
var index = sType.lastIndexOf(".");
return (index !== -1) ? sType.substr(index + 1) : sType;
}
} | javascript | {
"resource": ""
} | |
q18959 | train | function (controlName) {
var oLibComponentModel = data.libComponentInfos;
jQuery.sap.require("sap.ui.core.util.LibraryInfo");
var LibraryInfo = sap.ui.require("sap/ui/core/util/LibraryInfo");
var oLibInfo = new LibraryInfo();
var sActualControlComponent = oLibInfo._getActualComponent(oLibComponentModel, ... | javascript | {
"resource": ""
} | |
q18960 | loadOwnDesignTime | train | function loadOwnDesignTime(oMetadata) {
if (isPlainObject(oMetadata._oDesignTime) || !oMetadata._oDesignTime) {
return Promise.resolve(oMetadata._oDesignTime || {});
}
return new Promise(function(fnResolve) {
var sModule;
if (typeof oMetadata._oDesignTime === "string") {
//oMetadata._oDesignTime poi... | javascript | {
"resource": ""
} |
q18961 | getScopeBasedDesignTime | train | function getScopeBasedDesignTime(mMetadata, sScopeKey) {
var mResult = mMetadata;
if ("default" in mMetadata) {
mResult = merge(
{},
mMetadata.default,
sScopeKey !== "default" && mMetadata[sScopeKey] || null
);
}
return mResult;
} | javascript | {
"resource": ""
} |
q18962 | openExternalLink | train | function openExternalLink (oEvent) {
var newWindow = window.open();
newWindow.opener = null;
newWindow.location = oEvent.currentTarget.href;
oEvent.preventDefault();
} | javascript | {
"resource": ""
} |
q18963 | setMinColWidths | train | function setMinColWidths(oTable) {
var oTableRef = oTable.getDomRef();
var iAbsoluteMinWidth = TableUtils.Column.getMinColumnWidth();
var aNotFixedVariableColumns = [];
var bColumnHeaderVisible = oTable.getColumnHeaderVisible();
function calcNewWidth(iDomWidth, iMinWidth) {
if (iDomWidth <= iMinWidt... | javascript | {
"resource": ""
} |
q18964 | train | function(mArguments) {
var sTitle = this._oTitleProvider && this._oTitleProvider.getTitle();
if (sTitle) {
this.fireTitleChanged({
name: this._oOptions._name,
title: sTitle
});
}
this._bIsDisplayed = true;
return this.fireEvent(this.M_EVENTS.DISPLAY, mArguments);
} | javascript | {
"resource": ""
} | |
q18965 | train | function(oData, fnFunction, oListener) {
var bHasListener = this.hasListeners("titleChanged"),
sTitle = this._oTitleProvider && this._oTitleProvider.getTitle();
this.attachEvent(this.M_EVENTS.TITLE_CHANGED, oData, fnFunction, oListener);
// in case the title is changed before the first event listener ... | javascript | {
"resource": ""
} | |
q18966 | callback | train | function callback(mutationsList, observer) {
mutationsList.forEach(function (mutation) {
if (mutation.type == 'childList') {
var addedNodes = mutation.addedNodes,
removedNodes = mutation.removedNodes,
node,
xnode,
count,
aTags,
i;
for (count = 0; count < addedNodes.l... | javascript | {
"resource": ""
} |
q18967 | createContextInterface | train | function createContextInterface(oWithControl, mSettings, i, vBindingOrContext) {
/*
* Returns the single binding or model context related to the current formatter call.
*
* @param {number} [iPart]
* index of part in case of the root formatter of a composite binding
* @returns {sap.ui.model.Binding|sa... | javascript | {
"resource": ""
} |
q18968 | getPath | train | function getPath(oBindingOrContext) {
return oBindingOrContext instanceof Context
? oBindingOrContext.getPath()
: oBindingOrContext.getModel().resolve(
oBindingOrContext.getPath(), oBindingOrContext.getContext());
} | javascript | {
"resource": ""
} |
q18969 | getAny | train | function getAny(oWithControl, oBindingInfo, mSettings, oScope, bAsync) {
var bValueAsPromise = false;
/*
* Prepares the given binding info or part of it; makes it "one time" and binds its
* formatter function (if opted in) to an interface object.
*
* @param {object} oInfo
* a binding info or a par... | javascript | {
"resource": ""
} |
q18970 | stopAndGo | train | function stopAndGo(aElements, fnCallback) {
var i = -1;
/*
* Visits the next element, taking the result of the previous callback into account.
*
* @param {boolean} bFound
* Whether an element was approved by the corresponding callback
* @returns {sap.ui.base.SyncPromise|any}
* First call retu... | javascript | {
"resource": ""
} |
q18971 | train | function (fnVisitor, sNamespace, sLocalName) {
var fnOldVisitor = mVisitors[sNamespace];
if (fnVisitor !== null && typeof fnVisitor !== "function"
|| fnVisitor === visitNodeWrapper) {
throw new Error("Invalid visitor: " + fnVisitor);
}
if (!sNamespace || sNamespace === sNAMESPACE || sNamespace ===... | javascript | {
"resource": ""
} | |
q18972 | train | function (aElements, fnCallback) {
try {
return SyncPromise.resolve(stopAndGo(aElements, fnCallback));
} catch (e) {
return SyncPromise.reject(e);
}
} | javascript | {
"resource": ""
} | |
q18973 | train | function (sPath) {
var oBindingInfo,
oModel,
sResolvedPath;
sPath = sPath || "";
if (sPath[0] === "{") {
throw new Error("Must be a simple path, not a binding: " + sPath);
}
oBindingInfo = BindingParser.simpleParser("{" + sPath + "}");
oModel = oWithControl.getM... | javascript | {
"resource": ""
} | |
q18974 | getResolvedBinding | train | function getResolvedBinding(sValue, oElement, oWithControl, bMandatory,
fnCallIfConstant) {
var vBindingInfo,
oPromise;
Measurement.average(sPerformanceGetResolvedBinding, "", aPerformanceCategories);
try {
vBindingInfo
= BindingParser.complexParser(sValue, oScope, bMandatory, true, tr... | javascript | {
"resource": ""
} |
q18975 | liftChildNodes | train | function liftChildNodes(oParent, oWithControl, oTarget) {
return visitChildNodes(oParent, oWithControl).then(function () {
var oChild;
oTarget = oTarget || oParent;
while ((oChild = oParent.firstChild)) {
oTarget.parentNode.insertBefore(oChild, oTarget);
}
});
} | javascript | {
"resource": ""
} |
q18976 | visitAttribute | train | function visitAttribute(oElement, oAttribute, oWithControl) {
if (fnSupportInfo) {
fnSupportInfo({context:undefined /*context from node clone*/, env:{caller:"visitAttribute", before: {name: oAttribute.name, value: oAttribute.value}}});
}
return resolveAttributeBinding(oElement, oAttribute, oWithControl... | javascript | {
"resource": ""
} |
q18977 | visitAttributes | train | function visitAttributes(oElement, oWithControl) {
/*
* Comparator for DOM attributes by name.
*
* @param {Attr} oAttributeA
* @param {Attr} oAttributeB
* @returns {number} <0, 0, >0
*/
function comparator(oAttributeA, oAttributeB) {
return oAttributeA.name.localeCompare(oAttr... | javascript | {
"resource": ""
} |
q18978 | visitChildNodes | train | function visitChildNodes(oNode, oWithControl) {
return stopAndGo(
// cache live collection so that removing a template node does not hurt
Array.prototype.slice.apply(oNode.childNodes),
function (oChild) {
return visitNode(oChild, oWithControl);
});
} | javascript | {
"resource": ""
} |
q18979 | visitNode | train | function visitNode(oNode, oWithControl) {
var fnVisitor;
function visitAttributesAndChildren() {
return visitAttributes(oNode, oWithControl).then(function () {
return visitChildNodes(oNode, oWithControl);
}).then(function () {
if (fnSupportInfo) {
fnSupportInfo({context:oNode, env:... | javascript | {
"resource": ""
} |
q18980 | restoreSelectedChildren | train | function restoreSelectedChildren(oNode, aExpandingParents, oFirstCollapsedParent) {
var bIsExpanded = oNode.getExpanded(),
bNodeReferredInParents = false,
bIncludeInExpandingParents = bIsExpanded && !!oNode.getSelectedForNodes().length,
oFirstCollapsedParentNode = (oFirstCollapsedParent || bIsExpanded) ? oFi... | javascript | {
"resource": ""
} |
q18981 | rememberSelectedChildren | train | function rememberSelectedChildren(oNode, oRootNode) {
var aNodes = oNode._getNodes(),
oCurrentNode;
for (var i = 0; i < aNodes.length; i++) {
oCurrentNode = aNodes[i];
if (oCurrentNode.getIsSelected()) {
oRootNode.addAssociation("selectedForNodes", oCurrentNode, true);
}
rememberSelectedChildr... | javascript | {
"resource": ""
} |
q18982 | train | function(oThis){
var iVisibleItems = 0;
var jAreaRef = oThis.$("area");
var jItems = jAreaRef.children();
var bRtl = sap.ui.getCore().getConfiguration().getRTL();
var lastOffsetLeft = (bRtl ? 100000 : 0);
jItems.each(function(iIdx) {
if (iIdx == 0) {
return true;
}
var currentOffsetLeft = t... | javascript | {
"resource": ""
} | |
q18983 | train | function(oThis){
var iVisibleItems = getVisibleItemCount(oThis);
var _iVisibleItems = iVisibleItems;
var jAreaRef = oThis.$("area");
var jItems = jAreaRef.children();
var jOvrFlwRef = oThis.$("ovrflw");
var bUpdateFocus = false;
if (iVisibleItems < jItems.length - 1) {
jOvrFlwRef.attr("style", "disp... | javascript | {
"resource": ""
} | |
q18984 | parseAndValidateSystemQueryOption | train | function parseAndValidateSystemQueryOption (mOptions, sOptionName, aAllowed) {
var sExpandOptionName,
mExpandOptions,
sExpandPath,
vValue = mOptions[sOptionName];
if (!bSystemQueryOptionsAllowed || aAllowed.indexOf(sOptionName) < 0) {
throw new Error("System query option " + sOptionName + " is n... | javascript | {
"resource": ""
} |
q18985 | startsWithQualifiedName | train | function startsWithQualifiedName(sMetaPath) {
var iDotPos = sMetaPath.indexOf("."),
iSlashPos = sMetaPath.indexOf("/");
return iDotPos > 0 && (iSlashPos < 0 || iDotPos < iSlashPos);
} | javascript | {
"resource": ""
} |
q18986 | _checkAggregationBindingTemplateID | train | function _checkAggregationBindingTemplateID(oOverlay, vStableElement){
var mAggregationInfo = OverlayUtil.getAggregationInformation(oOverlay, oOverlay.getElement().sParentAggregationName);
if (!mAggregationInfo.templateId) {
return true;
} else {
return !FlexUtils.checkControlId(mAggregationInfo.templateId,... | javascript | {
"resource": ""
} |
q18987 | train | function (oFlexibleColumnLayout, oSettings) {
var oModeToMaxColumnsCountMapping = {
Normal: 3,
MasterDetail: 2,
SingleColumn: 1
},
iInitial,
iMax;
oSettings || (oSettings = {});
this._oFCL = oFlexibleColumnLayout;
// Layout types
this._defaultLayoutType = LT.OneColumn;
this._defaultTwo... | javascript | {
"resource": ""
} | |
q18988 | train | function(sId, bFilled, sColor, iBorderWidth) {
this.sId = sId || uid();
this.bFilled = (bFilled == true);
this.sColor = sColor || 'blue';
if ( isNaN(iBorderWidth ) ) {
this.iBorderWidth = 2;
} else if ( iBorderWidth <= 0 ) {
this.iBorderWidth = 0;
} else {
this.iBorderWidth = iBorderWidth;
}
} | javascript | {
"resource": ""
} | |
q18989 | createDefaultToolbar | train | function createDefaultToolbar(oCreationRow) {
return new OverflowToolbar({
content: [
new ToolbarSpacer(),
new Button({
text: TableUtils.getResourceText("TBL_CREATIONROW_APPLY"),
type: MLibrary.ButtonType.Emphasized,
enabled: oCreationRow.getApplyEnabled(),
press: function() {
oCr... | javascript | {
"resource": ""
} |
q18990 | train | function (aControls) {
if (this.hasControls()) {
this.removeAllAggregation("controls");
}
var bIsArray = Array.isArray(aControls);
if (bIsArray && aControls.length > 0) {
// iterate through the given array but suppress invalidate
for (var i = 0; i < aControls.length; i++) {
this.addAggrega... | javascript | {
"resource": ""
} | |
q18991 | train | function(element, key) {
var aData = element.getAggregation("customData");
if (aData) {
for (var i = 0; i < aData.length; i++) {
if (aData[i].getKey() == key) {
return aData[i];
}
}
}
return null;
} | javascript | {
"resource": ""
} | |
q18992 | train | function(element, key, value, writeToDom) {
// DELETE
if (value === null) { // delete this property
var dataObject = getDataObject(element, key);
if (!dataObject) {
return;
}
var dataCount = element.getAggregation("customData").length;
if (dataCount == 1) {
element.destroyAggregati... | javascript | {
"resource": ""
} | |
q18993 | train | function (aSelectedRulesPlain) {
// if we persist settings - load any selection presets, else use the default ones
if (this.model.getProperty("/persistingSettings")) {
var aPersistedPresets = Storage.getSelectionPresets();
if (aPersistedPresets) {
this.model.setProperty("/selectionPresets", aPersiste... | javascript | {
"resource": ""
} | |
q18994 | train | function (aSelectedRulesPlain) {
var oPreset = this.model.getProperty("/selectionPresetsCurrent");
oPreset.selections = aSelectedRulesPlain;
if (!(oPreset.isModified || oPreset.isMySelection)) {
oPreset.isModified = true;
oPreset.title = oPreset.title + " *";
}
this.model.setProperty("/selecti... | javascript | {
"resource": ""
} | |
q18995 | train | function (sId, sTitle, sDescription, aSelections) {
var oRulesToExport = {
id: sId,
title: sTitle,
description: sDescription,
dateExported: (new Date()).toISOString(),
version: "1.0",
selections: aSelections
};
var oExportObject = JSON.stringify(oRulesToExport);
File.save(oExportOb... | javascript | {
"resource": ""
} | |
q18996 | train | function (oImport) {
var bIsFileValid = true;
if (!oImport.hasOwnProperty("title")) {
bIsFileValid = false;
}
if (!oImport.hasOwnProperty("selections")) {
bIsFileValid = false;
} else if (!Array.isArray(oImport.selections)) {
bIsFileValid = false;
} else {
for (var i = 0; i < oImport... | javascript | {
"resource": ""
} | |
q18997 | preloadLibraryAsync | train | function preloadLibraryAsync(libConfig) {
var that = this;
libConfig = evalLibConfig(libConfig);
var lib = libConfig.name,
fileType = libConfig.fileType,
libPackage = lib.replace(/\./g, '/'),
http2 = this.oConfiguration.getDepCache();
if ( fileType === 'none' || !!sap.ui.loader._.getModuleState(lib... | javascript | {
"resource": ""
} |
q18998 | registerPreloadedModules | train | function registerPreloadedModules(oData, sURL) {
var modules = oData.modules,
fnUI5ToRJS = function(sName) {
return /^jquery\.sap\./.test(sName) ? sName : sName.replace(/\./g, "/");
};
if ( Version(oData.version || "1.0").compareTo("2.0") < 0 ) {
modules = {};
for ( var sName in oData.modules ... | javascript | {
"resource": ""
} |
q18999 | preprocessDependencies | train | function preprocessDependencies(dependencies) {
if (Array.isArray(dependencies)) {
// remove .library-preload suffix from dependencies
return dependencies.map(function (dep) {
return dep.replace(/\.library-preload$/, '');
});
}
return dependencies;
} | javascript | {
"resource": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.