Schlagwort-Archive: Java

Problems with Handles: When the same document is not the same

Disclaimer: This will work in Java, SSJS and Lotus Script. When opening the same document from the same database in different instances, and then recycle one of them, the other documents will be recycled too, because the handle to the … Weiterlesen

Veröffentlicht unter Java, Java Script, Lotus Script | Verschlagwortet mit , , , | Schreib einen Kommentar

Quick-n-Dirty: Use „isDocEditable“ in an old school Java Agent

If you want to check if a document is editable, you can do this in an old school Java agent with the NAPI function isDocEditable provided by the XSPNative class. First you have to add the required JARs to your … Weiterlesen

Veröffentlicht unter Agenten, Java | Verschlagwortet mit , , , , | Schreib einen Kommentar

XPages: Add an attribute to the BODY-Element

Today I wanted to add an attribute to the <BODY> element of my XPage. My goal was to generate HTML code like this: <body role=“document“> After some testing I found a solution by overwriting the method encodeHtmlBodyStart. To do this, … Weiterlesen

Veröffentlicht unter Java, JSF, XPages | Verschlagwortet mit , , , , , | Schreib einen Kommentar

XPages: SSJS & How you can have fun at the office

This article is a demonstration of what harmful things you can do when using the SSJS & prototyping wrong (described here by the great Mark Roden). Don’t do that! Especially not on a productive server!   Wanna have a lot … Weiterlesen

Veröffentlicht unter ServerSide JavaScript | Verschlagwortet mit , , , , , | 5 Kommentare

XPages: Events, ActionListeners & Parameters

To access the event parameters of an event within your actionListener, you have to access the source object of your actionEvent object: package ch.hasselba.xpages; import java.util.List; import javax.faces.event.AbortProcessingException; import javax.faces.event.ActionEvent; import com.ibm.xsp.complex.Parameter; import com.ibm.xsp.component.xp.XspEventHandler; public class MyActionListener implements javax.faces.event.ActionListener { … Weiterlesen

Veröffentlicht unter Java, JSF, XPages | Verschlagwortet mit , , , , , | 1 Kommentar

Quick-n-Dirty: Disable Validation for FileDownload control (2)

Because my old snippet does not work anymore for ND9 (the IBM changed the internal methods / objects) I had to create a new way to disable the validation of the FileDownload control. Now I have switched to a PhaseListener … Weiterlesen

Veröffentlicht unter Java, JSF, XPages | Verschlagwortet mit , , , , | Schreib einen Kommentar

Quick-n-Dirty: Use „Old-School“ Javacode in your XPages-Application

Because I often have read that it is not possible to access „Old School“ Java elements in XPages, but never understood the reason why, I have written my own class loader for fun to demonstrate how to do this: 1. … Weiterlesen

Veröffentlicht unter Java, XPages | Verschlagwortet mit , , , | 1 Kommentar

Quick-n-Dirty: How to use the NAPI in a Java Agent

The undocumented NAPI for direct API calls in Java can easily used in normal agents. You just need to add two jar files to your java agent: lwpd.commons.jar lwpd.domino.napi.jar These files can be found in <Notes>\osgi\shared\eclipse\plugins. After importing, you do … Weiterlesen

Veröffentlicht unter Agenten, Java | Verschlagwortet mit , | 1 Kommentar

Java: Reflection Madness

A very interesting presentation about reflection in Java: Reflection Madness from Dr. Heinz M. Kabutz. You can find the slides here.

Veröffentlicht unter Java | Verschlagwortet mit , | Schreib einen Kommentar

XPages: File downloads and blocked UI

Yesterday Christian asked a very interesting question: He had observed that the browser UI is blocked when clicking a button which generates a PDF on the server and sends the result. For about 30 seconds no button is working, no … Weiterlesen

Veröffentlicht unter Dojo Toolkit, HTML, Java Script, Web, XPages, XSP | Verschlagwortet mit , , , , , , , , , | Schreib einen Kommentar