i am new to SAPUI5 and im doing some exercises about Master and Detail pages.
I have 2 views, Master.view.xml and Detail.view.xml. The Master.view.xml contains a list of employees. When the user clicks on an employee, it will navigate to the detail view. The Detail.view.xml contains the detail of the selected employee.
Each view has its corresponding controller. I've put my json model in the Master.controller.js.
How can i access the json model from the Master.controller.js to the Detail.view.xml without passing the data? Is this even possible?
@keshet
This is the List i have created in the Master page:
<List xmlns="sap.m"
id="masterList"
headerText="{i18n>masterHeaderText}"
footerText="Updated: September 4, 2015"
items="{/employeeDetails}"
itemPress="" >
<StandardListItem xmlns="sap.m"
id="{empid}"
title="{name}"
description="{levelDesc}"
info="{cubeNo}"
type="Navigation"
tap="handleListItemPress" />
</List>
Now i am trying to change the id of the StandardListItem to the ID of the employee that is from the model. But an error appears saying i cant use the empid as id of the StandardListItem. How do i do this?