General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion Tabs in Resource Manager

  • fjeneau9

    Tabs in Resource Manager

    Participants 3
    Replies 4
    Last Activity 11 years, 10 months ago

    [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)

    Reply

    murray

    Reply to: Tabs in Resource Manager

    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.

    Reply

    Derek Read

    Reply to: Tabs in Resource Manager

    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);
    }[/code]

    Reply

    fjeneau9

    Reply to: Tabs in Resource Manager

    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.

    Reply

    Derek Read

    Reply to: Tabs in Resource Manager

    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;[/code]

    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.

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support