Archiv der Kategorie: XPages

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: 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: Optimized Partial Refreshs

Inspired by the last post of Mark, I have created a small CSJS snippet which allows to optimize the behaviour of a Partial Refresh. Normally, if you execute a Partial Refresh, all elements of a form are sent to the … Weiterlesen

Veröffentlicht unter Dojo Toolkit, Java Script, Performance, Web, XPages, XSP | Verschlagwortet mit , , , , , , , , , | 6 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

XPages: Modify the File Selection Button

With Dojo, you can easily customize the file upload button, f.e. to change the label, add additional style sheets or use HTML5 or Flash plugin for uploading. Here is basic example which adds a label and a blue border around … Weiterlesen

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

Quick-n-Dirty: Ajax Fileuploads

Here is an example how to upload a file with Ajax to a XPage. It is a simple Javascript, and adds the required fields to the xhr request. This example works in FireFox and Chrome and should work on Domino … Weiterlesen

Veröffentlicht unter Dojo Toolkit, Java Script, ServerSide JavaScript, Web, XPages, XSP | Verschlagwortet mit , , , , , , , , , , | 1 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