0

我有一个导航自定义控件,我想链接到数据库中的特定文档。我尝试使用 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;
        }
4

1 回答 1

2

您可以使用 context.redirectToPage():

context.redirectToPage( "yourxpage.xsp?action=openDocument&docunid=" +  docUNID);
于 2013-06-10T21:07:30.473 回答