Schlagwort-Archive: 8.5.3

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

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

XPages: Bootstrap File Input

When using the default file upload control in a Bootstrap application, the default file upload button does not fit anymore to the design: To fix this issue, you can use a small jQuery plugin named Twitter Bootstrap File Input. When … Weiterlesen

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

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: 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 , , , , , , , , , | 1 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

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 , , , , , | 1 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