xpages-ssjs

Open NotesURL via redirect

╄→尐↘猪︶ㄣ 提交于 2019-12-13 04:29:59
问题 I have a repeat-control which generates me a list of links to documents in a different database. Special on this task is that the XPage runs in the notes internal browther (NOT XPniC) and open the documents as real notes documents in the notes client (NOT Xpages). so far every thing works fine. Now I want too check if the document exists before I open the document. My solution is an xAgent which check if the document exists and redirect to the NotesURL but I get the following error: Error

Recycle and GetNextDocument / GetNextCategory in NotesViewNavigator?

不羁的心 提交于 2019-12-13 02:56:33
问题 How do I do a recycle for GetNextDocument or GetNextCategory in a NotesViewNavigator? Neither takes an argument so you can't use the conventional method of using a temp variable to pre get the next document like you might in a view. I suppose the solution would be to just use getNext with an argmenumnt but can GetNextDocument / GetNextCategory still be used? The error I am getting is on line 20. Without the recycle the code runs fine. From what I understand recycle destroys the object so I

xPages - how to append & prepend text to a richtext field

只愿长相守 提交于 2019-12-13 02:55:25
问题 I'm migrating an app to xpages. I have a doc that's created from an email received by the app. A richtext field on the created document contains the email body. Someone responds to the sender by updating this field and hitting the Send button. Before it actually goes out, I prepend and append a bit of text to the content being sent. I tried lots of ways to do this but am stumped. I know .getItemValue returns a vector but I thought I'd give it a shot anyway but returns null. var rtiIssueField

combobox - displaying multivalue numeric field

和自甴很熟 提交于 2019-12-13 02:35:55
问题 I have a form which contains a multi-value enabled numeric field. I would like to display it on an xpage in a combobox when it has multiple value. However I get the error 500 message. When I try to achieve the same thing with a multi-value text field the xpage got rendered. What am i doing wrong? <?xml version="1.0" encoding="UTF-8"?> <xp:view xmlns:xp="http://www.ibm.com/xsp/core"> <xp:this.data> <xp:dominoDocument var="doc" formName="test" action="editDocument"> </xp:dominoDocument> </xp

Create dash node dynamically on XPAGES

橙三吉。 提交于 2019-12-12 06:37:26
问题 I recently installed the Extension Library containing objects responsive In particular I was using the Dashboard component. I was trying to figure out how to dynamically create DashNode with programmatically. There is a mode for to do this activity from SSJS ? 回答1: I was doing some experimentation recently for dynamically creating a Carousel control. I'll post the code that achieved it below, and it should give you the starting point for what you need to do to create a Dashboard dynamically.

Get Column Values of Searched (Filtered) View Results

馋奶兔 提交于 2019-12-12 05:39:59
问题 I am doing a search query on a viewPanel. When the results get displayed in the view, I want to loop through only the returned results and build an array of names for each row. I have the Name field in the first column of my Xpage view. I have tried the following: var viewControl = getComponent("namesPanel"); var view = viewControl.getDataModel().getDominoViewData().getDataObject(); var entries = view.getAllEntries(); var entry = entries.getFirstEntry(); var namesArray = []; while(entry) {

XPages to create .txt File via SSJS

自古美人都是妖i 提交于 2019-12-12 05:13:22
问题 I need to create a text file with SSJS. I get data from a document then i will write all data in a text file. I tried to some solution which i find searching on the internet but I could not get result I needed. Regards Any Suggestion is appreciated Cumhur Ata UPDATE: writer.endDocument(); facesContext.responseComplete(); writer.close(); UPDATE 2 : <xp:button value="Create TXT File" id="button1"> <xp:eventHandler event="onclick" submit="true" refreshMode="complete"> <xp:this.action><![CDATA[#

compute dynamically the allowDelete property of file download xpages

核能气质少年 提交于 2019-12-12 03:46:01
问题 I am using a file download control and I would like to set the value of the "allowDelete" property dynamically depending on whether the document is in edit or read mode. However, this property is computed onload of the page. I tried calling the function "setAllowDelete(boolean)" on the onclick event of a button or the "beforeRenderResponse" event of a custom control and a partial or full update to change the value of the property, but it didn't change. Do you know if there is a way to do this

Xpages: Doc locking error

前提是你 提交于 2019-12-12 03:28:20
问题 Trying to implement document locking in a small database. We use it in XPiNC. I found Julian Boss's excellent answer in in which he provides a javascript function that seems to have everything I need. So in a small test database I added the script library and added as a resource. In my edit button I have the following code: var ntdDoc:NotesDocument = document1.getDocument(); documentLocking.lockDoc(ntdDoc) But this throws the following error: Script interpreter error, line=2, col=17:

xpages save / cancel actions scenario

孤街浪徒 提交于 2019-12-12 02:49:05
问题 I will describe shortly my little project application: the main doc. content is Cdoc ( datasource which contains fields + a button ). This button displays a dialog which is Pdoc ( a datasource ) - before showing the button I will save the doc. to get the UNID and then I will pass it to the Pdoc , I want to link the Cdoc and Pdoc with the UNID. My button which shows the dialog: <xp:button value="Adding Pdoc from the dialog" id="button3" styleClass="lotusFormButton" refreshMode="partial"> <xp