emailBean : Send DominoDocument HTML Emails c/w Embedded Images, Attachments, Custom Header/Footer
Use the emailBean to create and send HTML/MIME emails based on a DominoDocument datasource. Use CKEditor bound to the datasource to compose the email content that can also include Embedded Images. Use the File Upload bound to the datasource to also include Attachments in the email. You can also specify your own custom Header and Footer (Signature) HTML content for the email.
Example:
emailBean.setSendTo("frank@renovations.com");
emailBean.setSubject("Todays Finance Report");
emailBean.setSenderEmail("samantha@renovations.com");
emailBean.setSenderName("Samantha - Renovations");
emailBean.setDocument(document1);
emailBean.setFieldName("Body");
emailBean.setBannerHTML("Hi,
");
emailBean.setFooterHTML("Kind regards,
Samantha
0012 3456 789
");
emailBean.send();
XPages
Tony McGuckin
Overall rating is 5.00 by 9 person(s)
You have to login first to use 'My Favorites' feature
14 user(s) has marked as favorite:
Angelo Pampalone
Cristian DAloisio
Dwain A Wuerfel
Grégory DEVISE
Jan1 Krunniniva
Joe L Bedolla
Leonardo Bertelli LB Bertelli
Marco Gajardo
Michele Malaguti
Mikael Grevsten
Serdar Basegmez
Son T Le
Terry Traphagen
Ulrich Krause
Added 2012-Apr-04
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
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
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
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
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
getComponentValue
Sometimes you use getValue() or getSubmittedValue() to get the value of component, this function will handle this problem
JavaScript (Server)
F van der Linden
Overall rating is 4.80 by 5 person(s)
You have to login first to use 'My Favorites' feature
4 user(s) has marked as favorite:
Dwain A Wuerfel
Eric McCormick
Martin Perrie
Mike R Kelly
Added 2011-Nov-15
Sample about NamePicker Data Provider (dataBean)
DominoDirectoryNamePicker V2.0 (Updated at May 31, 2012 12:09 AM)
Updated some codes about Dialog usage. There is a problem for "hit to ENTER key" to make search. Hit to ENTER, values duplicated because readEntries function executed twice. When you click on Search Button, no problem.
Updates are about, when you search same value twice, to fill list with same values. etc. I'm sure, you can handle it :)
----
DominoDirectoryNamePicker V1.0
If you need to customize NamePicker data, this XSnippet can help you to do that.
I needed to use ExtLib NamePicker but our user directory is not domino directory db. It's custom database. Also we need to add search capability for First Name, Middle Name and Last Name at once.
So I need to customize NamePicker data source using bean. ( tried, tested, worked :) )
In this XSnippet, I used Full-Text search in our organization database to match users by FirstName, Middle Name and Last Name. At one search. Used nameAggregator but no success unfortunately. Because I need to use "CN (ID)" format as a value for selected items.
I hope it an help your needs.
For sample database; http://www.bestcoder.net/files/NamePickerExt.zip
Enjoy!
Ferhat BULUT
www.bestcoder.net
Java
Ferhat BULUT
Overall rating is 5.00 by 6 person(s)
You have to login first to use 'My Favorites' feature
1 user(s) has marked as favorite:
Eric Tomenga
Added 2012-May-30
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
Custom XPage file upload handler
Use this code if you want to implement a custom file upload solution like PLUpload or jQuery File Upload with XPages. See also: http://stackoverflow.com/questions/19723731/how-to-upload-a-file-from-mobile-phone-camera-to-xpages-with-phonegap-filetransf/19739712#19739712
Java
Mark Leusink
Overall rating is 5.00 by 2 person(s)
You have to login first to use 'My Favorites' feature
4 user(s) has marked as favorite:
Eric McCormick
Michele Malaguti
Serdar Basegmez
Steve Cochrane
Added 2014-Jul-04
Download all attachments (Java)
I always loved the feature of “Download all attachments” in Gmail. So I decided we should have this option available in XPages also. This snippet is the Java version of my XSnippet - Download all attachments. You can see the SSJS version here: http://openntf.org/XSnippets.nsf/snippet.xsp?id=download-all-attachments
The implementation steps are explained in comments at the start.
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
Naveen Maurya
Overall rating is 4.33 by 3 person(s)
You have to login first to use 'My Favorites' feature
3 user(s) has marked as favorite:
gupta ravi210
Markus Ch Haller
Tom MC Mennes
Added 2013-Feb-28
How to access CGI variables in XPages
This snippet was written by Thomas Gumz in 2008, as part of the following wiki article: http://www-10.lotus.com/ldd/ddwiki.nsf/dx/xpages-cgi-variables.htm
Question:
In the traditional Domino web server, CGI variables are available by creating fields with the names of such CGI variables, for example QUERY_STRING
How can I easily access CGI variables in XPages?
Answer:
In XPages, CGI variables are also available, but you need to write some code to get them via the JSF context.
First you need to call facesContext.getExternalContext() which returns an http://java.sun.com/javaee/javaserverfaces/1.0/docs/api/javax/faces/context/ExternalContext.html" target="_blank">ExternalContext object
Next, you need to get the http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletRequest.html" target="_blank">servlet request by calling getRequest() on the ExternalContext object
Then you can call various .getXYZ() methods of the request object to retrieve the values of CGI variables.
For example, to retrieve the remote IP address of a browser session, use request.getRemoteAddr()
Here is a complete, functional JavasScript example of how to get and print the remote address of the incoming browser request:
print("Remote Address: " + facesContext.getExternalContext().getRequest().getRemoteAddr());
XPages
B Gleeson
Overall rating is 5.00 by 1 person(s)
You have to login first to use 'My Favorites' feature
2 user(s) has marked as favorite:
Bhaskar Arkal
Eric Tomenga
Added 2015-Nov-06
Redirect to another database on the server
JavaScript (Server)
Michael McGarel
Overall rating is 5.00 by 4 person(s)
You have to login first to use 'My Favorites' feature
2 user(s) has marked as favorite:
Eric Tomenga
wico zhang
Added 2012-Aug-14
MakeDir recursive directory creation
The MkDir function of LotusScript is limited in that it can only create a single folder in a folder that already exists. This subroutine will, if necessary, create the entire path.
LotusScript
Andre Guirard
Overall rating is 5.00 by 1 person(s)
You have to login first to use 'My Favorites' feature
So far, no one has added to favorites
Added 2011-Nov-21