Questions tagged [xpages-ssjs]

The IBM Lotus Domino XPages Server Side Javascript Language

XPages SSJS is a ECMAScript based language specific to IBM Lotus Domino XPages.

It is a Javascript interpreter written in Java and can access extended IBM Lotus Domino objects and Java classes. XPages SSJS is designed to give developers familiar with Javascript, LotusScript and even Notes Formula Language a powerful scripting environment that can be used throughout the XPages IDE.

884 questions
1
vote
2 answers

Xpages: error trapping in LotusScript Agent called from SSJS

I am calling a lotusscript agent from the PostSave event of an xpage (taken from the IBM Wiki Template). I would like to add some error trapping so if something happens (I had cases of "attachments missing... run compact to fix this" error), the…
Ben Dubuc
  • 523
  • 3
  • 14
1
vote
1 answer

XPages: is it possible to call an SSJS function from Java?

I'd like to pass a function parameter (i.e. a FunctionObject) in SSJS to a bean, and then call that function as a kind of callback function. For instance: companyBox.setGenerator(function() { return @DbColumn("", SystemBean.getViewName(), 2); …
D.Bugger
  • 2,300
  • 15
  • 19
1
vote
1 answer

view daterange , end date not correct

I'm selecting documents in a view by daterange. The start date is alway correct but the end date isn't. The selection goes from the startdate till the last entry. My code is : var vDateRange = session.createDateRange(sessionScope.selectedStartDate,…
Marc Jonkers
  • 496
  • 1
  • 7
  • 17
1
vote
3 answers

Best way to build a custom table linked to a NotesView with sorting and paging

I have a view in my Xpage application that contains a lot of elements. From this view I need to build a table with custom rows (I can't just display the view, I need to build the rows to display myself because I need to compute data from other…
1
vote
1 answer

xpages extlib breadcrumbs: how to have a function generate the proper links

I have documents that have 3 fields that can be used to "categorized" the document. For the breadcrumbs, I want to have these fields shown and the link will open up a view at that "category" level (open single category in view). Now all "category"…
Ben Dubuc
  • 523
  • 3
  • 14
1
vote
1 answer

export view daterange to excel

I'm trying to export a view daterange to excel, but it seems the notesviewentry is always empty. My code : var vDateRange = session.createDateRange(sessionScope.selectedStartDate, sessionScope.selectedEndDate); var exCon =…
Marc Jonkers
  • 496
  • 1
  • 7
  • 17
1
vote
2 answers

xPages: redirect to home when dialog closes

I have a contact form where I use the email bean found on OpenNTF snippets to send the email out. That part works great. Once the email is sent, I am showing a dialogbox with a little message to let the user know that the message was sent. What I…
Ben Dubuc
  • 523
  • 3
  • 14
1
vote
1 answer

save datasources equivalent in javascript server side syntax

I'm looking for the equivalent of the simple action "save Datasources" in javascript server side syntax. I already know how to perform a save for a single datasource but not for more than one. For example, if you have a repeat control that displays…
Techn0fil
  • 65
  • 1
  • 5
1
vote
1 answer

erratic failure of sessionAsSignerWithFullAccess

The code below is a some test code that I have in an action button on an XPage. I need to get a handle on the current database with FullAccess in the code WFSUtils.sysOut just formats a printed message to the server console. Periodically the error…
Bill F
  • 2,057
  • 3
  • 18
  • 39
1
vote
1 answer

how to create text fields in xpage programmatically using js

need a little help here. I'm still a bit new to JS so I'm on a crunch here. I need to create text fields programmatically using JS or SSJS in Xpage and I'm really lost. The routine is when I click a button a text field will be added. I will…
Jayson Rondina
  • 149
  • 1
  • 13
1
vote
2 answers
1
vote
1 answer

XPages way to restore soft deleted document?

Is there a way to restore a deleted document that is located in the trash? All I know is the @UndeleteDocument formula.
Ben Dubuc
  • 523
  • 3
  • 14
1
vote
1 answer

XPages setfield from view selection

I have a repeat control with buttons to select or deselect various docs - that works and I can identify each selected doc by the doc id. I have another button with the following SSJS. For the docs selected I want to set a field in the underlying…
1
vote
1 answer

XPages: How to fetch documents in view and read values?

I am a beginner with XPages, and I have looked at the TLCC Intro free training. I have also seen tutorials here. I have no experience with Lotus Notes, XPages or flat-structured databases. But, I do have some experience in JavaScript and good…
igt256
  • 13
  • 3
1
vote
1 answer

vw.FTSearchSorted fails when specifying ascending sort order

I have a FTSearchSorted issue My code in some SSJS looks like this: var vw:NotesView = thisAppDB.getView("vwFTSearch") var n:Integer = vw.FTSearchSorted(qString, 0 , "SortBy" , false, false, false ); And I get the error below AfterPageLoad…
Bill F
  • 2,057
  • 3
  • 18
  • 39