How do I load a html file into a Dojo dialog in XPages

dojo, javascript, xpages

Solution

The Dojo dialog has a href property you set to the url of the page you want to load. The documentation explains that under the title "External Dialog content using HREF attribute".

The first 3 hits link to all you need.

Problem

I am currently using ExtLib's autoLoad function combined with a Ext.Window and Ext.tabPanel to open a web page into a popup dialog. How can I achieve this with dojo in XPages? Here is what I am trying to achieve: ``` <?xml version="1.0" encoding="UTF-8"?> <xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xe="http://www.ibm.com/xsp/coreex"> <xp:button value="Label" id="button1"> <xp:eventHandler event="onclick" submit="true" refreshMode="partial" refreshId="dialog1" execMode="partial"> <xp:this.action><![CDATA[#{javascript:getComponent("dialog1").show();}]]></xp:this.action> </xp:eventHandler> </xp:button> <xe:dialog id="dialog1" href="http://www.google.com" style="width: 400px; height: 400px;"> </xe:dialog> </xp:view> ```

Original source