Archiv der Kategorie: Java

XPages: Use a Method Binding as Converter

I accidentally found a way to add a method binding as a converter to a component, because I have added a managed bean as a converter directly in the source code. The DDE does not support this. If you go … Weiterlesen

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

XPages: Optimized Partial Refreshs (2)

With the Optimized Partial Refresh you can do a lot of nice things: If only a part of the form is sent to the server, only this part of the components in the JSF component tree will be processed. This … Weiterlesen

Veröffentlicht unter Dojo Toolkit, Java, JSF, Performance, XPages, XSP | Verschlagwortet mit , , , , , , , , , | Schreib einen Kommentar

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: Use a PhaseListener for global URL commands

One of my customers wanted an easy way for printing XPages in different formats and with different content, depending of the current XPage opened in the browser. It was a requirement to develope a global solution for every XPage-based application … Weiterlesen

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

XPages: Create your own Required Validators

If you try to implement your own JSF Validator (by implementing javax.faces.validator.Validator), you will notice that you are unable to check for an empty value. The reason for this is rather simple: The method validate() is only called, if there … Weiterlesen

Veröffentlicht unter Java, JSF, ServerSide JavaScript, XPages | Verschlagwortet mit , , , , , , | 4 Kommentare

A performance bottleneck?

Paul Withers wrote an very interesting article about the difference between a passthrough UIComponents and the corresponding XPages elements. This means the use of <br> instead a <xp:br>, or a <div> instead of a <xp:div>. A while ago I have … Weiterlesen

Veröffentlicht unter Allgemein, Java, JSF, Performance, ServerSide JavaScript, XPages | Verschlagwortet mit , , , , , | Schreib einen Kommentar