Hi,
what do you want to do exactly? Do you want to open a new tab or a new window with an XPage? Then try to use the target property of the link (propably not in the editor area). But I don't know whether this is working in XPages, haven't tried it so far.
Or do you want to open a dialog? You can achieve this with dojo, try something like that:
<xc:fkZetaDialog dialogID="dialog">
<xc:this.dialogTitle><![CDATA[#{javascript:"some computed text")}]]></xc:this.dialogTitle>
<xp:this.facets>
<xp:div xp:key="facetDialogContainer" id="dialog">
</xp:div>
</xp:this.facets>
</xc:fkZetaDialog>
Call it with this:
<xp:eventHandler event="onclick" submit="false">
<xp:this.script><![CDATA[
XSP.allowSubmit();
dijit.byId("#{id:dialog}").show()]]>
</xp:this.script>
</xp:eventHandler>
Don't forget to include this in your XPage in the ressource section:
<xp:dojoModule name="dijit.Dialog" />
The Zeta Dialog control you can get from here:
http://xpagesblog.com/XPagesHome.nsf/Entry.xsp?documentId=9BB0002FE3452618852578CB0066AB75
This is my code for the zetaDialog control itself:
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<xp:this.resources>
<xp:script src="/dojoZetaDialog.js" clientSide="true"></xp:script>
<xp:styleSheet href="/styleme.css"></xp:styleSheet>
<xp:styleSheet href="/style_s.css" />
<xp:styleSheet href="/fk-xpages.css" />
</xp:this.resources>
<xp:panel id="${javascript:compositeData.dialogID}"
dojoType="com.ZetaOne.widget.Dialog"
style="width:700px;height:400px; border: solid green 1px">
<xp:this.dojoAttributes>
<xp:dojoAttribute name="title"
value="#{javascript:compositeData.dialogTitle}" />
</xp:this.dojoAttributes>
<xp:panel id="dialogpanel">
<xp:callback facetName="facetDialogContainer"
id="callbackDialogContainer">
</xp:callback>
</xp:panel>
</xp:panel>
</xp:view>
Also use this code as a javascript library:
dojo.provide('com.ZetaOne.widget.Dialog');
dojo.require('dijit.Dialog');
(function(){
dojo.declare("com.ZetaOne.widget.Dialog", dijit.Dialog, {
disableCloseButton: false,
_onKey: function(evt)
{
if(this.disableCloseButton && evt.charOrCode == dojo.keys.ESCAPE) return;
this.inherited(arguments);
},
setCloseButtonDisabled: function(flag)
{
this.disableCloseButton = flag;
this._updateCloseButtonState();
},
_updateCloseButtonState: function()
{
dojo.style(this.closeButtonNode,
"display",this.disableCloseButton ? "none" : "block");
},
postCreate: function(){
this.inherited(arguments);
this._updateCloseButtonState();
dojo.query('form', dojo.body())[0].appendChild(this.domNode);
},
_setup: function() {
this.inherited(arguments);
if (this.domNode.parentNode.nodeName.toLowerCase() == 'body')
dojo.query('form', dojo.body())[0].appendChild(this.domNode);
}
})
}());
To select the response document, there is nothing special to do, you only need the UNID of the document.
Hope this helps.