Hello,
I'm having very strange behaviour of sap.ui.table.Table with visibleRowCountMode = Auto. No error in if mode is not Auto. It stucks in endless loop and it takes place only after deployment from SAP WebIDE to ABAP repository. I can't reproduce it at all in WebIDE test at all even with the same versions of SAPUI5 (1.44.19). "Stuck" takes place for a minute (because of handlers in table) and is being finished with following record in console:
Uncaught RangeError: Maximum call stack size exceeded
at f.a._setupMaskVariables (MaskInput-dbg.js:645)
at f.a.setMask (MaskInput-dbg.js:335)
at new g (TimePicker-dbg.js:1307)
at f.d._initMask (TimePicker-dbg.js:1178)
at f.d.setValue (TimePicker-dbg.js:548)
at f.h.updateProperty (ManagedObject-dbg.js:2855)
at constructor.w (ManagedObject-dbg.js:2703)
at constructor.a.fireEvent (EventProvider-dbg.js:229)
at constructor.B._fireChange (Binding-dbg.js:247)
at constructor.O.checkUpdate (ODataPropertyBinding-dbg.js:129)
Code of XML view:
<mvc:View
xmlns="sap.m"
xmlns:mvc="sap.ui.core.mvc"
xmlns:core="sap.ui.core"
xmlns:tab="sap.ui.table"
controllerName="my.controller.Worklist">
<Page title="{i18n>worklistViewTitle}" showHeader="false" enableScrolling="false">
<subHeader>
<Bar>
<contentLeft>
<Button icon="sap-icon://download" text="{= ${device>/system/phone} ? '' : ${i18n>buttonAddInText}}" tooltip="{i18n>buttonAddInTooltip}" type="Accept" press="onPressAddIn"/>
<Button icon="sap-icon://upload" text="{= ${device>/system/phone} ? '' : ${i18n>buttonAddOutTooltip}}" type="Accept" press="onPressAddOut"/>
<Button icon="sap-icon://delete" text="{= ${device>/system/phone} ? '' : ${i18n>buttonDeleteText}}" tooltip="{i18n>buttonDeleteTooltip}" type="Reject" press="onPressDelete"/>
</contentLeft>
<contentMiddle>
<DatePicker
id="defaultDate"
value="{
path: 'worklistView>/workDate',
type: 'sap.ui.model.type.Date',
formatOptions: {
pattern: 'dd.MM.yyyy',
UTC: true
}
}"
change="onDateChange"/>
</contentMiddle>
<contentRight>
<Button icon="sap-icon://print" text="{= ${device>/system/phone} ? '' : ${i18n>buttonPrintForm}}" press="onPressPrint"/>
<Button icon="sap-icon://refresh" text="{= ${device>/system/phone} ? '' : ${i18n>buttonRefreshText}}" tooltip="{i18n>buttonRefreshTooltip}" type="Emphasized"
press="onPressRefresh"/>
</contentRight>
</Bar>
</subHeader>
<content>
<tab:Table
visibleRowCountMode="Auto"
editable="true"
selectionMode="MultiToggle"
id="entryTable">
<tab:columns>
<tab:Column label="{i18n>tableColumnFullname}" sortProperty="fullname" filterProperty="fullname">
<tab:template>
<Input
value="{fullname}"
showSuggestion="true"
suggestionItems="{path: '/pernrData', templateShareable : false}"
suggest="onFullNameSuggest"
suggestionItemSelected="onFullnameAliasUpdate"
change="onFullnameUpdate"
editable="{cc1}"
valueLiveUpdate="true"
liveChange="onTimerMove">
<suggestionItems>
<core:ListItem key="{pernr}" text="{fullname}" additionalText="{alias}"/>
</suggestionItems>
</Input>
</tab:template>
</tab:Column>
<tab:Column label="{i18n>tableColumnAlias}" sortProperty="alias" filterProperty="alias" width="6em">
<tab:template>
<Input
value="{alias}"
maxLength="4"
showSuggestion="true"
suggestionItems="{path: '/pernrData', templateShareable : false}"
suggest="onAliasSuggest"
suggestionItemSelected="onFullnameAliasUpdate"
change="onLineUpdate"
editable="{cc1}"
valueLiveUpdate="true"
liveChange="onTimerMove">
<suggestionItems>
<core:ListItem key="{pernr}" text="{alias}" additionalText="{fullname}"/>
</suggestionItems>
</Input>
</tab:template>
</tab:Column>
<tab:Column label="{i18n>tableColumnPernr}" sortProperty="pernr" filterProperty="pernr" width="9em">
<tab:template>
<Text text="{= ${pernr}==='00000000'? '-' : ${pernr} }"/>
</tab:template>
</tab:Column>
<tab:Column label="{i18n>tableColumnDirection}" sortProperty="direction" width="10em">
<tab:template>
<ComboBox selectedKey="{direction}" selectionChange="onDirectionUpdate" items="{ path: '/dirData', templateShareable : false }" editable="{cc1}">
<items>
<core:ListItem key="{direction}" text="{name}"/>
</items>
</ComboBox>
</tab:template>
</tab:Column>
<tab:Column label="{i18n>tableColumnDate}" sortProperty="ldate" width="10em">
<tab:template>
<DatePicker value="{ path: 'ldate', type: 'sap.ui.model.type.Date', formatOptions: { pattern: 'dd.MM.yyyy' } }" change="onDateUpdate"
editable="{cc1}"/>
</tab:template>
</tab:Column>
<tab:Column label="{i18n>tableColumnTime}" sortProperty="ltime" width="7em">
<tab:template>
<TimePicker
value="{ path: 'ltime', type: 'sap.ui.model.odata.type.Time' }"
displayFormat="HH:mm"
change="onTimeUpdate"
editable="{cc1}"/>
</tab:template>
</tab:Column>
</tab:columns>
</tab:Table>
</content>
</Page>
</mvc:View>
After a few debugging i found that it happens in _updateTableSizes function in Table.js:
var y = 0;
if (!a && this.getVisibleRowCountMode() == V.Auto) {
y = this._determineAvailableSpace();
if (this._handleRowCountModeAuto(y) && !b) {
return;
}
}
this causing call stack like this when this happens:
... v._insertTableRows (Table.js?eval:formatted:2246) v._adjustRows (Table.js?eval:formatted:2221) v._executeAdjustRows (Table.js?eval:formatted:1713) v._handleRowCountModeAuto (Table.js?eval:formatted:1678) v._updateTableSizes (Table.js?eval:formatted:751) v.onAfterRendering (Table.js?eval:formatted:704) a._handleEvent (Element-dbg.js:301) v._insertTableRows (Table.js?eval:formatted:2251) v._adjustRows (Table.js?eval:formatted:2221) v._executeAdjustRows (Table.js?eval:formatted:1713) v._handleRowCountModeAuto (Table.js?eval:formatted:1678) v._updateTableSizes (Table.js?eval:formatted:751) v.onAfterRendering (Table.js?eval:formatted:704) a._handleEvent (Element-dbg.js:301) v._insertTableRows (Table.js?eval:formatted:2251) ....
It looks like it decides to draw 5 lines, updates sizes, then decides to draw 10 lines, updates sizes and then again 5 lines.. I've tried to boot application with different versions of 1.44.* possible with the same result. Any suggestions?
BR,
Denis