Hello there, DX folks.
I'm trying to integrate another web page with a XAF application.
Here, on the support center, there are some keys of how to embed another
page as a custom view item into a XAF aplication, but I also need integration in the other direction, I mean embeding the view contents (listview, detailview or dashboardview) from the XAF application in an iframe on the other web page. The view must be clean of navigation, header and footer, only the view contents are needed, optionally the action bar could be of some use.
I tried unsuccesfully to copy the defaultvertical.aspx and rip unneeded controls. Is this a recommended method? Is there an alternative?
Thanks in advance.
Regards.
Santiago.
Hello,
Thank you for contacting us.
I am afraid we neither support this particular scenario (with an XAF Web application shown in IFRAME) nor we have researched whether or not it is possible to easily support it. Most likely, it will not work as is, because all requests in an XAF Web application are handled by our WebWindowTemplateHttpHandler class that does not support the IFrame scenario and may be confused if it receives requests from the URL different from the main web site domain.
Those are sad news.
Thanks, Dennis.
>>
I mean embeding the view contents (listview, detailview or dashboardview) from the XAF application in an iframe on the other web page. The view must be clean of navigation, header and footer, only the view contents are needed, optionally the action bar could be of some use.
<<
Probably, if you describe your ultimate goal in greater detail, we could find an alternative solution for you rather than using IFRAMEs.
In the attached image I represent the desired resulting page.
I'm very interested in this issue!
Thank you for the screenshot.
As far as I understand, this is a regular public web site and you will also need XAF CRUD capabilities in this ListView, automatic opening a linked detail form from a list, etc. If this is the case, then I am afraid it will not be easy to reuse XAF for this, although it is technically possible. The idea is to create the XAF ListView and its controls in code (similar to what is shown in ListView in NavigationControl), and then embed these controls onto your page. However, this approach is undocumented and may require additional tuning and also lead to other issues. We also do not have ready examples that show how to accomplish something similar.
So, try it at your own risk as well as handle any problems with it yourself.
Having said that, my suggestion is to not use XAF for this task, but rather utilize our ASP.NET components + XPO as a DAL and build this grid from scratch. Let me know if I can assist you further.
Hi Dennis,
How can we use the XAF Security System in the approach you recommend? Via a Middle Tier Server?
Willem
Yes, it is possible to get a filtered data from our middle tier service. We hope to publish a small demo once 12.2 is out. Please track How to add wcf service to the middle tier Application Server.
Good news! Deserves to be posted on that thread too!
I created a Frameless.aspx page starting from Default.aspx and removing unwanted items. Also needed custom FrameTeplatefactory and HttpRequestManager and make the application uso those.
I attached a sample project as demonstration. Run it, then navigate to Framelesss.aspx.
Thank you for posting your solution here. I believe other community members will highly appreciate it.
This is all very disappointing. In the early days of xaf, was there anyone in the meetings doing *any* work with real-life clients? I don't mean this to sound harsh. I simply have seen so many examples of situations where the classic use-case of using xaf in *anything* but an intranet, isolated, point-focused arrangement is all but impossible unless you are already capable of coding the whole thing yourself.
I have hosted numerous framework type scenarios in iFrames over the years and simply assumed xaf was smart enough to handle this, given it can't manage a proper web-pointing presence, and does not even have a simply "forget your password/register" screen. I know, i am rehashing an old argument… and promised myself i would not. But i took a contract with the end-game of xaf in an iFrame… sigh.
Drew, applications created by XAF are standalone apps with menu and navigation systems, which are also optimized (e.g., talking about scrolling) for the use in the main window and thus with a sufficient space on the screen (it is not a single Google search box on the screen). Due to this, we have not considered XAF Web apps will be embedded in an IFRAME element. I searched our support database, but could not find even five requests for the same capability in five years, so it seems that our users did not consider such a use-case as well or at least did not contact us about this.
Regardless, Santiago was kind enough to post his solution to force XAF Web apps to work in this scenario.
hey Dennis, as always, i am the square peg in a world of round holes ;) … but thanks for your thoughts.
There seems to be a problem with popup windows (Error: Permission denied to access property 'PopupWindowCallbackPanel') when an XAF application is placed in IFRAME.
See Also:
CommonFunctions.js file is throwing errors when DevExpress app hosted in iframe in a different domain
I couldn't reproduce the error.
Hello Santiago Moscoso.
Your solution is build with 11.2 i dnt have that on my machine (have 12.5 which doesnt allow the code to build). But my question is what issue is your solution really adress ? The problem i have (as shown in the link Dennis just posted) I have to embed the XAF application in an iFrame of another webapp. Then i will call an popup and get an Permission Denied.
Any clue if i need to invest your solution to see if it will cover our problem too ?
Testing on 12.7 the popup doesn't show, but it doesn't raise an error either.
12.X uses an ajax popup, while 11.x shows the popup on a new browser window.
Sadly, right now I'm unable to further investigate a solution.
ok. Tnx for the effort.
fyi: using iFrame for hosting the XAF FramelessView application does work for popups in Chrome and IE9 (I test this by adding an link in the master-detail page)
Sorry for me, it doesnt work in Firefox, which is the browser i must support for our customer .
The error is FF is: Permission denied to access property 'releaseEvents'.
@Richard: I am not sure if this will help you, but I could google many similar errors on the Web:
https://www.google.com/search?hl=en&q=Permission+denied+to+access+property+'releaseEvents'.
It seems to be an issue in FireFox: http://code.google.com/p/fbug/issues/detail?id=2075
I see that other customers have encountered the same issue with this browser:
popups wont display
Web - Print dialog (Adobe PDF) is not displayed in Firefox 19
two years passed, is anything changed? is iframe supported now? it's important for me!
@Timothy: Thank you for your update. I understand that this feature is important for you, it was requested by 6 other users so far, which is insufficient for it to be planned for any release. At this stage, we can only advise you try the solution posted by Santiago Moscoso. We will also continue monitoring user feedback in this regard and take your input into account.
Any chance to see this request adressed in the future?
Hosting XAF views in a CMS Site scenario where each view is immagined as a module to be placed in an ad hoc designed page could be very useful for us.
Thanks
@Pietro: We have not planned this for any specific release. Have you tried Santiago Moscoso's solution if this is important for your business? We would be interested to hear your feedback on it (mainly the implementation and maintenance costs). Probably, if we do not get this into the standard delivery, we can improve our APIs for a greater extensibility and simplicity.
Hi Dennis, you are right, I didn't analyze Santiago solution in deep detail.
The solution is before 12.2 (I think) and we have no great knowledge on XafWeb templates. Have you got a version of that example updated to 17.2?
We are on an early stage in XafWeb migration of our solution and we are producing only simple POC of some specific modules, no specific development is started yet.
@Pietro: We do not have a more recent sample for this. Hopefully, the author sees this discussion and post and updated version.
If not, I suggest you start by researching the essential solution parts as noted by the author:
MyHttpHandler.cs
MyHttpRequestManager.cs
WebApplication.cs (see the CreateHttpRequestManager and CreateFrameTemplateFactory methods).
I recommend adding those files into your solution instead of trying to convert the old one to v17.2. To be able to create the Frameless.aspx page, you will need to study the following concepts:
Task-Based Help > How to: Customize an ASP.NET Template
Concepts > UI Construction > Templates > Template Customization
This task is advanced, so in addition to general ASP.NET WebForms knowledge, I recommend you review the source code of all involved base XAF classes and interfaces at …\DevExpress.ExpressApp.Web.