xpages-ssjs

xsp.application.timeout and “Object has been removed or recycled”

こ雲淡風輕ζ 提交于 2019-12-08 08:51:10
问题 I've been having a lot of problems with disappearing Java class level Domino objects lately. For example I place a lotus.domino.Session to a (non-static) class level variable and when I try to use it in the next code line I get: NotesException: Object has been removed or recycled I didn't have these problems before I started using managed beans but now I seem to get them all the time with request scoped beans and also in plain Java objects. I've been adding isRecycled() checks to many places

How do you get the filename from the XPages FileUpload Control

放肆的年华 提交于 2019-12-08 03:30:04
问题 In XPages, in the file upload control, after a user selects a file but before it's saved how can you get the filename? I'm not interested in the path as I believe that's not getable due to security issues but I would like to get the filename and extension if at all possible. Thanks! 回答1: Actually you can get the file and fully manipulate it, read it, do whatever you want with it, its stored in the xsp folder on the server, to which you have read/write access... here is a code snippet that

Call a class of a jar from SSJS xPages

。_饼干妹妹 提交于 2019-12-08 01:36:33
问题 I would like to ask a question about using Java classes in SSJS (Server Side JavaScript) on xPages. I created a simple Java class "HelloWorld" and exported it to a jar file. Then I tried to call it from SSJS on an xPage but with no success. These are some things that I tried: Added the jar to the build path of the .nsf (both jar and nsf were local) Added the jar to WEB_INF/lib folder of the nsf. Called the class of the jar directly from SSJS as var a = new com.myself.testJava.HelloWorld();

Get Domino server session timeout - XPages

一笑奈何 提交于 2019-12-07 15:53:39
问题 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 回答1: Servers only communicate with users when those users make a request to the server. Because of this, servers cannot send information to the user if they haven't requested it. For example: A user requests a page from a server. The server sends that page back to the user, and creates a session for that user. The session is set to expire in 5 minutes. Those 5

FTSearch involving date fields is confusing me

白昼怎懂夜的黑 提交于 2019-12-07 13:31:06
问题 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 end dates or just one or the other. Pretty standard stuff but I cannot figure out how to write the code to make the query work and have it do the search when it involves dates. var tmpArray = new Array(""); var cTerms = 0; if(requestScope.cmbSendTo !

XPages [TypeError] Exception at view.getNextDocument(curDoc)

给你一囗甜甜゛ 提交于 2019-12-06 15:52:23
Here's my set-up: In my XPage, I have an embedded view which opens a document in the adjacent Panel. Clicking the doc link in the view sets the doc's UNID in a viewScope variable, and refreshes the Panel. The UNID variable is used to define the Page's Data Source Document ( doc ). Now in a Button, I want to get a handle to the next document in the view, but when the following SSJS code is run an error occurs at the last line: var v:NotesView = database.getView("ViewByYear"); var curDoc:NotesDocument = doc.getDocument(); // curDoc = v.getFirstDocument(); /* if this line is uncommented the error

How do you get the filename from the XPages FileUpload Control

允我心安 提交于 2019-12-06 14:57:01
In XPages, in the file upload control, after a user selects a file but before it's saved how can you get the filename? I'm not interested in the path as I believe that's not getable due to security issues but I would like to get the filename and extension if at all possible. Thanks! Actually you can get the file and fully manipulate it, read it, do whatever you want with it, its stored in the xsp folder on the server, to which you have read/write access... here is a code snippet that interacts with the file, I usually call from beforeRenderResponse... var fileData:com.ibm.xsp.http.UploadedFile

Xpages get a handle on next rowData or Doc in a repeat

别来无恙 提交于 2019-12-06 13:25:36
In my repeat control I want to be able to get a handle on data in the next row in order to modify what data is displayed in my current row (I have move up and down actions, and I don't want to display them if the move is not possible). It seems I should be able to do this. Probably I cannot from within in the repeat itself, as when it is writing the repeat it will not know the data for the next repeat. But shouldn't there be a fairly easy way to get the next document? Here is a reduced version of my repeat control: <?xml version="1.0" encoding="UTF-8"?> <xp:view xmlns:xp="http://www.ibm.com

call partialRefreshGet from SSJS using view.PostScript

做~自己de王妃 提交于 2019-12-06 12:15:03
问题 I have a SSJS running in the BeforePageKoad event. As the last step of the SSJS I want to do a partial refresh. In my script I have this line of code: view.postScript("partialRefreshGet('#{id:panelAll}')") When it executes I get an error that says partialRefreshGet is undeffined. I'm guessing I'm missing something in the format of the call, but as I understand it this should work. Anyone done something like this before. If I leave this code out then do a manual refresh of panelAll from a

Get Domino server session timeout - XPages

喜欢而已 提交于 2019-12-06 02:14:05
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 Servers only communicate with users when those users make a request to the server. Because of this, servers cannot send information to the user if they haven't requested it. For example: A user requests a page from a server. The server sends that page back to the user, and creates a session for that user. The session is set to expire in 5 minutes. Those 5 minutes are up, and in the meantime the user hasn't requested any further pages. So the users session ends,