OpenNTF / org.openntf.domino

Open replacement for lotus.domino package in HCL Domino
Apache License 2.0
65 stars 34 forks source link

RichText.appendDocLink does not seem to work for document link #114

Closed BrianMooreTM closed 10 years ago

BrianMooreTM commented 10 years ago

Assuming I'm doing this correctly (below), the document type of link doesn't send when appended. The view and database links to appear when sent. I've tired all three method types ( just document, with comment, and with hotspot text)

The email I get has the view and database link, but not the document link. Have I done this wrong?

org.openntf.domino.Document nDoc = db.getDocumentByID(nDocNoteID); org.openntf.domino.Document mDoc = db.createDocument(); mDoc.replaceItemValue("form", "Memo"); org.openntf.domino.RichTextItem rt = mDoc.createRichTextItem("Body"); rt.appendDocLink(nDoc, "Here is the docLink", "Click Here"); rt.addNewLine(2); org.openntf.domino.View view = db.getView("Engine"); rt.appendText("Here is the viewLink"); rt.appendDocLink(view); rt.addNewLine(2); rt.appendText("Here is the databaseLink"); rt.appendDocLink(db); rt.addNewLine(2);

Cheers, Brian

paulswithers commented 10 years ago

Hi Brian I know you've got plenty of XPages experience, but Declan's added a few checklists here http://stackoverflow.com/questions/9332837/getting-an-error-message-when-trying-to-appenddoclink-is-ssjs I haven't tried the issue yet to confirm nothing's broken, but we're just calling the lotus.domino methods

BrianMooreTM commented 10 years ago

I forgot to mention I'm trying this in XPiNC (bad me).

And it was that the app lacked a default view. I thought I had done something wrong, and that seems to be it. It's not the effect I would have expected (or seen before?) where the link is created and mailed, but fails when clicked. I don't know how I managed to create an app without a default view (or removed it) since I know it's needed.

I am indebted to you for the pointer, and to all of you for the great library this is.

Cheers, Brian

jyyna commented 10 years ago

closing the issue as it was caused by not having default view in nsf