I have a NavContainer and I want to set the pages with a JSONModel via aggregation binding. In the end the NavContainer should contain a bunch of XMLViews with given id's (to navigate to them later) and the viewNames to load the views.
<NavContainer id="idNavContainer" height="16em" initialPage="{/oInitialStep/sId}" pages="{/aStepPages}">
<mvc:XMLView id="{sId}" viewName="{sViewName}" />
</NavContainer>
This is the structure of the JSONModel:
{
oInitialStep: {
sId: "idInitialStep",
sViewName: "my.app.views.init"
},
aStepPages: [
{
sId: "idInitialStep",
sViewName: "my.app.views.init"
},
{
sId: "idStep2",
sViewName: "my.app.views.step2"
},
{
sId: "idLastStep",
sViewName: "my.app.views.last"
},
]
}
Unfortunately, I get this error:
Error: "__xmlview1--{sId}" is not a valid ID.
I tried replacing the NavContainer with a simple list, copying it from the documentation, and the same error occured. It seems like it is generally not possible to bind the id using an aggregation. Is that correct and does anyone know a work-arround?
Furthermore, the binding of the initialPage of the NavContainer does not work. It seems to be the same problem doesn't it?