I have this piece of code on my system, inside a 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>
I need that the page opened by the xp:openPage be in a new tab. Is that possible? Do I need to use other type of code to do that?
Thanks.
Instead of the simple action you can use ssjs
With the following url you can open a specified document:
application.nsf/xpage.xsp?action=openDocument&documentId=DOCUMENT_ID
First you'll get the path of your current database then you can specify the xpage which will show the document and then youl can pass the documentID like
#javascript:entry.getDocument().getUniversalID()}
With a call of csjs you can open the page in a new tab