我的系统中有一段代码,位于xp:viewColumn:
中<xp:eventHandler event="onclick" submit="true"refreshMode="complete">
<xp:this.action>
<xp:actionGroup>
<xp:executeScript>
<xp:this.script><!CDATA[#javascript:sessionScope.retornarPara=view.getPageName()}]]>
</xp:this.script>
</xp:executeScript>
<xp:openPage target="openDocument" documentId="#javascript:entry.getDocument().getUniversalID()}">
<xp:this.name>
<![CDATA[#{javascript:return "/xsp_arma.xsp"}]]>
</xp:this.name>
</xp:openPage>
</xp:actionGroup>
</xp:this.action>
</xp:eventHandler>
我需要xp:openPage打开的页面位于新选项卡中。那可能吗?我是否需要使用其他类型的代码来执行此操作?
感谢。
答案 0 :(得分:3)
如果此事件处理程序位于xp:link内,您可以在所有属性中设置链接的目标:
答案 1 :(得分:2)
您可以使用ssjs
代替简单操作使用以下网址,您可以打开指定的文档:
?<强> application.nsf / xpage.xsp动作=使用openDocument&安培; documentId = DOCUMENT_ID 强>
var path = facesContext.getExternalContext().getRequest().getContextPath();
var xpage = "byTag.xsp"
var fullpath = path + "/" + xpage;
var documentID = "**"
var url = fullpath + "?action=openDocument&documentId="+ documentID
view.postScript("window.open('" + url + "')")
首先,您将获得当前数据库的路径,然后您可以指定将显示文档的xpage,然后您可以传递像#javascript:entry.getDocument().getUniversalID()}
通过调用csjs,您可以在新标签页中打开该页面