XPages重复控制 – 从另一个数据库获取文档的URL

huangapple go评论53阅读模式
英文:

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()

huangapple
  • 本文由 发表于 2023年5月11日 20:00:38
  • 转载请务必保留本文链接:https://go.coder-hub.com/76227439.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定