Pages: 1
Print
Author Topic: Tabs in Resource Manager  (Read 2796 times)
fjeneau9
Member

Posts: 14


« on: August 25, 2010, 04:06:18 PM »

[XMetaL Author Version#: 6.0.0.122]

I have a series of jsp pages that run in a single page - 3 frames.  The top frame is a form that sends a search query to a Documentum server and returns the results to the left frame. (list of documents with titles containing the search string -  formatted with anchor tags)  Upon clicking any of these links, the XML document and it's child components are exported from the Documentum server and displayed in the right frame. (css file included)

This works fine except in Internet Explorer, because of a reference to a .dtd file located on the local system.  Supposedly beginning with WinXP SP2, IE is not allowed to access files on a local filesystem even if the local filesystem is added to the list of trusted zones.


Now I'm wondering if it's possible to create a tab in Resource Manager that essentially runs like an internet browser -- would accept my jsp pages and html code -- and would display the results in the main XMetaL window where any other XML file gets loaded.  (the last part would just use XMetaL's 'open file' on the exported file rather than having to output to a third frame)
Logged
murray
Member

Posts: 23


« Reply #1 on: August 25, 2010, 04:31:02 PM »

I think you can find most of the information you need in this posting, http://forums.xmetal.com/index.php/topic,512.msg1609.html#msg1609

The WebService.navigate() call can take an http url rather than the file path used in the example. The example also show how to get a reference to the XMetaL Application object so you can open your file in XMetaL Author from the web page that does the export.
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2507



WWW
« Reply #2 on: August 25, 2010, 04:36:32 PM »

You can host any standard ActiveX control in a new tab in the Resource Manager. The trick for you would be to find a control that is a web browser that is not IE if you need to use something else.

Here's a JScript sample that creates a new tab with IE in it for reference:
Code:
//XMetaL Script Language JScript:
try {
ResourceManager.AddTab("My Browser","Shell.Explorer");
}
catch(e){
//Silent fail (tab already exists).
}
var browser = ResourceManager.ControlInTab("My Browser")
if (browser) {
var url = "http://forums.xmetal.com";
browser.Navigate(url);
}
Logged
fjeneau9
Member

Posts: 14


« Reply #3 on: August 26, 2010, 11:50:14 AM »

Thanks!  It worked great.  Now I just need to figure out how to open the document in XMetaL from an anchor in in the second frame.
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2507



WWW
« Reply #4 on: August 26, 2010, 12:43:18 PM »

You'll need something like this in your page:

Code:
//JScript:
var xmapp = new ActiveXObject("XMetaL.Application");
var path = "c:\\test\\mydoc.xml";
xmapp.Documents.Open(path);
xmapp = null;

Make sure to force the reference to "XMetaL.Application" to null as soon as possible to force the JScript garbage collector to run so that XMetaL Author can shut down properly.
Logged
Pages: 1
Print
Jump to:  

email us