Archiv der Kategorie: Java

XPages: WebContent Files (3) – Create a Minimizer Servlet

Because of Stefano Fois comment I decided to write an example about how to create a minimizer servlet for Domino which compresses JavaScript resources on the fly. This is, again, a simple Proof-Of-Concept, nothing more and nothing less. First, I downloaded the YUICompressor, … Weiterlesen

Veröffentlicht unter Java, Java Script, Web, XPages | Verschlagwortet mit , , , , , | 6 Kommentare

XPages: WebContent Files (2) – Manipulate exitsting files using the Java NAPI

In this article, I will shortly give an overview how you can edit existing file from the WebContent folder (Don’t miss the first article on this topic). First, let’s create a view to display the design elements of the WebContent … Weiterlesen

Veröffentlicht unter Java, Server, XPages | Verschlagwortet mit , , , , , | 3 Kommentare

XPages: WebContent Files (1) – Create a file using the Java NAPI

The great Marky Roden has written an interesting article about using the WebContent folder instead of standard domino design elements. To create or manipulate these files programmatically, you can use the Java NAPI. The first example demonstrates the creation of … Weiterlesen

Veröffentlicht unter Agenten, Java, XPages | Verschlagwortet mit , , , , , | 9 Kommentare

XPages: Execute Events with HTTP Get

To execute an event on the server, you normally have to send a POST request, because actions will be executed in the Invoke Application phase of the JSF lifecycle. A GET request will only process the Restore View and the … Weiterlesen

Veröffentlicht unter Dojo Toolkit, Java, Java Script, JSF, Performance, XPages, XSP | Verschlagwortet mit , , , , , , , , , , | 2 Kommentare

The Voices Told Me To Do It!

1. „Create a new com.ibm.xsp.context.FacesContextExImpl!“ 2. „Add all required classed to the build path!“ 3. „Add a useless message to the constructor!“ 4. „BUILD IT!“ 5. „Open the original Jar!“ 6. „In WinRAR!“ 7. „Overwrite the existing classes!“ 8. „Quick! … Weiterlesen

Veröffentlicht unter Java, XPages | Verschlagwortet mit , , , , | 7 Kommentare

XPages: Create a Database without Template

On stackoverflow.com, an interessting topic was asked about how to create a notes database programmatically without using a template. The problem is, that it will not contain a Icon document. But in this document are all database properties stored. So … Weiterlesen

Veröffentlicht unter Java, XPages | Verschlagwortet mit , , , , , | 2 Kommentare

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: Set a Theme for a single XPage

… or how you can use your own FacesContext implementation. What we need first is our own FacesContext implementation with new methods to set the StlyeKitId (which is the name of the Theme) for initializing the StyleKit instance: package ch.hasselba.xpages; … Weiterlesen

Veröffentlicht unter Java, JSF, Web, XPages | Verschlagwortet mit , , , | 3 Kommentare

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