Schlagwort-Archive: 9.0

XPages: Use async / defer option for external CSJS Script Libraries

When adding CSJS libraries to your XPage, try to use the defer or the async option for a better user experience. When not using this options, the Page might be blocked during page load. Have a look at this example … Weiterlesen

Veröffentlicht unter HTML5, Java Script, Performance, Web, XPages | Verschlagwortet mit , , , , , , , , , | Ein 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: 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: 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 , , , , , | Ein 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 , , , | Ein 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