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
3
votes
1 answer

How to update a document using a rest service (extension library) in XPages

i am trying to update a specific document by using rest service control. I have set up the control (documentJsonService, pathInfo, form name etc) I know that i have to perform a post (patch) request to the url of the service followed by /unid/ (same…
mike_x_
  • 1,900
  • 3
  • 35
  • 69
3
votes
2 answers

XPages - save date only in Date field

I'm using an Edit Box control to display a date field. When the XPage is saved, I would like to save the date only (now both date and time are being saved). Is there any way of doing this? Here is my code:
user1358852
3
votes
3 answers

Get Domino server session timeout - XPages

How to get session timeout of Domino server in XPages-SSJS. I want to prompt user to save his/her data before session expires. Thanks
Prabhakar
  • 402
  • 6
  • 20
3
votes
2 answers

Formatting number via java.text.DecimalFormat always returns error in SSJS

I am trying to format a number using java.text.DecimalFormat in SSJS but it returns an error. Here is my code snippet. var df:java.text.DecimalFormat = new java.text.DecimalFormat("000"); df.format(50); This returns an error of Ambiguity when…
Naveen
  • 6,786
  • 10
  • 37
  • 85
3
votes
1 answer

XPages - xp:fileDownload Control in xp:repeat Control

Do you have any idea how can I use xp:fileDownload control in a xp:repeat control ? I binded xp:repeat control to view. So I am available to get NotesViewEntry per line. But I didnt get attachments using var variable in xp:fileDownload control. I…
3
votes
2 answers

How to include client side JavaScript in ssjs in xpages

I would like to include some results from client side JavaScript (csjs) into my server side JavaScript (ssjs) in XPages. e.g. on csjs i collect the screenwidth of a device via window.screen.availWidth I would like to use the result further in my…
Patrick Kwinten
  • 1,988
  • 2
  • 14
  • 26
3
votes
3 answers

Run server side javascript in an agent

is there a way to run server side javascript periodically in lotus notes? I try to create an java agent with this simple script ScriptEngineManager manager = new ScriptEngineManager(); ScriptEngine engine =…
Pudelduscher
  • 359
  • 3
  • 18
3
votes
5 answers

FTSearch involving date fields is confusing me

I have Custom Control with a search screen that lets the users select any of up to six different fields to search on. I had no trouble getting all the other fields working with the exception of the two date fields. They can fill in both begin and…
RoyRumaner
  • 769
  • 1
  • 9
  • 29
2
votes
1 answer

Replace multiple strings in a string via regexp

On an xpage we display the activities registrered on an object. the activies are stored in a multi-value Notes field. a value can be as followed: 2018-12-12 09:36 Jane Doe SysTest/Web/ACME ¤verb_created¤ ¤subj_document¤ in application…
Patrick Kwinten
  • 1,988
  • 2
  • 14
  • 26
2
votes
1 answer

Setting Document as global property in java class, not working

In my Xpages application I have a java class in which I want to set a Document as global property and re-use across my methods. The Document represents a Notes configuration document and I want to perform the lookup only once. Unfortunately it is…
Malin
  • 697
  • 5
  • 21
2
votes
2 answers

set focus on a button

I have a simple xpage with 2 inputText field (username and password) and a button. The idea is that when hitting the "return" or "enter" key , that the onclick event of the button will be activated. I guess this is normally done with an auto…
Marc Jonkers
  • 496
  • 1
  • 7
  • 17
2
votes
2 answers

Using a NotesViewEntryCollection as a datasource for a repeat control - need a method to display the value in a label or computed field

I am using the following as a datasource for an xpage repeat control: var extDB = session.getDatabase("","Position.nsf"); var emailNVCollection:NotesViewEntryCollection = extDB.getView("PrincipalEmails").getAllEntries(); return emailNVCollection I…
user4920643
2
votes
1 answer

SSJS remove item from an array

In ssjs I have an array that contains jsonobjects. this array is stored in a scope variable and displayed in a repeat control: From the repeat control I…
Patrick Kwinten
  • 1,988
  • 2
  • 14
  • 26
2
votes
3 answers

Pass a render function via property definition of custom control

I have built a custom control which renders an arraylist of java objects via a repeat control. Via the property definition I can provide which fields from the underlying java object I want to display. In the back-end I read this value e.g. via…
Patrick Kwinten
  • 1,988
  • 2
  • 14
  • 26
2
votes
1 answer

Data Source in Custom Controls vs. in XPages and BeforeRenderResponse Event

I have some strange behavior, lets take a look at the following examples: The first example without any problems: XPage (with an included datasource)
Georg Kastenhofer
  • 1,387
  • 12
  • 32
1 2
3
58 59