Xpages 在 XPiNC 中的相同选项卡/Windows 中打开新数据库 [英] Xpages Open new Database in Same Tab/Windows in XPiNC

查看:21
本文介绍了Xpages 在 XPiNC 中的相同选项卡/Windows 中打开新数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为多个应用程序创建统一的应用程序布局.

我似乎无法在一个数据库中的 AppLayout 上获得链接以在与第一个数据库相同的选项卡/窗口中打开新数据库.我的目标是为多个数据库提供一个统一的应用程序布局控件,在每个数据库的应用程序链接中都有一个链接,这样在用户看来就好像他们真的在一个大应用程序中一样.我正在 XPiNC 中这样做.

I cannot seem to get a link on the AppLayout in one database to open a new database in the same tab/window as the first database. My goal is to have aa uniform application layout control for several databases, with a link in the Application Links to each database, so it looks to the user as if they are really in one big application. And I am doing this in XPiNC.

我一直在新标签页中打开.我已将 DB 的设置更改为默认在同一窗口/选项卡中打开.我已经尝试了 3 种不同的方法来做到这一点,代码如下.

I keep getting opened in a new tab. I have changed the setting for the DB for the default to open in the same window/tab. I have tried 3 different methods to do this, which are below in the code.

我真的很想能够做到这一点.

I really would love to be able to do this.

<?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:this.resources>
        <xp:script
            src="/xpCGIVariables.jss"
            clientSide="false">
        </xp:script>
    </xp:this.resources>
    <xp:platformEvent
        id="platformEvent1"></xp:platformEvent>
    <xe:applicationLayout
        id="applicationLayout1">
        <xp:callback
            facetName="facet_1"
            id="callback4" />
        <xp:this.facets>
            <xp:callback
                facetName="MastFoot"
                id="callback6"
                xp:key="MastFooter" />
            <xp:callback
                facetName="RightColum"
                id="callback5"
                xp:key="RightColumn" />
            <xp:callback
                facetName="LeftColumn"
                id="callback3"
                xp:key="LeftColumn" />
            <xp:callback
                facetName="searchBar"
                id="callback2"
                xp:key="SearchBar" />
            <xp:callback
                facetName="MastHeader"
                id="callback1"
                xp:key="MastHeader" />
        </xp:this.facets>
        <xe:this.configuration>
            <xe:oneuiApplication
                navigationPath="#{javascript:compositeData.navigationPath}"
                defaultNavigationPath="home"
                productLogoHeight="50px"
                legal="false"
                productLogo="/smallLogo.png"
                productLogoWidth="50px"
                productLogoStyle="padding-top:5.0px;padding-bottom:5.0px"
                placeBarName="PC Checklist"
                titleBarName="PC Checklist"
                placeBar="false"
                footer="false">
                <xe:this.footerLinks>
                    <xe:basicContainerNode label="Container 1"></xe:basicContainerNode>
                </xe:this.footerLinks>
                <xe:this.titleBarTabs>
                    <xe:pageTreeNode
                        label="PC Tasks"
                        selection="/PCTasks/.*"
                        page="/xpViewAllPCTasks.xsp" />
                    <xe:pageTreeNode
                        label="PC Builds"
                        selection="/PCBuilds/.*"
                        page="/xpViewAllPCBuilds.xsp" />
                </xe:this.titleBarTabs>
                <xe:this.placeBarActions></xe:this.placeBarActions>
                <xe:this.bannerUtilityLinks>
                    <xe:basicLeafNode label="My Email">
                        <xe:this.href><![CDATA[#{javascript:var url = "Notes:///0000000000000E00/"
url}]]></xe:this.href>
                    </xe:basicLeafNode>
                    <xe:separatorTreeNode loaded="true"></xe:separatorTreeNode>
                    <xe:basicLeafNode>
                        <xe:this.label><![CDATA[#{javascript:"Welcome " + @Name("[CN]",session.getEffectiveUserName());}]]></xe:this.label>
                    </xe:basicLeafNode>
                </xe:this.bannerUtilityLinks>
                <xe:this.bannerApplicationLinks>
                    <xe:basicLeafNode
                        label="The Scoular Company"
                        style="height:50px"
                        styleClass="lotusText">
                        <xe:this.onClick><![CDATA[window.open("http://www.scoular.com","_self")]]></xe:this.onClick>
                    </xe:basicLeafNode>
                    <xe:basicLeafNode
                        label="PC Checklist"
                        selected="true">
                        <xe:this.href><![CDATA[#{javascript:if (database.getTitle() != "PC Checklist")
{var url = "notes://KC1/PCCheckList.nsf/xpHome.xsp?OpenXpage";
url;}}]]></xe:this.href>
                    </xe:basicLeafNode>
                    <xe:basicLeafNode label="CompuWeigh Monitor">
                        <xe:this.href><![CDATA[#{javascript:var url = "notes://<SERVER>/compuweigh.nsf/xpHome.xsp?OpenXpage"
url}]]></xe:this.href>
                    </xe:basicLeafNode>
                    <xe:basicLeafNode label="CompuWeigh Monitor">
                        <xe:this.onClick><![CDATA[var url = "notes://<SERVER>/compuweigh.nsf/xpHome.xsp?OpenXpage";
window.open(url,"_self")]]></xe:this.onClick>
                    </xe:basicLeafNode>
                    <xe:basicLeafNode label="ComputWeigh Monitor">
                        <xe:this.onClick><![CDATA[window.open("notes://KC1/compuweigh.nsf?OpenDatabase","_self")]]></xe:this.onClick>
                    </xe:basicLeafNode>
                </xe:this.bannerApplicationLinks>
            </xe:oneuiApplication>
        </xe:this.configuration>
    </xe:applicationLayout>
    </xp:view>

推荐答案

我将创建一个额外的数据库,其中包含来自所有数据库的 XPage 代码,并仅使用当前的 Notes 数据库作为数据容器.

I would create an additional database which contains the XPages code from all databases and uses the current Notes databases as data containers only.

通过这种方式,您可以将所有导航和所有 XPage 代码集中在一处.您的代码与数据分离,这总是好的.

This way you have all navigation and all XPages code at one place. And your code is separated from data which is always good.

您可以将配置文档添加到包含数据容器数据库路径的附加 XPage 数据库中.在 XPage 的数据源定义中使用这些路径.

You would add a configuration document into your additional XPages database which contains the paths to the data container databases. Use those paths in XPages's data sources definitions.

这篇关于Xpages 在 XPiNC 中的相同选项卡/Windows 中打开新数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆