Skip to Content

Duplicate IDs while routing in ObjectPage layout (uxap)

Hello colleagues,

I've faced a strange issue with the duplicate ID's while navigating from ObjectPage layout control to another view and back.

What I'm trying to do - is to navigate from a block (BlockBase.js) to another view. When I navigate to this view - everything is OK, but when a navigate back - I'm getting the following Error: adding element with duplicate id '__xmlview2-layoutData'.

What could be wrong here?

The subsection looks like:

<ObjectPageSubSection title="Item Section" id="subSectionId">

I need a router instance inside my block controller, so I have to leave blocks section empty and add a view using router.

I have the following routes and targets:

routes: [
		name: "listview",
		pattern: "",
		target: "listview"
		name: "objectpage",
		pattern: "listview/{ItemId}",
		target: ["objectpage", "objectBlock"],
		name: "objectdetails",
		pattern: "listview/{ItemId}/Subitems/{SubItemId}",
		target: "objectdetails"
targets: {
	listview: {
		viewName: "listview",
		viewLevel: 1,
		clearAggregation: true
	objectpage: {
		viewName: "objectpage",
		viewLevel: 2,
		clearAggregation: true
	objectBlock: {
		parent: "objectpage",
		controlId: "subSectionId",
		controlAggregation: "blocks",
		viewPath: "testroute.blocks",
		viewName: "ObjectDetailsBlock",
		clearAggregation: true
	objectdetails: {
		viewName: "objectdetails",
		viewLevel: 3,
		clearAggregation: true
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jul 11, 2017 at 10:40 AM

    seems it is creating ObjectPage again, if you are not refering to it's id in your code you can remove the id property for ObjectPage, otherwise check where it is creating the ObjectPage again.

    Add comment
    10|10000 characters needed characters exceeded