Hi Everyone,
i have created one Master-Detail Application from SAP Web IDE Template. By default it comes with Flexible Column Layout Design with two column. I want to add the third item detail column along with this. SO that i added the code in App controller and required files.
When i try to run the app, it works with all the navigation. but if i try to press the close button in the third column ,it is coming back to first page. instead of going there, it should go back to the second column. see the code details below.
App.controller.js:
oViewModel = new JSONModel({ busy: true, delay: 0, layout: "OneColumn", previousLayout: "", actionButtonsInfo: { endColumn: { fullScreen: false }, midColumn: { fullScreen: false } } });
Detail.view.xml:
<semantic:closeAction> <semantic:CloseAction id="closeColumn" press="onCloseDetailPress"/> </semantic:closeAction> <semantic:fullScreenAction> <semantic:FullScreenAction id="enterFullScreen" visible="{= !${device>/system/phone} && !${appView>/actionButtonsInfo/midColumn/fullScreen}}" press="toggleFullScreen"/> </semantic:fullScreenAction> <semantic:exitFullScreenAction> <semantic:ExitFullScreenAction id="exitFullScreen" visible="{= !${device>/system/phone} && ${appView>/actionButtonsInfo/midColumn/fullScreen} }" press="toggleFullScreen"/> </semantic:exitFullScreenAction>
Detail.controller.js:
onCloseDetailPress: function () { this.getModel("appView").setProperty( "/actionButtonsInfo/midColumn/fullScreen", false); this.getRouter().navTo("master");// if i give the detail page route, nothing comes, entire app got refreshed. },
NotificationDetail.view.xml:
<semantic:closeAction> <semantic:CloseAction id="closeColumn" press="onCloseDetailPress"/> </semantic:closeAction> <semantic:fullScreenAction> <semantic:FullScreenAction id="enterFullScreen" visible="{= !${device>/system/phone} && !${appView>/actionButtonsInfo/endColumn/fullScreen}}" press="toggleFullScreen"/> </semantic:fullScreenAction> <semantic:exitFullScreenAction> <semantic:ExitFullScreenAction id="exitFullScreen" visible="{= !${device>/system/phone} && ${appView>/actionButtonsInfo/endColumn/fullScreen}}" press="toggleFullScreen"/> </semantic:exitFullScreenAction>
NotificationDetail.controller.js:
onCloseDetailPress: function () { this.getModel("appView").setProperty( "/actionButtonsInfo/endColumn/fullScreen", false); // No item should be selected on master after detail page is closed this.getRouter().navTo("master"); },
i guess some problem with the visiblity property of the button. Please help me on this.
Thank you,
Regards,
JK.