Create Calendar Entry with LotusScript
Code originally posted 25.07.08 - http://atnotes.de/index.php/topic,41883.msg268602.html#msg268602
LotusScript
Ulrich Krause
Overall rating is 5.00 by 5 person(s)
You have to login first to use 'My Favorites' feature
12 user(s) has marked as favorite:
Alexandr Stoian
Alfredo S. Aguado
Christian Förster
Frank Husemann
Helen Hass
jeniffer homes
Jinsun Jeong
Michael J Martin
Petter Kjeilen
Rainer Fesslmeier
Rami Muurimäki
Rocky Oliver
Added 2012-Jan-12
Create HTML mails in SSJS using MIME
See the description at the top of the class for a description on how to use this class or read this article on my blog:
http://linqed.eu/?p=45
JavaScript (Server)
Mark Leusink
Overall rating is 4.86 by 14 person(s)
You have to login first to use 'My Favorites' feature
15 user(s) has marked as favorite:
Eric McCormick
Eric Tomenga
Fredrik Norling
Gavin Luo
Gunawan T Wicaksono
Joacim Boive
Johan Sundin
Leonardo Bertelli LB Bertelli
martin meijer
Michele Malaguti
Mike R Kelly
Niklas Heidloff
Petter Kjeilen
Steve Pridemore
Venkat T Jagaduri
Added 2011-Dec-07
Standby Dialog Custom control
This version is tested and works with Domino 10
Add this to a custom control and add that to your xpages to get a standby dialog on every partial refresh
that takes more than 200 millisec. Prevents the user to be to fast, and get Xhr cancel dialogs.
Thanks for the help Serdar Başeğmez and Tim Tripcony
Version 3.2 Fixes a problem so IE 8 works again
Version 3.1b Fix for problem if ActiveElement is nothing
Version 3.1a Minor fix in the load once code for the hijack function
Version 3.1 adds load once check for the hijack function and also bugfixes for field focus
Version 3.0 adds scrolling problems when you do a partialrefresh and also selecting the previous selected field
Check out the new Bootstrap version
http://openntf.org/XSnippets.nsf/snippet.xsp?id=bootstrap-standby-dialog
XPages
Fredrik Norling
Overall rating is 5.00 by 14 person(s)
You have to login first to use 'My Favorites' feature
11 user(s) has marked as favorite:
Andrew Barickman
Eric McCormick
Farhan Azam
Fredrik Norling
Grégory DEVISE
Larry Helwig
Mikael Grevsten
Mike R Kelly
mitsuru katoh
P Solano
Tom MC Mennes
Added 2012-Jan-18
SSJS Form Validation That Triggers ErrorMessage Controls
Using the built in validation on XPages controls has the disadvantage that the validation logic gets scattered all over the XPage source. While the other option of using SSJS for form validation does keep all the code in one place, but presents the problem of how to display the error messages back to the user. This is the best way I've found so far to keep the code in one place for maintainability, while using my preferred method of displaying errors to the user right next to the field that they need to fix.
Credit goes to Matt White for how to call validation in SSJS script library, to Andre Girrard for how to trigger the ErrorMessage control ( postValidationError() ), and to Tommy Valand for the $A() helper function, which allows my simple isEmpty() function to work properly with both single and multi-value fields. The following technique pulls all those together.
1. Create the SSJS script library "xpValidation" using the code snippet.
2. Add the "xpValidation" SSJS script library as a resource to the XPage.
3. Make the submit button's "Button Type" = "Button" (not "Submit")
4. In the button's OnClick event, click the "Add Group..." button, in the condition, call the validation function: validateForm()
5. Then inside the group, add a new "Save Data Sources" Simple Action and set the "Name of page to open next" (This will only execute if the validation is passed.)
JavaScript (Server)
Don Mottolo
Overall rating is 4.38 by 8 person(s)
You have to login first to use 'My Favorites' feature
6 user(s) has marked as favorite:
Anders Magnusson
Eric McCormick
Fa Sc
Ferhat BULUT
Gary J. Morin
jeniffer homes
Added 2011-Dec-14
Sorting a NotesDocumentCollection by multiple field values
Also available on http://per.lausten.dk/blog/2006/10/sorting-notesdocumentcollection-by.html
LotusScript
Per Henrik Lausten
Overall rating is 5.00 by 5 person(s)
You have to login first to use 'My Favorites' feature
6 user(s) has marked as favorite:
charles a ross
Guenter Tscharf
Henry - Xu
jimmy fan
Juan Ángel Celdrán Román
Rainer Fesslmeier
Added 2011-Dec-09
Download all attachments
I always loved the feature of “Download all attachments” in Gmail. So I decided we should have this option available in XPages also. Create an XPage with the code above and save it as say, "xDownloadAllAttachments.xsp". Now just call the XPage xDownloadAllAttachments by passing the document UNID in query string to it.
For e.g. http://// xDownloadAllAttachments.xsp? documentUNID=&zipFileName=
That’s it, you are done!
Parameters to query string
1. documentUNID – Universal ID of the document in which attachments are present. This is a mandatory parameter.
2. zipFileName – Name of zip file when the download box is shown to the user. This is optional and if this parameter is not specified then by default AllAttachments.zip name is taken.
Java version of the above code is available at: http://openntf.org/XSnippets.nsf/snippet.xsp?id=download-all-attachments-java
XPages
Naveen Maurya
Overall rating is 4.11 by 9 person(s)
You have to login first to use 'My Favorites' feature
6 user(s) has marked as favorite:
Dani Soft
Eric McCormick
Ferhat BULUT
F. Kranenburg
Grégory DEVISE
Gunnar Dyb
Added 2012-Mar-13
LtpaToken Generator for Multi-server SSO Configurations
This Java class generates a valid LtpaToken valid for any user name.
When using, you should sign the database with a user that is listed as 'Owner' or 'Administrator' in the SSO configuration. This version only supports Domino keys. Tokens imported from Websphere will not generate valid tokens. Since WAS token generation is not based on public API, it doesn't seem possible to do it without native libraries.
This class can be used for any customized login operations. You may specify any user with any name while creating the token.
UPDATE on 9th July, 2012:
- LMBCS encoding support has been added (see comments for details)
Java
Serdar Basegmez
Overall rating is 4.42 by 12 person(s)
You have to login first to use 'My Favorites' feature
6 user(s) has marked as favorite:
Eric N McCormick
Guglielmo Farina
Michele Malaguti
Serdar Basegmez
Steve Cochrane
Vikas Tiwari
Added 2012-May-26
Send Notes document as PDF attachment
This script is ideally placed on a form and allows the user to mail entire document as a PDF. The logic is as follows
- Copy and Paste UI doc into a temporary MS Word object
- Save MS Word as PDF
- Closes MS Word OLE Object
- Opens new mail & attaches PDF file
- Kills temporary file
LotusScript
Ben Menesi
Overall rating is 5.00 by 7 person(s)
You have to login first to use 'My Favorites' feature
2 user(s) has marked as favorite:
Erskine Harris
Wanda M Rosioara
Added 2015-May-19
Use @Transform to build JSON and consume the output in an XAgent
An FAST and easy way to build a complex JSON String / (Almost) No need to calculate at runtime.
Can be used i.e. in the xGrid project http://www.openntf.org/Internal/home.nsf/project.xsp?databaseName=CN=NotesOSS2/O=NotesOSS!!Projects\pmt.nsf&documentId=8147C9C5EC59C08E86257A0C006FD1F8&action=openDocument
JavaScript (Server)
Ulrich Krause
Overall rating is 4.67 by 6 person(s)
You have to login first to use 'My Favorites' feature
5 user(s) has marked as favorite:
Dani Soft
Dwain A Wuerfel
jimmy fan
Venkatesh Ramasamy
Vikas Tiwari
Added 2012-Jun-01
Custom Error Page c/w Cause and Stacktrace Information
Use this snippet to create a custom error XPage. Remember to set the Error Page in the Application Properties to point at your new custom error XPage.
If an exception occurs in your application, you'll see error output in the custom error page like this example:
An error has occurred:
com.ibm.xsp.exception.EvaluationExceptionEx: Error while executing JavaScript computed expression In the control : computedField7 At line 1, column 19 of: #{javascript:nonexistentObject.isDebugMode()}
com.ibm.xsp.binding.javascript.JavaScriptValueBinding.getValue(JavaScriptValueBinding.java:132)
javax.faces.component.UIOutput.getValue(UIOutput.java:159)
com.ibm.xsp.util.FacesUtil.convertValue(FacesUtil.java:1120)
com.ibm.xsp.renderkit.html_basic.OutputTextRenderer.encodeEnd(OutputTextRenderer.java:97)
com.ibm.xsp.renderkit.ReadOnlyAdapterRenderer.encodeEnd(ReadOnlyAdapterRenderer.java:180)
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:1005)
com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:856)
com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:851)
com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:851)
com.ibm.xsp.util.FacesUtil.renderComponent(FacesUtil.java:851)
com.ibm.xsp.component.UIViewRootEx._renderView(UIViewRootEx.java:1317)
com.ibm.xsp.component.UIViewRootEx.renderView(UIViewRootEx.java:1255)
com.ibm.xsp.application.ViewHandlerExImpl.doRender(ViewHandlerExImpl.java:641)
com.ibm.xsp.application.ViewHandlerExImpl._renderView(ViewHandlerExImpl.java:320)
com.ibm.xsp.application.ViewHandlerExImpl.renderView(ViewHandlerExImpl.java:335)
com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:103)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:210)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:120)
com.ibm.xsp.controller.FacesControllerImpl.render(FacesControllerImpl.java:264)
com.ibm.xsp.webapp.FacesServlet.serviceView(FacesServlet.java:248)
com.ibm.xsp.webapp.FacesServletEx.serviceView(FacesServletEx.java:205)
com.ibm.xsp.webapp.FacesServlet.service(FacesServlet.java:160)
com.ibm.xsp.webapp.FacesServletEx.service(FacesServletEx.java:138)
com.ibm.xsp.webapp.DesignerFacesServlet.service(DesignerFacesServlet.java:103)
com.ibm.designer.runtime.domino.adapter.ComponentModule.invokeServlet(ComponentModule.java:576)
com.ibm.domino.xsp.module.nsf.NSFComponentModule.invokeServlet(NSFComponentModule.java:1281)
com.ibm.designer.runtime.domino.adapter.ComponentModule$AdapterInvoker.invokeServlet(ComponentModule.java:847)
com.ibm.designer.runtime.domino.adapter.ComponentModule$ServletInvoker.doService(ComponentModule.java:796)
com.ibm.designer.runtime.domino.adapter.ComponentModule.doService(ComponentModule.java:565)
com.ibm.domino.xsp.module.nsf.NSFComponentModule.doService(NSFComponentModule.java:1265)
com.ibm.domino.xsp.module.nsf.NSFService.doServiceInternal(NSFService.java:661)
com.ibm.domino.xsp.module.nsf.NSFService.doService(NSFService.java:481)
com.ibm.designer.runtime.domino.adapter.LCDEnvironment.doService(LCDEnvironment.java:350)
com.ibm.designer.runtime.domino.adapter.LCDEnvironment.service(LCDEnvironment.java:306)
com.ibm.domino.xsp.bridge.http.engine.XspCmdManager.service(XspCmdManager.java:272)
XPages
Tony McGuckin
Overall rating is 5.00 by 6 person(s)
You have to login first to use 'My Favorites' feature
4 user(s) has marked as favorite:
Eric McCormick
F. Kranenburg
mitsuru katoh
Vincent BOITEUX
Added 2012-May-08
Export ACLList to an Excel file.
Exporting ACL details of all the databases under Domino\data folder to an Excel file.
Note : This agent need to be run from Admin Client with Full Access Admin enabled.
To export the ACL List to an Excel file, please create 'acllist.xls' file and place in C drive.
Keep the Agent properties as below :
Under Runtime, Select 'Action Menu Selection' and Target as 'None'
LotusScript
Sudhakar K Reddy
Overall rating is 4.00 by 4 person(s)
You have to login first to use 'My Favorites' feature
1 user(s) has marked as favorite:
Jamie Wester
Added 2015-Apr-12
Hack to use jQuery AMD widgets and Dojo together
The Dojo AMD loader in Xpages is causing issues with newer jQuery widgets. Examples with issues are jQuery Mobile, Select2 v4.0.0 and Bootbox (modal alert boxes).
Mark Roden blogged about this issue here: http://xomino.com/2015/06/02/select2-v4-needs-amd-fixing-in-domino-r9-xpages/
But what if you don't want to use "resource aggregation" and also don't want to manually edit these Javascripts? This is an alternative option.
The first script tag will temporary disable the Dojo AMD loader by removing "define.amd". After this script tag you should add all jQuery widgets that cause issues.
Last step is to add the a script tag to restore de Dojo AMD loader. That's it!
XPages
F. Kranenburg
Overall rating is 4.78 by 18 person(s)
You have to login first to use 'My Favorites' feature
6 user(s) has marked as favorite:
Angelo Pampalone
B Gleeson
Dan Soares
Eric McCormick
Peter Janzen
Steve Cochrane
Added 2015-Jun-03
Server-side Value Change Events / Listeners
Example illustrating use of a valueChangeListener by way of a Managed Bean method.
XPages
Tony McGuckin
Overall rating is 5.00 by 4 person(s)
You have to login first to use 'My Favorites' feature
1 user(s) has marked as favorite:
Eric Tomenga
Added 2012-Apr-28
get Submitted Value of Component in Java
to use this snippet, you need both methods, but from your Java code call the method getSubmittedValue as parameter the id of the Component. It returns an Object who should be cast to the right class
Java
F van der Linden
Overall rating is 3.83 by 6 person(s)
You have to login first to use 'My Favorites' feature
So far, no one has added to favorites
Added 2011-Dec-02
Remove an entry from an array of strings
The splice function doesn't work in SSJS. This code will extend the array object in SSJS with a new method that will remove a specific entry from a array of strings.
Usage:
var myArray = ["entry 1", "entry 2", "entry 3"];
var myNewArray = myArray.removeEntry("entry 2"); // myNewArray now contains 2 entries: "entry 1" and "entry 2"
JavaScript (Server)
Mark Leusink
Overall rating is 5.00 by 6 person(s)
You have to login first to use 'My Favorites' feature
3 user(s) has marked as favorite:
Henry - Xu
martin meijer
Mike R Kelly
Added 2012-Jan-05