FAQ Database Discussion Community


XPages:dialog box refreshing a panel on close

xpages,xpages-ssjs,xpages-extlib
I have a document that contains a rating custom control (xInvolve, which is excellent!). In this application, administrators want the ability to delete certain ratings for a certain document or all of them (bad ratings on purpose, new version of the document, corrections made to the document ...). I am...

“I am Alive” in single browser session

xpages,xpages-ssjs
How to stop a user from opening a new browser session in XPages In the answer to this posting Knutt added a really nice bit of code that stops a user from opening multiple instances of the same application in a browser. This works very well in a web browser,...

xpages Date Compare

datetime,xpages,xpages-ssjs
Hi i want to write Style ssjs for plan view. Set on column date variable "01.06.2007" and if document start date + duration contains 01.06.2007 result is background color change. DateConverter.stringToDate = Java.util.date Tommy Valand code. (http://dontpanic82.blogspot.com.tr/2010/04/xpages-code-snippet-for-datestring.html) //------------------------------------------------- col = 0; var zeroDate = DateConverter.stringToDate( '01.06.2007', 'dd.MM.yyyy' ) colDate =...

Exception occurred calling method NotesDatabase.getDocumentByUNID(null) null

xpages,xpages-ssjs
I don't understand why I'm getting the above mentioned error with following code : value1 = sessionScope.get("selectedPicture"); if (value1 != "empty"){ var db:NotesDatabase = session.getDatabase(database.getServer(), "product\\picture.nsf"); if (db != null) { var IDtoChange = toString("7D59468E241AC271C1257D5000417E46") ; if (IDtoChange = null){ return } try { doc = db.getDocumentByUNID(IDtoChange); doc.replaceItemValue( 'picWeb', "true"...

SSJS onClick action will not fire on XPage

xpages,xpages-ssjs,xpages-extlib
I found this question, but it does not appear to be resolved, and I also have more to add. First off, the linked question defines pretty much the same issue that I am having. 1. I am using the application layout control from the ExtLib 2. It does not matter...

XPages SSJS: what can prevent a page to enter edit mode when opeing with URL?

xpages,xpages-ssjs
I have a view where I build a URL that should open a document in edit mode. My page has its default action property set to open the document but I thougn that since I am specifying in the URL that I want to open in edit mode, it would...

How to set the value of a component to a number

xpages,xpages-ssjs
I use the value for 'first' on a repeat control to know where I was as sessionScope.ssCat1First = getComponent("repeatCat1").first; so I can set the Starting Index value to ssCat1First and I'm on the right page. However, under some conditions I need to reset first on the component I tried getComponent("repeatCat1").first.setValue(0);...

How to check if currentDocument is availalbe

xpages,xpages-ssjs
I am trying to put some SSJS code together in which I'd like to check, if currentDocument is available. I've tried something like: if(currentDocument != undefined) But it just throws a runtime error. Is it even possible to check if currentDocument is available? Any help would be greatly appreciated....

xpages SSJS: cannot get rid of “com.ibm.xsp.acl.RedirectSignal” warnings in log

xpages,xpages-ssjs
I am building a multilingual application and I am storing the value of the latest language used in a cookie. When the user opens up the application, the sessionScope variable is not set and the code will look for the cookie value and reload the page if not in the...

Xpages - Creating Repeat or View from different database with ACL set to No Access

xpages,lotus-notes,xpages-ssjs
I am trying to create a repeat element from a view in a different database that does not allow Anonymous ACL access. PubDb.nsf has ACL set for user Anonymous to Author PrivDb.nsf has ACL set for user Anonymous and Default "no access". The database, PrivDb has information that I want...

mutivalue date field search not working

xpages,xpages-ssjs
I have a multivalue field called freeDaysPool which has multiple dates as strings. With the following code, the search does not return anything. If I leave that field out, the search works just fine with the two other fields. I read that I should use CONTAINS with multivalue fields but...

Custom Error XPage: Ability for Browser to Load and Execute JS Script Link or Block After Being Loaded On Error

javascript,dojo,xpages,xpages-ssjs
Situation I'm using a custom error XPage, based highly off of the XSnippet from Tony McGuckin. It works rather well but I would like for the browser to execute a client-side JavaScript block (or load and run a JS file from a given URL). If I navigate directly to the...

save datasources equivalent in javascript server side syntax

xpages,xpages-ssjs
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 one document per entry, how to...

Xpages: Cannot get OnClick event in Navigator to fire

xpages,xpages-ssjs
I am trying to build a dynamic navigator for a document database. The navigator build correctly by using a repeat node (I got this from a post by Per) and I can put page or basic nodes in the repeat node and everything looks good, but I need to set...

xPages: redirect to home when dialog closes

xpages,xpages-ssjs,xpages-extlib
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...

How to pass a reference to a file from Java in xpages

java,xpages,xpages-ssjs,xpages-extlib,ssjs
I am sorry for my English. I use a translator. There is a code to Java. Reads from the database of the field Posgresql bytea binary data and stores it in a file: <code> public static void saveToFile() throws IOException { try { Connection conn = JdbcUtil.getConnection(FacesContext.getCurrentInstance(), "derby1"); ResultSet rs...

How to trigger the onError client side event

javascript,xpages,xpages-ssjs
I have a button with some SSJS code in the click eventhandler. It basically calls a Java method that says true or false. Therefor I'd like to trigger also the onComplete and the onError CSJS scripts: onComplete for success, onError for failure. Unfortunately I didn't figure out yet how to...

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

xpages,xpages-ssjs
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...

xpages session scope AND document data binding

data-binding,xpages,xpages-ssjs
I have a value that I get from a picklist. I set this value as a sessionScope variable. I then want to use this value, do a lookup, and set the value of an input field - which is working. However, I am doing the lookup code in the fields...

Is it possible to group or put multiple images inside a folder using xpages, like in FB photo albums?

xpages,lotus-notes,xpages-ssjs,xpages-extlib
we have a client that wants to have an FB like photo album feature, where in the user can upload image(s) and put those uploaded or selected image(s) inside an album. I just want to know first if it's possible using out of the box xpage or I need to...

add a user in a group

xpages,xpages-ssjs
I would like to be able to add a user as a member into an excisting group (Newsletter). With the code I have so far a new group is created with all the users and also the new member. So , instead of inserting the user the code makes a...

Doclink not opening in xpages

xpages,xpages-ssjs,xpages-extlib
i am using this code it is show doclink but it is not opening it show some error. var document1:NotesDocument = database.createDocument(); var rtitem:NotesRichTextItem = document1.createRichTextItem("body"); document1.replaceItemValue("Form", "memo"); document1.replaceItemValue("SendTo", "[email protected]"); document1.replaceItemValue("Subject", "Rajesh"); rtitem.appendText("Some text here... "); rtitem.addNewLine(2); rtitem.appendText("NotesDocument.NotesURL"); rtitem.appendDocLink(document1, "Some comment text"); rtitem.addNewLine(2);...

NotesRichTextItem.getMIMEEntity() always returns null

xpages,xpages-ssjs,richtext
I have a notes form with a rich text field on it, called "Body". I've set the "Storage" property of the field to "Store contents as HTML and MIME". Now, I am creating a new document with that form in the Notes Client. However, if I try to access the...