尝试从basicContainerNode打开另一个xPage

时间:2013-06-10 17:49:17

标签: xpages xpages-extlib

我有一个导航自定义控件,我想链接到数据库中的特定文档。我尝试使用pageTreeNode,但在页面加载时打开了链接。我被告知使用basicContainerNode,它允许我执行代码来构建URL,但我不知道打开xPage的代码。一旦我有文档的URL,有人可以告诉我如何打开xPage吗?

<xp:eventHandler event="onItemClick" submit="true"
        refreshMode="partial" refreshId="navigator1">
        <xp:this.action><![CDATA[#{javascript:
        if( context.getSubmittedValue() == "ArchitecturalChangeForm" )
        {
            //  Open Page with queryString
            var docUNID = eStarService.fetchDocLibraryDocumentUNID( sessionScope.get( "PropertyNox" ), "Architectural Change Form" );
            if( isEmpty( docUNID ) )
            {
                sessionScope.put( "dialogOopsTitle", "Oopps!" );
                sessionScope.put( "dialogOopsMessage", "\nUn-able to locate Architecture File!  Please review My reference Library!" );
                var dialogOops = getComponent( "dialogOops" );
                dialogOops.show();
                return "";
            }
                            //  WHAT GOES HERE FOR THE URL??
            return "OpenDocument&docunid=" + docUNID;
        }

1 个答案:

答案 0 :(得分:2)

您可以使用context.redirectToPage():

context.redirectToPage( "yourxpage.xsp?action=openDocument&docunid=" +  docUNID);