Search code examples
xpages

XPages Repeat Control - Get URL for documents from another database


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?


Solution

  • Use getHttpURL() of class NotesDomino to get document's HTTP URL:

    rowData.getDocument().getHttpURL()