Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • I have an xaf app that is being hosted within an iframe from a different domain. Meaning that attempts to access the window object from within the iframe will cause Access denied errors.

                                    My app is a detail view with an associated list view. When I move my mouse over the listview, it raises an exception in the function xafMM() when it attempts to access the window object. When I debug the page, I can see that there are onmousemove events that call this function (as well as onmousedown and others).

                                    The function is in the C:\Program Files (x86)\DevExpress\DXperience 13.1\Sources\DevExpress.ExpressApp\DevExpress.ExpressApp.Web\Resources\CommonFunctions.js and there are several other references to the window object in this javascript file. Could those be wrapped in try catch to avoid javascript Access Denied exceptions when in this scenario?

                                    Alternatively, is there a way I can hook into the cells and rows at the time of page creation to modify the onmousemove attribute myself? I was able to get into the Grid.HtmlRowCreated and add attributes to the row. I could also iterate through the cells, but it appears that when I add attributes to the cells, they get blasted by some processing that is happening later within the xaf framework.

                                    I appreciate any help.

                                    Thanks.

                                • Chad Michael 08.28.2013

                                  Correction. It appears that the access denied error is actually coming from the function: document.selection.createRange().text and is only appearing IE.

                                • Chad Michael 08.28.2013

                                  Apparently it is a known issue in IE 9 that if the document.selection.type == "None" or if its a hidden element that it will throw an access is denied error. I found references to workarounds here: https://github.com/tinymce/tinymce/pull/122/files which basically wrap it in a try catch.

                                  So, I beleive this is still something DevExpress should address in their CommonFunctions.js. Agreed?

                                1 Solution

                                Creation Date Rating Importance Sort by
                                0

                                Hello Chad,

                                >>
                                I have an xaf app that is being hosted within an iframe from a different domain.
                                <<
                                I am afraid this usage scenario is not officially supported by XAF. So, we cannot recommend you use XAF here because we have not run our internal functionality and unit tests under such circumstances, and thus there may be other problems further on road.
                                Having said that, we cannot promise quick improvements to the CommonFunctions.js file, because it may fail in other places as well, although your suggestions look valid.
                                However, we had a few customer requests about supporting this scenario in XAF and will take your feedback into account when planning future XAF releases. For now, I already added a link to your ticket at Embed XAF view in iframe, which you may find helpful as well.
                                At this stage I can only recommend you recompile the XAF source code and modify the required script files according to your business needs: How to recompile the XAF source code.

                                • Chad Michael 08.29.2013

                                  Thanks Dennis. Your response is what I figured it would be after reading through the forums. I had already started looking at recompiling, which is what I will probably decide to do.

                                • Thank you for the update, Chad. Let us know if we can assist you with anything else.

                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2017 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners