Archiv der Kategorie: Java Script

Quick-n-Dirty: @ClientType() in XPages

The @ClientType formula provides an interesting behaviour: If you add the value to a label, the result will be as expected. It returns “Web” in Browser and returns “Notes” in XPiNC. <?xml version=“1.0″ encoding=“UTF-8″?> <xp:view xmlns:xp=“http://www.ibm.com/xsp/core“> <xp:label value=“#{javascript:@ClientType()}“ id=“label1″ /> … Weiterlesen

Veröffentlicht unter @Formula, Allgemein, ServerSide JavaScript, Web, XPages | Verschlagwortet mit , , , , , | Schreib einen Kommentar

XPages: Access a datasource from one custom control in another one

On stackoverflow.com, a very interesting question was asked: How can you access a document datasource from one custom control in another custom control. And here comes my solution in a small SSJS function. First you have to add an id to … Weiterlesen

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

XPages: Access resources and their content (2)

By using the same code as described in the previous article you can access the complied java classes. To get the correct path you have to do the following: 1. Select the java element you want to access 2. Have … Weiterlesen

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

XPages: Access resources and their content

To access XPages resources during runtime and to get their content as a string, you can use the following SSJS code snippet: <?xml version=“1.0″ encoding=“UTF-8″?> <xp:view xmlns:xp=“http://www.ibm.com/xsp/core“>     <xp:label id=“label1″>         <xp:this.value><![CDATA[#{javascript:             var url = „/WEB-INF/faces-config.xml“; … Weiterlesen

Veröffentlicht unter Java, Java Script, ServerSide JavaScript, XPages | Verschlagwortet mit , , , , , | Ein Kommentar

DocumentDataSource with Signer/SignerWithFullAccess-Rights

Yesterday I read the very interessting question from Daniele Grillo at stackoverflow.com: Is a datasource available for XPages who can access the underlying document with different access levels? I have never seen one before, so I decided to do some … Weiterlesen

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

Controlling the HTTP Expires Header

After reading a question on stack overflow about setting an own HTTP expires header and the problem that an additional header is generated automatically,  I made some tests how the domino server can be forced to stop this behaviour programmatically. … Weiterlesen

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

Quick-n-Dirty: HTML5 UIComponents without effort

Obviously it was Chris Toohey who first has discovered the way of manipulation UIComponents with the tagName attribute: http://www.dominoguru.com/pages/xpage_xptext_tagName_options.html   The xp:text – element can easily manipulated to add HTML5 functionality to a XPages. By overriding the property tagName, the component … Weiterlesen

Veröffentlicht unter Allgemein, HTML, Java Script, JSF, Web, XPages, XSP | Verschlagwortet mit , , , , , , , , , , | 2 Kommentare

XSnippets: Cancel a partial refresh via SSJS

With the assistance of Philippe Riand I was able to shorten the original idea of canceling a partial refresh to a single SSJS function.  By setting the HTTP header „X-XspRefreshId“ to „@none“ it is possible to get the same result … Weiterlesen

Veröffentlicht unter Allgemein, Dojo Toolkit, HTML, Java Script, Performance, Server, ServerSide JavaScript, Web, XPages, XSnippet, XSP | Verschlagwortet mit , , , , , , , , , , , , , , | Ein Kommentar

Cancel a partial refresh via SSJS

After reading Tim Tripcony’s blog post , I thought about a way how to cancel a partial refresh via server side javascript. To bring this to life, there are just three things to do: Abort the processing of the request … Weiterlesen

Veröffentlicht unter Allgemein, Dojo Toolkit, Java Script, Performance, Server, ServerSide JavaScript, Web, XPages, XSP | Verschlagwortet mit , , , , , , , , , , , , , | 4 Kommentare

XSnippets: Fire querySave / postSave – Events

The second XSnippet I have added to the XSnippet Contest is a help to fire the querySave– and postSave-events from SSJS: Save Datasource & Fire querySave/postSave events If you only do a simple document1.save() , the events of a datasource … Weiterlesen

Veröffentlicht unter Java Script, ServerSide JavaScript, Web, XPages, XSnippet | Verschlagwortet mit , , , , , | Schreib einen Kommentar