-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added anything needed for Step 8 of the Navigation Tutorial; Flip Tra…
…nsition & Nested Views + Binding Context
- Loading branch information
Showing
8 changed files
with
101 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
sap.ui.define([ | ||
"com/mrb/UI5-Navigation-and-Routing/controller/BaseController" | ||
], function ( | ||
BaseController | ||
) { | ||
"use strict"; | ||
return BaseController.extend("com.mrb.UI5-Navigation-and-Routing.controller.employee.Resume", { | ||
onInit: function () { | ||
var oRouter = this.getRouter(); | ||
oRouter.getRoute("employeeResume").attachMatched(this._onRouteMatched, this); | ||
}, | ||
_onRouteMatched: function (oEvent) { | ||
var oArgs, oView; | ||
oArgs = oEvent.getParameter("arguments"); | ||
oView = this.getView(); | ||
oView.bindElement({ | ||
path: "/Employees(" + oArgs.employeeId + ")", | ||
events: { | ||
change: this._onBindingChange.bind(this), | ||
dataRequested: function (oEvent) { | ||
oView.setBusy(true); | ||
}, | ||
dataReceived: function (oEvent) { | ||
oView.setBusy(false); | ||
} | ||
} | ||
}); | ||
}, | ||
_onBindingChange: function (oEvent) { | ||
// No data for the binding | ||
if (!this.getView().getBindingContext()) { | ||
this.getRouter().getTargets().display("notFound"); | ||
} | ||
} | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<mvc:View controllerName="com.mrb.UI5-Navigation-and-Routing.controller.employee.Resume" | ||
xmlns="sap.m" | ||
xmlns:mvc="sap.ui.core.mvc"> | ||
<Page title="{i18n>ResumeOf} {FirstName} {LastName}" id="employeeResumePage" showNavButton="true" navButtonPress=".onNavBack"> | ||
<content> | ||
<IconTabBar id="iconTabBar" headerBackgroundDesign="Transparent" class="sapUiResponsiveContentPadding" binding="{Resume}"> | ||
<items> | ||
<IconTabFilter id="infoTab" text="{i18n>tabInfo}" key="Info"> | ||
<Text text="{Information}"/> | ||
</IconTabFilter> | ||
<IconTabFilter id="projectsTab" text="{i18n>tabProjects}" key="Projects"> | ||
<mvc:XMLView viewName="com.mrb.UI5-Navigation-and-Routing.view.employee.ResumeProjects"></mvc:XMLView> | ||
</IconTabFilter> | ||
<IconTabFilter id="hobbiesTab" text="{i18n>tabHobbies}" key="Hobbies"> | ||
<Text text="{Hobbies}"/> | ||
</IconTabFilter> | ||
<IconTabFilter id="notesTab" text="{i18n>tabNotes}" key="Notes"> | ||
<Text text="{Notes}"/> | ||
</IconTabFilter> | ||
</items> | ||
</IconTabBar> | ||
</content> | ||
</Page> | ||
</mvc:View> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<mvc:View xmlns="sap.m" | ||
xmlns:mvc="sap.ui.core.mvc"> | ||
<Text text="{Projects}"/> | ||
</mvc:View> |