Skip to Content
Mar 04, 2021 at 03:32 AM

duplicated id when nav back to object page again

56 Views Last edit Mar 04, 2021 at 03:33 AM 2 rev

Dear Experts,

there is a duplicated id issue when I develop a sapui5 app. the view is a xml view. some codes are like below. According to Fiori code check. Id should be added to control in the view. However, after I add id, first time loading the object page is OK. But, when I jump out to object page and get into this page again. The duplicated id issue occurres.

Any idears, Thanks.

<mvc:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.m">
<Table id="tableRisk" mode="MultiSelect" items="{path: 'to_Risk',sorter: [{ path:'ID'}]}" 
<Toolbar id="_IDEGen_toolbar0" visible="false">
<Title id="_IDEGen_titlerisk" text="{i18n>invisibleText}"></Title>
<Toolbar id='riskToolbar' content="{ path: 'risk>', factory: '.createHeaderButton'}"/>

abap.js:161 Uncaught (in promise) Error: Error: adding element with duplicate id 'application-AuditWorkPackage-execute-component---object--riskBlock-Collapsed--_IDEGen_titlerisk'
    at onDuplicate (abap.js:161)
    at f.register (abap.js:151)
    at abap.js:149
    at f.constructor (abap.js:149)
    at f.constructor (abap.js:161)
    at f.constructor (abap.js:159)
    at new f (abap.js:152)
    at XMLTemplateProcessor-dbg.js:1070
    at r (Component-dbg.js:201)
    at f.p.runAsOwner (Component-dbg.js:602)