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
11 user(s) has marked as favorite:
Alexandr Stoian
Alfredo S. Aguado
Christian Förster
Frank Husemann
Helen Hass
jeniffer homes
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
x$ jQuery selector for XPages
If you want to use jQuery to select your XPage input text fields it will not work out of the box for two reasons:
1) The server assigns a dynamic name to the field at run time
2) The new id tag name contains colons which are special characters in jQuery selectors.
The x$ function overcomes this issue by escaping the colons and returning the jQuery object.
The dynamically assigned field name is available using “#{id:inputText1}” where inputText1 is the id assigned by the developer
Just add the function to your XPage in script tags and call as if you were using a normal jQuery selector (see below)
Usage - Note the " " before parameters - important as a string is being created for the whole selector.
If the assigned id name is inputText1 the selector is: x$(“#{id:inputText1}”, " parameters (optional)").
Example #1 (no parameters)
x$(“#{id:inputText1}”).css(‘border’, ’2px solid green’)
Example #2 (create alternate rows in a viewPanel table)
x$("#{id:viewPanel1}", " tr:even").css(‘background’, ’yellow’)
JavaScript (Client)
mark roden
Overall rating is 4.88 by 25 person(s)
You have to login first to use 'My Favorites' feature
9 user(s) has marked as favorite:
B Gleeson
Eric McCormick
Eric N McCormick
Guglielmo Farina
Henry - Xu
jimmy fan
Lothar Mueller
martin meijer
Martin Rolph
Added 2012-Feb-06
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
XAgent
Empty XAgent sample
XPages
Stephan Wissel
Overall rating is 4.72 by 18 person(s)
You have to login first to use 'My Favorites' feature
7 user(s) has marked as favorite:
Eric McCormick
Erskine Harris
Henry - Xu
Juan Ángel Celdrán Román
Niklas Heidloff
Patrick Kwintensson
Venkat T Jagaduri
Added 2011-Nov-15
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
Convert any value to an array
Serverside JavaScript is inconsistent in the return value of several methods if that method can return a single value or multiple values.
For instance, If you use getComponent("input1").getValue() and input1 contains multiple values, it returns a Vector. If it contains just a single text value it returns a string. Other examples of functions that might return a single value or an array are @dbLookup, @dbColumn, @trim and @unique
To workaround this you can use this function that always returns an array (also if the input is already an array).
Usage examples:
var result = $U.toArray( @dbLookup(@dbName, "view", "key", "field") );
var result = $U.toArray( getComponent("input1").getValue() );
(note: I'm using the $U object for a set of utility functions)
JavaScript (Server)
Mark Leusink
Overall rating is 4.73 by 11 person(s)
You have to login first to use 'My Favorites' feature
11 user(s) has marked as favorite:
Andrew Barickman
Eric McCormick
Eric Tomenga
Fa Sc
Henry - Xu
Joacim Boive
martin meijer
Mike R Kelly
Paul Della Nebbia
Steve Smillie
V. Watson
Added 2011-Dec-02
XPages Advanced Search Options
This snippet demonstrates the new options to modify Full Text Search results in Domino 8.5.3 in XPages. It contains two panels - 'dbindexed' and 'searchQueryView'.
The 'dbindexed' panel will only display if the database has been indexed for FTSearch and it's main function is to contain a search query. It then has other options to modify those search results. All of these options refresh the 'searchQueryView'.
The 'searchQueryView' contains an example of a viewPanel which will not work out of the box. The developer who uses this snippet will have to modify the Domino View Data source. This example uses a viewPanel, but the data source configuration will also work on a Repeat, Data Table or Data View.
XPages
Paul Hannan
Overall rating is 5.00 by 1 person(s)
You have to login first to use 'My Favorites' feature
1 user(s) has marked as favorite:
Ferhat BULUT
Added 2012-Jan-31
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
Return a valid date value from a date field in a document
Most often we have a "notes document" data source and connect that to a field on the document using simple data binding or expression language, e.g doc.DueDate
Using SSJS it is easy to use doc.getItemValueString("Subject") to return a string value from the notes document
but what if the field in the document is a date field, then you do NOT want to return that field as a string, because then you loos the formatting options available.
Using this code you will get the first value in a date time field in the document and you will be able to set the display type to "Date/Time" in a computed value.
JavaScript (Server)
Thomas Adrian
Overall rating is 4.88 by 8 person(s)
You have to login first to use 'My Favorites' feature
2 user(s) has marked as favorite:
Antonio Cavallari
Mike R Kelly
Added 2011-Dec-07
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
Pure Java version of DbLookup & DbColumn, with cache, sort and unique
This is a completely rewritten version of the SSJS equivalent in pure Java, but without the 64k limit.
Now includes various tweaks to make it even faster.
Java
F. Kranenburg
Overall rating is 4.22 by 9 person(s)
You have to login first to use 'My Favorites' feature
4 user(s) has marked as favorite:
Eric McCormick
Erskine Harris
Tom MC Mennes
V. Watson
Added 2013-Feb-13
Get selectable values of a component
Example how to access all selectable values of a components via SSJS (for comboboxes, listboxes etc.)
Explanations can be found here:
http://hasselba.ch/blog/?p=316
http://hasselba.ch/blog/?p=321
JavaScript (Server)
Sven Hasselbach
Overall rating is 4.50 by 8 person(s)
You have to login first to use 'My Favorites' feature
So far, no one has added to favorites
Added 2011-Nov-22
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