英文:
XPages Repeat Control - Get URL for documents from another database
问题
我创建了一个重复控件,使用来自另一个数据库(extdb.nsf)的文档。这部分正常工作。
我可以获取主题并显示它。
但我不知道如何获取文档的URL,以便使主题可点击。
<xp:panel styleClass="td_deka" id="panel1">
<xp:this.data>
<xp:dominoView var="view1" databaseName="extdb.nsf" viewName="(XSPextview)">
</xp:dominoView>
</xp:this.data>
<xp:repeat id="repeat1" value="#{view1}" var="rowData" rows="50" styleClass="div">
<xp:link escape="true" id="link1" styleClass="a">
<xp:this.title>
<![CDATA[#{javascript:rowData.getDocument().getItemValueString("Subject")}]]>
</xp:this.title>
<xp:this.text>
<![CDATA[#{javascript:rowData.getDocument().getItemValueString("Subject")}]]>
</xp:this.text>
</xp:link>
<xp:br></xp:br>
</xp:repeat>
</xp:panel>
extdb.nsf中的文档已定义了用于Web访问的xpage。
有人知道如何做到这一点吗?
英文:
I created a Repeat control with documents from another database (extdb.nsf). That works fine.
I get the subject and can display it.
But I don't know how to get the url for the documents to make the subjects clickable.
<xp:panel styleClass="td_deka" id="panel1">
<xp:this.data>
<xp:dominoView var="view1" databaseName="extdb.nsf" viewName="(XSPextview)">
</xp:dominoView>
</xp:this.data>
<xp:repeat id="repeat1" value="#{view1}" var="rowData" rows="50" styleClass="div">
<xp:link escape="true" id="link1" styleClass="a">
<xp:this.title>
<![CDATA[#{javascript:rowData.getDocument().getItemValueString("Subject")}]]>
</xp:this.title>
<xp:this.text>
<![CDATA[#{javascript:rowData.getDocument().getItemValueString("Subject")}]]>
</xp:this.text>
</xp:link>
<xp:br></xp:br>
</xp:repeat>
</xp:panel>
The documents in extdb.nsf have an xpage defined for web access.
Does anybody know how to do that?
答案1
得分: 1
使用NotesDomino类的getHttpURL()方法来获取文档的HTTP URL:
rowData.getDocument().getHttpURL()
英文:
Use getHttpURL() of class NotesDomino to get document's HTTP URL:
rowData.getDocument().getHttpURL()
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论