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
11
votes
2 answers

How to clean SSJS in Domino server after someone used javascript prototype in a nsf?

How to clean SSJS (Server Side Javascript) in Domino server after someone used javascript prototype in a nsf? Mark Roden discovered a huge weakness in XPages SSJS: (thanks to David Leedy for tell me about this and show me the article). If you have…
Johann Echavarria
  • 9,695
  • 4
  • 26
  • 32
9
votes
1 answer

XPage Java Object Recycle in SSJS

I have read this suggestion about recycle of Domino objects: What is the best way to recycle Domino objects in Java Beans What is best practice if I have a datasource named document and in a function that is called several times this code…
Peter
  • 91
  • 2
6
votes
1 answer

Code renders in browser but errors in the IBM Notes client

I have two computed fields and want update them. It works great in the browser, but the IBM Notes client gives an error. Here is the code: var Admin = @DbColumn("", "GoreAdmins", 1); var AdminBackup = @DbColumn("", "GoreAdmins", 2); if (Admin…
lbert
  • 61
  • 2
6
votes
1 answer

dropzonejs and XPages upload

Hello I need to use http://www.dropzonejs.com/ for upload file in my XPages. I thought about using to use the XAgent for handle Mark Leusink: http://openntf.org/XSnippets.nsf/snippet.xsp?id=custom-xpage-file-upload-handler But always I have problem…
Daniele Grillo
  • 1,011
  • 4
  • 13
  • 31
6
votes
2 answers

Which is the most efficient way to access the value of a control?

Of the two choices I have to access the value of a control which is the most efficient? getComponent("ControlName").getValue(); or dataSource.getItemValue("FieldName"); I find that on occasion the getComponent does not seem to return the current…
Bill F
  • 2,057
  • 3
  • 18
  • 39
5
votes
2 answers

ArrayIndexOutOfBoundsException occurs when using large SSJS array

When I tried to benchmark the difference in execution time between the forward and the reverse loop iteration in server-side JavaScript (SSJS), a (strange) problem occured. While this example code var i,n=9999; var arr=new Array(n); for…
xpages-noob
  • 1,569
  • 1
  • 10
  • 37
5
votes
1 answer

How to implement "continue=false" in Xpages events

This is a rather generic question, but I'll try to be as precise as possible: quite often I'm asked by customers for proper implementations of LotusScript's continue = false in Notes' Query* events. One quite common situation is a form's QueryOpen…
Lothar Mueller
  • 2,528
  • 1
  • 16
  • 29
5
votes
2 answers

Count entries in XPages view

My XPage has a view data source with a search formula ("Search in view results") constructed from URL parameters. The search results are displayed in a repeat control that sits inside a panel. I want to hide this panel if there are no search results…
Martin Perrie
  • 398
  • 5
  • 16
4
votes
1 answer

How do I get documents from view based on 2 keys

I have an XPage where I find all children documents using view through key(first column) with method called getAllDocumentsByKey method. As a key I use UNID of a parent. But now I have another parameter called ChildType which can either be equal…
J.Nick
  • 205
  • 2
  • 9
4
votes
1 answer

Performance loss when using HashMap.put method in SSJS

In my XPages applications I frequently use SSJS objects (com.ibm.jscript.std.ObjectObject) to cache data. To check if the performance improves if I use java.util.HashMaps instead, I benchmarked the execution times of the following code snippets…
xpages-noob
  • 1,569
  • 1
  • 10
  • 37
4
votes
2 answers

Design Definition custom control how access MultiValue

Hello I have create my custom control with a proprierty definition I read this page Design Definition advanced for customize the design of my custom control. This is my code (this generate a table with a number of rows how many elements are the…
Daniele Grillo
  • 1,011
  • 4
  • 13
  • 31
4
votes
6 answers

Quantify performance gain when using Java instead of SSJS

When developing XPages applications it seems to have become very popular to mainly use Java methods and beans instead of server-side JavaScript (SSJS). SSJS of course takes longer to execute because the code has to be evaluated at runtime. However,…
xpages-noob
  • 1,569
  • 1
  • 10
  • 37
4
votes
1 answer

Get all items in NotesXSPDocument

In my Notes Database, I perform an audit when the document is saved. Pretty easy in LotusScript. I grab the original document (oDoc) from the server, then in the document I modified (mDoc), I do a Forall loop that gets the names of each item; forall…
cjames728
  • 193
  • 1
  • 12
4
votes
1 answer

How to avoid the 64k limit when retrieving data from a view column?

I'm aware that the SSJS version of @DbColumn() has the same 64k limitiation as the original Formula language version. So up until now I used NotesView.getColumnValues() instead, believing that here I wouldn't face such a limitation. Which obviously…
Lothar Mueller
  • 2,528
  • 1
  • 16
  • 29
4
votes
2 answers

Are JAR files in WebContent/WEB-INF/lib available to Java design elements in Domino Designer?

When using Domino Designer 8.5.3, I have a bunch of custom classes added using the Java design element. I want to use a 3rd party JAR in my custom classes in the same way you would when using external JARs in xPages SSJS, via Package…
lee_mcmullen
  • 2,801
  • 32
  • 39
1
2 3
58 59