on 02-10-2014 1:14 PM
We were having an issue in IE9(Quirks Mode) SAP MII Portal where SAP UI5 pages were not getting loaded and it is because of the MVC Pattern what we were using to define separate view and controller page. So, we are now using view and controller as a simple javascript file and defining the UI5 controls to overcome the IE9 portal issue. But SAP UI5 has its own event handlers like "onAfterRendering"/"onInit"/"onBeforeRendering", so using simple JS file (not using MVC), these functions can not be called by itself. Other simple functions like Button Press/Link Press, they all are working fine defined in the controller page.
This is what we are doing right now, but its not working.
function onAfterRendering() {
alert("OnAfterRendering");
}
So if anyone has any idea about it, please share, it will be highly appreciated.
Thanks always,
Ushinar
Hi Ushinar,
Even when you define SAP UI5 controls within normal javascript files you should be able to listen to SAP UI5 events. You can try the following:
Say, you have defined a SAP UI5 MatrixLayout as shown below:
var oLayout = new sap.ui.commons.layout.MatrixLayout();
And you want to do something in the onAfterRendering event of this layout, then you can do this:
oLayout.addEventDelegate({
onAfterRendering : function () {
alert("onAfterRendering...!!");
}
});
Hope this helps!
Regards,
Ria
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ushinar,
I don't think this will work as these listener methods would only work with the MVC architecture of SAP UI5.
Try to replace all these listeners by listener methods available for window and dom object like window.onload or $(document).ready.
Regards,
Rohit Negi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Rohit,
But you see, if we use MVC pattern by creating separate view and controller page, the UI5 page does not work in IE9 MII Portal(Quirks Mode) but it works fine in Mozila/Chrome.
So, that is why we were trying to avoid the standard UI5 pattern by removing RegisterModulePath from the html page, and only defining a simple javascript function to create the main layout which is returning the main layout and calling the function on the html page, placing the main layout on the div, so all controls and functions are working fine with this even in the IE9 MII Portal(Quirks Mode) except these event handlers because we are treating the view and controller page as a simple javascript page.
So do you have any idea about how we can make it workable in IE9 MII Portal(Quirks Mode) while using MVC and also the UI5 standard event handlers?
Thanks always,
Ushinar
Hi Ushinar,
In that case, you can try using IE10 set as IE9 Quirks mode in the browser and can include meta tag in the irpt/html file of your MVC structure for IE10 standards document mode.
This way, MII portal will be loaded in IE9 quirks mode and your UI5 page with MVC structure will be rendered properly using IE10 standards mode.
You can even try if MVC works in IE9 standards mode and can include the meta tag accordingly, if you do not want to upgrade your browser, I havent tried this.
Regards,
Anuj
User | Count |
---|---|
9 | |
7 | |
3 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.