Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- onOpenDialog: function(oEvent) {
- var oView = this.getView();
- var oSelectedItem = oEvent.getSource();
- var oContext = oSelectedItem.getBindingContext("employee");
- var sPath = oContext.getPath();
- var oDialog2 = this.byId("idDetailedEmployeeInfo");
- if (!oDialog2) {
- Fragment.load({
- id: oView.getId(),
- name: "com.employeeDb.fragments.DetailedEmployeeInfo",
- controller: this
- }).then(function(oDialog) {
- oView.addDependent(oDialog);
- oDialog.bindElement({
- path: sPath,
- model: "employee"
- });
- oDialog.open();
- });
- } else {
- oDialog2.bindElement({
- path: sPath,
- model: "employee"
- });
- oDialog2.open();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement