358 Lotus blogs updated hourly. Who will post next? Home | Downloads | Events | Pods | Blogs | Search | myPL | About 
Latest 7 Posts
Dynamically pointing DomSQL to current database
Tue, Jan 28th 2014 62
HTML5, script tags and partial refresh inside target area
Mon, Jan 27th 2014 65
Configuring input field for DateTime picker with localized date/time format
Tue, Oct 8th 2013 88
Simple workaround for partial refresh issues with radio buttons
Mon, Sep 23rd 2013 65
Strange implementation of Document.setPreferJavaDates( true )
Thu, Sep 19th 2013 67
Workaround for issues with XPage in iframe on external website
Wed, Jul 3rd 2013 59
Benchmark: Fetching NoteIDs and documents from view
Thu, Jun 27th 2013 30
Top 10
Fix for partial refresh on Dojo Tab Container/Content Pane
Wed, Mar 20th 2013 92
Configuring input field for DateTime picker with localized date/time format
Tue, Oct 8th 2013 88
Multi value fields and Beans in XPages
Mon, Jun 25th 2012 83
Snippet to clear session for user
Thu, Sep 6th 2012 81
XPages: RichTextEditor + custom partial refresh + validation error = lost content
Thu, Feb 10th 2011 74
Simple trick to format XPages Checkbox group
Thu, Apr 14th 2011 73
XPages: SSJS code snippet that lets you parse/stringify JS-JSON
Wed, Sep 29th 2010 69
Strange implementation of Document.setPreferJavaDates( true )
Thu, Sep 19th 2013 67
Simple workaround for partial refresh issues with radio buttons
Mon, Sep 23rd 2013 65
HTML5, script tags and partial refresh inside target area
Mon, Jan 27th 2014 65

Tommy Valand
Blog Title DontPanic - a blog about Lotus Notes / Domino
Blog Description My useful and useless experiments with Lotus Notes / Domino
Blog URL http://dontpanic82.blogspot.com
RSS Feed http://feeds.feedburner.com/dontpanic82
PlanetLotus Feed http://planetlotus.org/profiles/rss/tommy-valand
Validate Feed feedvalidator.org or validator.w3.org
Feed Last Checked Dec 17, 2014 3:45:50 PM EST. Realtime Update:
Landed Here Dec 05, 2007
Posts: # / 1st / Latest - -
Total Hits 3,118. myPL RSS Selections: 91

Recent Blog Posts

Dynamically pointing DomSQL to current database
Tue, Jan 28th 2014 3:02a   Tommy Valand
I couldn't find a way to specify current database in the .jdbc file, so I dug around in the API. When creating the connection to a DomSQL database, you can do it with getConnection and the name of a .jdbc config file: public static Connection getConnection() throws SQLException { return JdbcUtil.getConnection( FacesContext.getCurrentInstance(), "nameOf.jdbc" ); } Or use createConnection and specify the path for the connection: public static Connection getConnection() throws SQLException { [read] Keywords: domino ibm database openntf

HTML5, script tags and partial refresh inside target area
Mon, Jan 27th 2014 3:22a   Tommy Valand
I had some issues with a script tag not loading inside a panel. The panel was set to only be visible when a view scope variable was set. It turns out that this is by design for HTML5. When script tags are inserted into a document using Ajax/innerHTML, the spec states that the script tag should not execute. HTML5 spec "...script elements inserted using innerHTML do not execute when they are inserted..." My workaround for this was to set full refresh for the event that refreshed the panel. [read] Keywords: ajax

Configuring input field for DateTime picker with localized date/time format
Tue, Oct 8th 2013 4:02a   Tommy Valand
In a new application a colleague of mine is working on, he wanted to let the user set date and time with Norwegian date and time format. One would think it should be pretty straightforward, but it took me around three hours to figure out how to do it. I accidentally discovered the way to do it while making a custom control with one field for date and one field for time. The custom control was meant to combine the two values into a date/time value. Luckily there's a simpler solution. Sourc [read] Keywords: domino application

Simple workaround for partial refresh issues with radio buttons
Mon, Sep 23rd 2013 4:02a   Tommy Valand
I had some issues getting partial refresh triggered by radio buttons to work as I wanted to across browsers. I found a simple workaround. Instead of specifying the partial refresh in the event handler, I set no submission for the server side part, and execute a slightly delayed XSP.partialRefreshPost from the client side event action: This seems to work nicely across the browsers I tested in, regardless of triggering the value change through the radio button or the label. [read] Keywords: server

Strange implementation of Document.setPreferJavaDates( true )
Thu, Sep 19th 2013 6:22a   Tommy Valand
I wanted to try the Document.setPreferJavaDates today and see how it worked. I called Document.setPreferJavaDates( true ); to ensure that no NotesDateTime objects were created as I didn't need them/didn't want to deal with recycling. First I tried: Document.getItemValueDateTimeArray( "fieldname" ); This returned a Vector of NotesDateTime. Then I tried: Document.getItemValue( "fieldname" ); This also returned a Vector of NotesDateTime. The way that finally returned a Vector [read] Keywords: domino java server

Workaround for issues with XPage in iframe on external website
Wed, Jul 3rd 2013 7:02a   Tommy Valand
A colleague of mine had some issues with an XPage running in an iframe on a customer's website. The customer notified us that some users with Chrome/Safari had issues with the page going blank. When doing partial refresh, the page went into a reload loop. I did a quick check, and couldn't find anything wrong with the code. I believe it has something to do with cross domain cookies and Webkit. My workaround was to have a script block that adds the SessionID parameter that was previously a [read] Keywords: xpages javascript


Benchmark: Fetching NoteIDs and documents from view
Thu, Jun 27th 2013 5:03p   Tommy Valand
In relation to an experiment I'm working on, I wrote a Java test agent to find the fastest way to get note id's from a view/fetching document values from documents in a view. Here are the results from the benchmark: All numbers are milliseconds. The code was run on a desktop computer (Core 2 Duo/Windows XP). The benchmark code is written so that I think caching on the server is avoided between tests. What's interesting from the results is that it seems like it's marginally faste [read] Keywords: agent application desktop java server

Custom Control for custom layout of checkboxes
Tue, May 21st 2013 4:09a   Tommy Valand
In a recent project, I wanted to create an interface to toggle different settings for different user types in an app. To save real estate on the page and (hopefully) make it more intuitive, I wanted to have a column per user type, and organize the checkboxes vertically. I couldn't find any way to do this out of the box. To make it work, I made a regular checkbox group per field. Then in a repeat control, I have regular HTML checkboxes with name fetched from the real checkbox group. The checkb [read] Keywords: firefox interface javascript properties

Fix for partial refresh on Dojo Tab Container/Content Pane
Wed, Mar 20th 2013 4:05a   Tommy Valand
I wrote this a while back, but I couldn't find that I'd shared it. You need to use the partial refresh hijacker to use the code snippet. This code snippet initializes Dojo Tab Containers/Dojo Content Panes in the area that's refreshed: // Fix problem with partial refresh on Dojo Tab Container/Content pane // Source for inspiration: // http://www.openntf.org/projects/pmt.nsf/0/D228115FAA98DDEC86257A7D0050E7FF dojo.subscribe( 'partialrefresh-complete', this, function( method, form, [read] Keywords: xpages dojo openntf widget

Small LS class that can be used to check if fields have changed
Fri, Jan 18th 2013 3:02a   Tommy Valand
We've had some issues with semaphore locks on one of our import databases. The import database has routines that import/update data, then replicate it to a cluster when it's done. We're not exactly sure what triggers the locks, but the server crashed sometimes several times a day, so we decided to see if the import routines could be optimized to do as few writes as possible. Several of the routines saved documents even if there were no field changes. I wrote a simple class to test for [read] Keywords: database server

Code Snippet - Close dialog if all fields are valid
Fri, Oct 12th 2012 12:42a   Tommy Valand
Today I was working on a dialog that had fields with validation. I only want to close the dialog if all fields are valid. I'm not aware of any inbuilt XSP methods that does this. This code snippet checks for any invalid fields in the dialog. If all fields are valid, the dialog is closed: function closeDialogIfValid( dialogId ){ var invalidCount = dojo.query( '[id="' + dialogId + '"] [aria-invalid="true"]' ).length; if( invalidCount === 0 ){ XSP.closeDialog( dialogId ); } } This pr [read] Keywords: blogger dojo server

Snippet to clear session for user
Thu, Sep 6th 2012 4:42a   Tommy Valand
During testing, I sometimes log in as different user to test hide/whens/etc. I used to delete the SessionID cookie in the browser to clear session scoped beans/sessionScope variables. Today, I looked for a solution to automate this. This line will clear all objects related to a session:facesContext.getExternalContext().getSession( false ).invalidate(); If you want to clear session when logged in user changes for the current "XPages" session, here's the snippet I use (put the code in afterPa [read] Keywords: xpages blogger server

Comprehensive guide to Design Definitions
Mon, Aug 20th 2012 6:26a   Tommy Valand
I found this guide in IBM's Application Development wiki while looking for information on Design Definitions: Native and Custom Control Custom Visualization Best Practices So far it's the most comprehensive guide to Design Definitions I've found. [read] Keywords: ibm ldd lotus application blogger development wiki

XPages - Grouping data in comboboxes
Fri, Jul 27th 2012 6:29a   Tommy Valand
I wanted to have some values grouped in a ComboBox. Not sure if it's possible to do with pure SSJS (without using the Java API), but found a way using beans: JSF Tree in a dropdown (see accepted answer). The resulting html is select node with options grouped in optgroup nodes. [read] Keywords: xpages blogger java

Multi value fields and Beans in XPages
Mon, Jun 25th 2012 4:10a   Tommy Valand
I had an issue with multi value fields bound to bean fields in an XPages I worked on. I got this error message on refresh: java.lang.IllegalArgumentException: argument type mismatch The issue turned out to be a somewhat inconsistent underlying API. When the field is empty, or has single value, it tries to set a string. When there are multiple values, it tries to set a list. To work around the issue, have the getter return an Object, and the setter accept an object. E.g. public Obje [read] Keywords: xpages blogger java

Update for Enhanced Messages Control - Show "system" messages
Fri, Jun 22nd 2012 9:50a   Tommy Valand
In response to this question on the XPages Forums, I've updated the source code for my Enhanced Messages Control, so that it also shows messages not bound to controls. The "system" messages are show above the messages from components. [read] Keywords: ldd lotus xpages blogger

Recommended tutorials for doing asynchronous processing in beans
Fri, Jun 15th 2012 6:29a   Tommy Valand
Asynchronous processing in Java applications – leveraging those multi-cores Using asynchronous mechanisms in Java and JavaScript for improving the user experience [read] Keywords: applications blogger java javascript

Update for Enhanced Messages - Now in page order
Fri, Jun 8th 2012 3:49p   Tommy Valand
I added a small snippet of code that sorts the messages in the order that the components are in the page. I only had a simple page to test on, but in theory it should work for large pages with complex structure. Original post with source code for custom control [read] Keywords: blogger

Improving performance in Domino Designer when developing XPages
Thu, May 31st 2012 6:30a   Tommy Valand
If the XPage has a view data source/the view name is a static value, it looks like Domino Designer is constantly polling the view for column info/etc. If you are done dragging and dropping columns from the view to the view panel/etc. Go into source mode and compute the viewName. Before After When the view name is computed, Domino Designer can't determine what view it should check -> No more lag. I haven't tested this with Document Data source, but you might get a performance boost if [read] Keywords: domino xpages blogger javascript

Using Java reflection and Domino form to auto populate beans
Tue, May 29th 2012 1:09p   Tommy Valand
>> Download DemoApp Due to a lot of positive posts about using beans/MVC pattern for developing XPages apps, I've started writing more Java and less SSJS. I really like the performance improvements/stricter structure of code. In one of my recent apps, I wrote a Model class for each of the forms in the app. The class has fields for all the form fields. Whilst writing the app, I thought about using Java reflection/Domino Form to auto populate the class instance. Java reflection lets you f [read] Keywords: domino notes xpages blogger email java server wiki

XPages Toolbox - Really nice profiling tool
Thu, Apr 19th 2012 12:43a   Tommy Valand
If you feel that your XPage application is too slow, XPages Toolbox can help you to find the biggest bottlenecks in your code. If you haven't tried it, I highly recommend that you give it a spin (it's free). If you like it, give it a good rating. +1 to Philippe Riand for sharing it with the community :) [read] Keywords: xpages application blogger community openntf

Showing horizontal notes data as vertical in view
Thu, Mar 15th 2012 3:04p   Tommy Valand
Today at work, I needed to transfer some data from a Notes application to SQL. The documents in question were horizontal. An example of what I mean: An order form in Notes with five order lines. For each line, there may be five fields that contains information about the order. Making it a total of 25 fields for five order lines. Traditionally, if you want to show this data in a regular notes view, you have to have a column per field. Thanks to the way the index is organized in a Notes view [read] Keywords: lotus notes application blogger sql

Patch for bug in XSP.partialRefreshGet/-Post in 8.5.3
Thu, Mar 8th 2012 5:43a   Tommy Valand
Someone made a really stupid mistake in the code for XSP.partialRefreshGet/-Post in 8.5.3.. I won't go into specifics of the code as I'm uncertain if it's breaking some license. Let's just say that if they moved a line of code four or five lines upwards, there wouldn't be any bug. I wrote a simple patch for the bug. Put it in a CSJS library, and your code will work like it did on 8.5.2 (unless I made a stupid mistake). /** * Fix for bug with partialRefreshGet/-Post in 8.5.3 */ (functio [read] Keywords: blogger bug

Runtime optimized JavaScript and CSS - workaround for multiple stylesheets
Thu, Jan 26th 2012 4:02a   Tommy Valand
If you have multiple local stylesheets on a page, the CSS files are combined into a single file. This changes the url to the stylesheet (adds xsp/.ibmmodres/.css after the path to the db). If you have an image reference like url(image.png), the image can no longer be loaded, as the url is relative to the path of the stylesheet. To work around this issue, add ../../../ to the image reference. E.g. url(../../../image.png) [read] Keywords: blogger css javascript

Useful tool when working with text files (CSV, source code, etc)
Thu, Jan 5th 2012 5:03a   Tommy Valand
WinGrep is a tool that let's you search one/several folders for parts of strings. It supports searching in zip files, and let's you use Regular Expression (Perl syntax?) for searching strings. The result pane shows all the matching lines in the file(s) you are searching. [read] Keywords: blogger

Thing to be aware of when using "Generate unique keys.." in view
Mon, Jan 2nd 2012 5:03a   Tommy Valand
I had trouble with a couple of views today. The views had the option Generate unique keys in index checked. When the views were replicated to other servers, they weren't built. When trying to open them I got the error message Entry not found in index I found the solution on the Domino forums, add !@IsAvailable($Conflict) to the view selection. [read] Keywords: domino ldd lotus blogger

ClassNotFoundException with the new Java design element
Tue, Dec 13th 2011 3:02a   Tommy Valand
Last week Vince Shuurman blogged about having to recompile when opening an XPage app in Domino Designer. I had the same issue. I was using some Java code in an XPage, and every time I opened the app in designer, I got ClassNotFoundException when opening the XPage. A build of the project fixed the issue. My java code was in the new Java design element (new in Domino 8.5.3), so I suspected that it might have something to do with this. I moved the code to a "custom" java source folder, and the [read] Keywords: domino blogger java

Java Debugging in Designer without hacks
Fri, Oct 21st 2011 4:02a   Tommy Valand
I found this today: How can I enable Java debugging?. Not sure if this is new in 8.5.3, but I never heard of it. It makes it a lot easier to debug than the using the two headed beast method which seemed like too much trouble. The full instructions are in the Designer help. Search for java debugging. [read] Keywords: domino javadomino ldd lotus blogger eclipse java

Collecting data for HTTP hang or performance issues on a Lotus Domino server
Wed, Sep 28th 2011 4:23a   Tommy Valand
We're currently having problems with one of our old Domino servers. The HTTP task randomly hangs. In the process of looking for help to track down the reason, I found this document from IBM. Collecting data for HTTP hang or performance issues on a Lotus Domino server [read] Keywords: domino ibm lotus blogger server

Indicator for all partial refreshes
Tue, Sep 27th 2011 11:03a   Tommy Valand
Sometimes partial updates take a while. To make users aware of updates happening, I made a small JS object that automatically shows a dojox.widget.Standby over the area being updated. Initially I thought that it would be too much, showing the mask over every refreshed area. So far, I quite like the effect. The app isn't in production yet, so I don't know how users will react, but hopefully they will appreciate being made aware of that things are happening. To load the object, put this in a J [read] Keywords: xpages blogger dojo javascript widget

Using themeId for maintainability
Mon, Sep 26th 2011 12:03p   Tommy Valand
In an application I'm currently working on, there are several categorized views with number-/totals columns. As the number of views/columns increased, I looked for a way to make styling of the columns more maintainable. The solution I found was using themeId on the columns and calling a SSJS function in the theme, that generates the style classes. I chose numberColumn as the name for the themeId. In theme numberColumn styleClass #{javascript:return StyleHelper.getNumberColumnStyleClass( [read] Keywords: application blogger javascript

XPages: Passing event handler code to custom control
Fri, Aug 26th 2011 5:22a   Tommy Valand
In an application I'm currently working on, I have a combobox that's used in several pages. The values the combobox contains persist over every page, but what happens when the user changes value varies from page to page. I saw that the combobox has several properties for events under all properties. I tried adding #{compositeData.onchange} to the onchange event, and it works. One caveat is that it seems to fire three times, but I can live with that. To implement: Add custom properties [read] Keywords: domino xpages application blogger properties server

Update on the "enhanced" validation messages
Fri, Jul 22nd 2011 2:01a   Tommy Valand
I added functionality to select/focus a dijit tab if the field is inside a dijit.layout.TabContainer. I also added a highlight effect when a field is focused. Source code for the custom control can be found in the original post. [read] Keywords: xpages blogger

Custom Control for "enhanced" validation messages
Tue, Jul 19th 2011 1:05p   Tommy Valand
Disclaimer: This custom control is not entirely my idea. I've been thinking about doing something like this for a while. After I tried to help with this question by Steve Pridemore in the XPages Development Forum, I found the solution. The code below can be used as a custom control that is a little bit more advanced (probably has its flaws) than the regular Display Errors control. If the field with a validation error has a label, it shows the label, then the error message. On the label, a link [read] Keywords: ibm ldd lotus xpages blogger community development dojo javascript xml

XPages: Styling required and invalid fields
Wed, Jul 13th 2011 4:06a   Tommy Valand
Just discovered that in Domino 8.5.2 (not sure about previous releases), invalid fields get the attribute aria-invalid=true, and required fields aria-required=true. That makes it easy to style in modern browsers (>IE6). Simply add a couple of style rules (just an example):[aria-invalid=true] { background-color: #fee; border-color: red; } [aria-required=true] { background-color: #ffe; } Valid - required fields "highlighted" Invalid +1 to IBM for implementing :) Share and enjoy! [read] Keywords: domino ibm xpages blogger

Small tip regarding optimizing FTSearches
Tue, Jul 12th 2011 10:40a   Tommy Valand
Lately I've been working on SQL (MS). At work today, I had a talk about optimizing queries with a colleague more seasoned in the art of writing queries. We got into a talk about if the order of the filter statements (WHEN ..=..) and performance. Apparently, MS have optimized their engine so that the order of the filtering statements don't have much influence on the performance of the query. This got me thinking about FTSearch. A year or so ago, I thought about doing some testing on how you co [read] Keywords: blogger sql

Tip for those working with Database events in 8.5.x designer
Tue, Jun 21st 2011 7:32a   Tommy Valand
If you're working with Open/Close events, it's quite cumbersome when you want to test your code. You have to close the app in both Domino Designer and Notes. I used to close the designer every time I wanted to test modified code. During a chat, Tim Tripcony mentioned that you could close the apps in Designer from the Package Explorer. In Package Explorer, each app is shown as a project. To release the app from Designer, simply right click the project, and select close project. No need to remo [read] Keywords: domino notes blogger database

Creating your own keyboard shortcuts in Domino Designer
Tue, Jun 21st 2011 7:32a   Tommy Valand
File -> Preferences --> General -> Keys I currently have two custom keyboard shortcuts, Alt + b to build a single project, and Alt + c to close a project in Package Explorer. [read] Keywords: domino blogger

One editable area can be used multiple times in a Custom Control
Fri, Jun 17th 2011 12:03a   Tommy Valand
Not sure how many now this, but an editable area (xp:callback) can be used multiple times inside a custom control. If you have an editable area with fields, you can put the field several places in the custom control (same facetName). I'm currently working on a custom control that lets the user edit/add documents. Inside a repeat control, I show the existing documents. Below that, the user can add documents. E.g. .. .. .. .. .. [read] Keywords: blogger

Simple API tester - SSJS bugs remain
Mon, Jun 13th 2011 10:11a   Tommy Valand
A couple of years ago I blogged about bugs in Array.splice, String.match with global modifier, and String.replace with function as parameter. I did a little test on the current beta of 8.5.3. Guess what. Two years later, the bugs still haven't been fixed. I made a small API tester utility that you can set up tests for the API/expected result. In the demoapp, there are tests for the bugs that I'm aware of. It's quite simple to set up. Do the test in Firebug or a similar JS console. Copy/past [read] Keywords: domino ibm lotus notes traveler xpages blogger

Another release of the API Inspector
Fri, Jun 10th 2011 1:02p   Tommy Valand
Changes * Links to the XPages API for XPages classes * Possibility to select XPage to inspect. You no longer need to include the control in the XPage you want to inspect You can download the latest release from OpenNTF Screenshots [read] Keywords: xpages blogger openntf

New release of the XPages API Inspector
Thu, Jun 9th 2011 11:04a   Tommy Valand
You can download it from OpenNTF. Changes: * Tweaked the user interface * Now requires 8.5.2 or higher (Process data without validation) * Removed dijit.form.Textarea from the expression area, and made a simple resize function instead (due to refresh issues) * Previous expressions are stored/can be selected from a combo box * SSJS Code and CSS moved into a library/stylesheet for easier maintenance Screenshots [read] Keywords: xpages blogger css interface openntf

Enabling template inheritance per design element on new design elements
Wed, Jun 8th 2011 3:41a   Tommy Valand
The new design elements (everything that you have to edit through Package Explorer) don't have an interface to set template inheritance on them. You can enable this functionality with a little hack. Create a view that shows all design elements. Set the first column formula to $Title. This makes it easier to find the design element you're looking for. Set the $Class field on the design element document to the template you want it to inherit from. You can do this using a formula agent, or a p [read] Keywords: agent ldd lotus application applications blogger interface java

Trying to find ntrigger.dll for 64 bit server - Trigger Happy/Audit Manager
Tue, Jun 7th 2011 4:03a   Tommy Valand
I'm trying to implement Audit Manager on a 64bit domino server. I've hammered my friend Google with every keyword I can think of, but it doesn't look like anyone has successfully made a 64bit version of the ntrigger.dll/published it. I managed to compile a 64bit version, but it crashes the server after it's initialized. If anyone has managed to make a working 64bit version of the dll, I would be very happy if you could send it to me (tvaland at gmail)/contribute it to OpenNTF. Thanks in [read] Keywords: domino blogger google openntf server

Simple helper function to get path to an application
Mon, Jun 6th 2011 4:02a   Tommy Valand
I use this when generating URLs in SSJS. The reason that protocol/hostname is added is so that the generated urls work with xp:link. If an xp:link url starts with /, it generates the path to the current application at the start of the url. If you want to link to another app/page on the current server you either have to make an html link (), hard code the path, or use something like this function. // Returns absolute path (including protocol/hostname) to the current application // or specified [read] Keywords: application blogger database server

Useful sidebar widgets/plugins
Mon, May 30th 2011 12:22a   Tommy Valand
I was looking for the DocViewer plugin and found a couple more plugins posted by Alan Lepofsky a couple of years ago. https://www.socialtext.net/lotus/lotus_notes_sidebar_apps_and_plugins [read] Keywords: lotus blogger widgets

Force embedded views opening from the same server as the app containing them
Mon, May 16th 2011 4:02a   Tommy Valand
I've been doing some Notes development lately. I've noticed that the embedded views are being loaded from the server where the app that have the embedded views was opened last. I wrote a little procedure that you can run on PostOpen in database script. Input parameter: the name(s) of the forms with external embedded views. The code inspects the DXL of the form and fetches all the replicaids of the external embedded views. It then tries to open these databases and add them to the workspace w [read] Keywords: dxl notes blogger database development server workspace

Simple trick to format XPages Checkbox group
Thu, Apr 14th 2011 4:05a   Tommy Valand
If you put display:inline on a table (which XPages generates for a CheckboxGroup), you can style each cell like an inline element. To make a four column checkbox group (put fourColumnCheckboxGroup as styleClass on the xp:checkBoxGroup), put this in your CSS file:.fourColumnCheckboxGroup { display: inline; } .fourColumnCheckboxGroup td { float: left; width: 24%; } For three columns, use 32% and so on. I use (100 / numberOfColumns) - 1 as that seems to work best cross browser. Share and enjoy :) [read] Keywords: xpages blogger css

Add a custom footer to a ViewPanel column
Tue, Apr 5th 2011 12:25a   Tommy Valand
Open the XPage in source mode. Set the pointer inside . Create a panel, div, output text or whatever with the attribute xp:key="footer", and the content will be showed at the bottom of the column. E.g. [read] Keywords: blogger

Small bugfix in the CKEditor integration for XPages demoapp
Mon, Mar 28th 2011 1:02p   Tommy Valand
When you tried to upload more than one file at once (e.g. one attachment and an image), only the first file uploaded successfully. This bug has now been fixed. The Domino part of the demo requires Dojo 1.4.1 (Domino 8.5.2 server), as it's hard coded in the HTML header. Modify it to suit your environment. >> Download demoapp [read] Keywords: domino xpages blogger bug dojo integration server

Repeat Controls and Multivalue fields
Thu, Mar 3rd 2011 12:13p   Tommy Valand
There was a small discussion over at Julian's blog regarding multivalue fields and repeat controls. I knew that it was possible to bind Javascript objects and arrays to input fields inside a repeat control using EL syntax. I got a little curious, and decided to test if the same was possible for a multivalue field. It turns out it's just as easy. Instead of my regular demoapps, I'll post source code for the test XPage I made. It's bound to a form with one field, named field (don't name any [read] Keywords: applications blogger javascript

RepeatControls troubles - solution repeatControls
Wed, Mar 2nd 2011 3:02a   Tommy Valand
I've struggled more or less a working day trying to figure out why all of the properties I passed to a Custom Control inside a Repeat Control got nullified. In afterPageLoad, in the Custom Control, I tried binding the compositeData values to a private variable for later use. I tried a lot of ways of making the properties survive, but whatever I tried, they ended up as null values before I could get a hold of them. Components inside the control could "read" the composite data, but when the l [read] Keywords: ibm xpages blogger properties

Small update on the EventDelegator demo - onChange implemented
Mon, Feb 14th 2011 12:42p   Tommy Valand
I don't know if anyone is using my EventDelegation technique for custom events. In case any of you do, I've updated the demo/script in the demoapp. You can now also delegate onChange events. [read] Keywords: blogger server

XPages: dojo performance tip
Thu, Feb 10th 2011 3:03a   Tommy Valand
This tip is most valid if there's a big difference between edit mode and read mode. You can compute if dojo modules are rendered the same way you compute any other component. E.g. in this.resources (source mode):In one of my XPages the read mode has 17 requests, and the edit mode has 56 requests. I don't notice much difference, as I'm on a decent line with low latency, but for users with low bandwith/high latency the difference can probably be highly noticable. [read] Keywords: xpages blogger dojo javascript

XPages: RichTextEditor + custom partial refresh + validation error = lost content
Thu, Feb 10th 2011 3:03a   Tommy Valand
I ran into a problem today with content disappearing from a rich text editor when there was a validation error/saving. I did a little investigation, and it turns out that the RichTextEditor has a submitListener that updates a hidden field. This hidden field is used by the server to set the field/scope value on the server (at least it looks that way). When my custom partial refresh ran, the hidden field didn't have a value. When combined with a validation error, this resulted in an empy RichTex [read] Keywords: rich text xpages blogger server

Domino Designer setting that cleans up whitespace in XML source
Thu, Feb 3rd 2011 3:42a   Tommy Valand
(Clear all blank lines) Press Ctrl+Shift+F to autoformat code. With the above setting in place, you also should get rid of blank lines. Share and enjoy! [read] Keywords: domino blogger xml

LS: Currency data type seems to return proper results in arithmetics
Mon, Jan 31st 2011 3:06a   Tommy Valand
I had a problem the other day with JS' inaccurate arithmetics. One can also stumble onto the same problem with LS: Dim first As Double, sec As Double, third As Double first = 0.1 sec = 0.2 third = 0.3 Print ( first + sec ) = third '// -> False I got a little bit curious, and lurked around in the documentation for other number data types in LS. Lo and behold, there's Currency. It seems to have some inbuilt functionality that corrects the inaccuracy in data types like Double. Dim first As C [read] Keywords: blogger

CKEditor: Using external plugins from an NSF
Fri, Jan 28th 2011 6:43a   Tommy Valand
This is a follow-up to my previous blogpost regarding importing files to an NSF. If you want to use CKEditor plugins from an NSF, you have to create an override-function for CKEditor.getUrl. The reason for this is that CKEditor automatically adds a timestamp-parameter to the url, which Domino doesn't like. CKEDITOR_GETURL = function( resource ){ // From NSF - don't alter the url if( resource.indexOf( '.nsf' ) > -1 ){ return resource; } else { // Let CKEditor handle the url return n [read] Keywords: domino blogger

Using the Package Explorer to import file resources to an NSF
Fri, Jan 28th 2011 6:22a   Tommy Valand
Using the package explorer, you can add import files/folder from your file system. To import folders from the file system: In (windows) explorer, select the file(s)/folder(s) you want into the NSF, and copy them (CTRL+C or right click/copy). Then in Package Explorer, select the WebContent folder, and paste (CTRL+V or right click/paste). It's as simple as that :) If you're wondering what I needed this for, it's to create/maintain CKEditor plugins locally in an NSF. You can import "external [read] Keywords: domino blogger

XPages: Small update to the search interface demoapp
Tue, Jan 18th 2011 11:22a   Tommy Valand
I've added automatic update of the FTIndex on search. There are rumours(?) on the web that FTSearch is evil, and that changes takes a long time to get into the index, even when running NotesDatabase.updateFTIndex. I have never had those problems. It might be that it was something that was fixed in a previous version of the Domino server. I don't know. To test how it works, change a document using the Notes client, then search for the changed value. Original post about the search interface d [read] Keywords: domino notes notes client xpages blogger interface server

XPages: Three ways to build a search interface revisited
Tue, Jan 11th 2011 12:46p   Tommy Valand
I decided to update the search interface demo a little bit. Changes: * Cleaned up/improved some of the code * Made the ViewEntry search sortable in both directions * Improved the ViewEntry search code, so that it should be a little quicker * Added a load time indicator (measures the time it takes to search/sort) * When you click to sort a column, the pager automatically goes to the first page * Changed resorting to execute partially (partial refresh) * Added error handling (shows up as a "vali [read] Keywords: xpages blogger interface

My first request to the XPages Extension library - userScope
Thu, Dec 9th 2010 2:53p   Tommy Valand
I was planning on making a caching mechanism on a user by user basis in SSJS (think userScope)/post it on my blog, but while I sketched the API, I ran into some issues.br /br /In SSJS you have no way to bind a href="http://en.wikipedia.org/wiki/Callback_(computer_science)"callbacks/a (think event handlers) to the XPages life cycle. This can make the API quite IO heavy on servers with many users.br /br /I've implemented something similar in Domino applications, and have gotten a big boost in p [read] Keywords: domino ibm xpages application applications blogger openntf wiki

Spending the holidays in Singapore
Wed, Dec 8th 2010 12:23p   Tommy Valand
I decided I wanted to do something different this christmas/new years. Ever since I went to Korea in 2007, I've wanted to travel to Asia again. Most of my (single) friends travel to some place in Europe when they go on vacation, so I seldom have the opportunity to travel to Asia, unless I travel alone.br /br /A couple of friends recently moved to Singapore. I contacted them and asked if they wanted company in the holidays. Luckily they did, so this holiday season I'll be halfway around the wor [read] Keywords: blogger

Favorite Applications repository v0.1 Alpha
Fri, Dec 3rd 2010 8:16p   Tommy Valand
I've started working on an application heavily inspired by Tim Tripconys a href="http://www.timtripcony.com/blog.nsf/d6plinks/TTRY-7L92KM"PIM Slap application/a.br /br /I've made it document based, so that you can easily add more applications (in PIM Slap, you had to add them in Domino Designer).br /br /In the config, you can specify the servers you have your apps on:br /img src="http://2.bp.blogspot.com/_PjG8lIxs1gc/TPmO16VzZXI/AAAAAAAAASI/BE-__tKGdWc/s400/ScreenShot001.png" /br /br /In t [read] Keywords: domino notes application applications blogger database development server

New and improved EventDelegator with InViewEdit demo
Thu, Dec 2nd 2010 3:09p   Tommy Valand
In may 2010, I posted about a href="http://dontpanic82.blogspot.com/2010/05/xpages-dynamically-binding-and.html"server side event delegation/a. The demoapp was from my (current) point of view very messy and hard to use for any other purpose than the demo.br /br /I've improved the EventDelegator code at work, and made it more general purpose. The client side script can be used for a href="http://www.google.no/search?q=event+delegation+javascript"event delegation in the browser/a, or if you w [read] Keywords: xpages application blogger google javascript server

Debugging traditional WebQueryOpen/WebQuerySave code
Thu, Dec 2nd 2010 9:03a   Tommy Valand
I just had a eureka moment when it comes to debugging WQO/WQS code. Once upon a time I decided it was impossible to debug code (through the "local" debugger) that required NotesSession.DocumentContext. It's not :)br /br /You need a global NotesDocument variable that you can bind the DocumentContext to. The reason that it has to be global is that it has probably has to be available across multiple methods/scopes.br /br /Then you need a function that returns either NotesSession.DocumentContext, [read] Keywords: agent blogger

Recommended video - The Top 5 Mistakes of Massive CSS
Mon, Nov 29th 2010 2:43p   Tommy Valand
I rarely post links, but if you're working with CSS, you really need to watch this video. It contains several great tips that help you write more maintanable CSS.br /br /object width="640" height="385"param name="movie" value="http://www.youtube.com/v/j6sAm7CLoCQ?fs=1amp;hl=en_GB"/paramparam name="allowFullScreen" value="true"/paramparam name="allowscriptaccess" value="always"/paramembed src="http://www.youtube.com/v/j6sAm7CLoCQ?fs=1amp;hl=en_GB" type="application/x-shockwave [read] Keywords: application blogger css

XPages - Adding non-xpages attributes to input fields
Mon, Nov 22nd 2010 2:02p   Tommy Valand
I got a question today from a reader of my blog, regarding input fields, and attributes not available in XPages. He was working with web applications for Apple devices, and needed to add some attributes to input fields that aren't allowed by Domino Designer/XPages.br /br /My workaround kind of reminds me of "old school" domino development, where I often have fields that are HTML, and use hidden fields (hide from web) to capture the value from the browser.br /br /Basically it works like this. [read] Keywords: domino xpages apple applications blogger development javascript

XPages Demoapp - Adding controls to a pager
Tue, Nov 16th 2010 10:44a   Tommy Valand
I got a question from a reader regarding posting a demoapp of a href="http://dontpanic82.blogspot.com/2010/04/xpages-adding-controls-to-viewdata.html"Adding controls inside a pager/abr /br /I mocked up a simple demoapp with search controls inside the pager area.br /img src="http://1.bp.blogspot.com/_PjG8lIxs1gc/TOKl9PJUmHI/AAAAAAAAARo/zysPXd74OGw/s400/xpCustomPagerControls.png" /br /br /a href="http://files.dontpanic82.com/CustomPagerControls.zip" Download demoapp/adiv class="blogger-post [read] Keywords: xpages blogger

NotesDocumentCollection.stampAllMulti and readers fields
Wed, Nov 10th 2010 9:49a   Tommy Valand
Readers fields (isReaders=True) in the "template" document seems to be set as Text fields in the stamped documents.br /br /It wasn't a critical bug(?) for me, but I thought I should share it.br /br /Only tested on Domino 8.5.2div class="blogger-post-footer"img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3745504982837212509-5854690713063919097?l=dontpanic82.blogspot.com' alt='' //divdiv class="feedflare" a href="http://feeds.feedburner.com/~ff/dontpanic [read] Keywords: domino blogger bug

Enable enhanced HTML generation via LotusScript
Mon, Nov 8th 2010 4:20a   Tommy Valand
I have about 850 applications that now needs enhanced HTML generation enabled. As far as I know, the only way to enable this in an application is via LS or manually.br /br /Here's example code for enabling it with LS for one db:precodeDim s As New NotesSession, db As NotesDatabasebr /Set db = s.currentDatabasebr / br /'// Fetch the db icon documentbr /Dim col As NotesNoteCollection, doc As NotesDocumentbr /Set col = db.createNoteCollection( False )br /col.selectIcon = Truebr /Call col.buildCol [read] Keywords: lotusscript application applications blogger database properties

New blog design
Fri, Nov 5th 2010 6:44p   Tommy Valand
I've decided to ditch the standard green template, and go for a cleaner look.br /I modified the template I chose slightly to fit my requirements. I was expecting several hours to find/create a suitable look, but the process took about an hour total.br /br /Hopefully it will make the content more readable.div class="blogger-post-footer"img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3745504982837212509-2576654080403305692?l=dontpanic82.blogspot.com' alt='' / [read] Keywords: blogger

XPages: Obscure error message for undeclared variable
Thu, Nov 4th 2010 4:14a   Tommy Valand
I've had an error message that popped up regularly in our logs.precodecom.ibm.jscript.InterpretException: Script interpreter error, line=524, col=25: Interpret exceptionbr / at strongcom.ibm.xsp.javascript.AbstractLocalObject.put(AbstractLocalObject.java:95)/strong/code/preThe line it refers to has a for .. in loop on a scoped variable. I believed it had to do with the object being in a scoped variable, and tried to make a by-value copy. That didn't help.br /br /I finally (!!) discovered the r [read] Keywords: ibm xpages blogger java javascript

LotusScript: Fast sorting of arrays using Java
Fri, Oct 29th 2010 4:22p   Tommy Valand
If you want to sort large string arrays (1000 items), LotusScript can be horrendously slow. Back in the day, I tried to use Java via LS2J. Unfortunately LS2J was so unstable that I went back to pure LS sorting.br /br /The reason I'm so interested in efficiently sorting arrays, is that I use a token string array as a base when rendering various content in a CMS I maintain at work. Sorting big arrays in LS is, as said, slow. Sorting token string arrays, based on a specific token in LS is strongs [read] Keywords: agent domino lotusscript blogger java openntf

XPages: New methods to the Debug class
Wed, Oct 27th 2010 5:31a   Tommy Valand
I added couple of new methods to the a href="http://dontpanic82.blogspot.com/2009/12/helper-functions-for-debugging-xpages.html"Debug class/a.br /br /strongDebug.messageToPage( message:String )/strong: Adds a message to the strongbottom/strong of the page.br /Example usage:precode..br /Debug.messageToPage( viewScope.someValue )br /../code/prestrongDebug.exceptionToPage( exception:String )/strong: Adds exception message to the strongbottom/strong of the pagebr /Example usage:precodefunction som [read] Keywords: xpages blogger

XPages: Make categorized views behave
Fri, Oct 22nd 2010 4:04a   Tommy Valand
The current implementation of categorized views gives a table column to each column. In most cases, you probably don't want this. The code below makes the categories look more like nested sections.br /precodefunction transformCategorizedViews(){br / dojo.require("dojo.NodeList-traverse");br / var categoryButtons = dojo.query( '.xspDataTable button[title=collapsed], .xspDataTable button[title=expanded]' );br / categoryButtons.closest( 'tr' ).forEach( function( row ){br / var colspan = 1, c [read] Keywords: xpages blogger dojo

XPages: Show validation errors for multiple/specified components
Tue, Oct 19th 2010 3:15a   Tommy Valand
There's a lot of great stuff in XPages, but there's also a few things I miss. One of those things is message-controls that you can connect to multiple fields. It's quite easy to emulate this using a little bit of SSJS, and a xp:text.br /br /SSJS:precode// Fetch messages for specified componentsbr /function getFacesMessages( components ){br / try { br / if( typeof components !== 'array' ){ components = [ components ]; } br / var clientId, component, messages = [], msgIterator; br / for( var [read] Keywords: xpages blogger javascript

XPages: Another bugfix for the partial refresh hijacker
Mon, Oct 11th 2010 9:14a   Tommy Valand
When the onComplete-code for an event was served as a string, it wouldn't run. This bug has now been fixed in the code.br /br /a href="http://dontpanic82.blogspot.com/2010/01/xpages-hijackingpublishing-partial.html"Original post with code/adiv class="blogger-post-footer"img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3745504982837212509-3772065072552258720?l=dontpanic82.blogspot.com' alt='' //divdiv class="feedflare" a href="http://feeds.feedburner.com [read] Keywords: xpages blogger bug

XPages: Add global/field message
Thu, Oct 7th 2010 8:44a   Tommy Valand
If you want to set a message in a xp:message/xp:messages control, here's a little code snippet for you.br /br /precode// Sets a global message/message for a fieldbr /function addFacesMessage( message, component ){br / try { br / if( typeof component === 'string' ){br / component = getComponent( component );br / }br / br / var clientId = '';br / if( component ){br / clientId = component.getClientId( facesContext );br / }br / br / facesContext.addMessage( clientId, br / new javax.faces.applic [read] Keywords: xpages application blogger wiki

XPages: Bug in fromJson (with fix)
Wed, Oct 6th 2010 2:18p   Tommy Valand
toJson can convert most JavaScript objects to JSON. fromJson can not convert back all JSON strings to JS objects the same way.br /br /Example:precodevar arrayJson = toJson( [1,2,3] ); // "[1,2,3]"br /fromJson( arrayJson ) // fails/code/preIf you try the same in Firefox, which has implemented the JSON API, everything works:precodevar arrayJson = JSON.stringify( [1,2,3] ); // "[1,2,3]"br /JSON.parse( arrayJson ) // [1,2,3]/code/preI've created a simple wrapper-class that works around this bug [read] Keywords: xpages blogger bug firefox javascript

Code snippet - Array.splice according to ECMA
Wed, Oct 6th 2010 9:14a   Tommy Valand
I've really missed the proper a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/splice"Array.splice/a in SSJS. To avoid writing a loop for every time I want to do a "splice operation", I've made a function that should work according to spec.br /br /precode// $splice - Array.splice according to ECMA standardsbr /function $splice( array, startIndex, numItems ){br / try {br / var endIndex = startIndex + numItems;br / var itemsBeforeSplice = [], splicedItems = [read] Keywords: ibm blogger javascript

XPages: SSJS code snippet that lets you parse/stringify JS-JSON
Wed, Sep 29th 2010 1:44p   Tommy Valand
A while back, I ported a script written for a href="http://en.wikipedia.org/wiki/Rhino_(JavaScript_engine)"Rhino/a to SSJS that lets you parse JSON to JS objects/serialize JS objects to a JSON string. I've found it quite useful, so I thought I should share it with you.br /br /I can't remember where I found the Rhino script, but the original source code that the Rhino script is based on is linked to at the bottom of this page: a href="http://www.json.org/js.html"http://www.json.org/js.html/ [read] Keywords: xpages blogger database wiki

Storing data as JSON in a field VS multiple fields
Wed, Sep 29th 2010 1:43p   Tommy Valand
I've started to convert a CMS I'm maintaining at work to XPages. I'll probably do it over a longer time span, when I'm not doing other more important work. In the process, I'm brainstorming a little bit on how to improve some of the things in the application.br /br /One of the things our customers request is more fields for stronglinks/strong/the ability to sort them (they are displayed in "categorized" sections on the right side of the page in read mode). The form currently have 20 rows [read] Keywords: notes xpages application blogger interface javascript widget

If you're getting errors on dijit.Dialog.hide() on Domino 8.5.2 - workaround
Mon, Sep 20th 2010 9:14a   Tommy Valand
There is a href="http://bugs.dojotoolkit.org/ticket/10654"a bug/a in the current code stream (dojo 1.4.2) when hiding/closing dialogs. I'm not a 100% sure what triggers the bug in our applications. It happens on a couple of dialogs.br /br /The workaround for the bug is to add strongrefocus: false/strong in the options when creating the dialog. E.g.precodevar dialog = new dijit.Dialog({br / refocus: false,br / title: 'Dialog title' br /});/code/prediv class="blogger-post-footer"img width= [read] Keywords: domino applications blogger bug dojo

XPages: Workaround for fields losing focus on partial refresh
Tue, Sep 14th 2010 3:44p   Tommy Valand
The code snippet below, in conjunction with my a href="http://dontpanic82.blogspot.com/2010/01/xpages-hijackingpublishing-partial.html"hijackAndPublishPartialRefresh/a function should fix the problem of fields losing focus when elements containing them are refreshed.br /br /precodedojo.addOnLoad(function(){br / dojo.subscribe( 'partialrefresh-init', function(){br / // setTimeout needed to make it work in Firefoxbr / setTimeout(function(){ br / var activeElementId = document.activeElement.id; [read] Keywords: xpages blogger dojo firefox

XPages: Helper function for inconsistent API methods - always get an array
Mon, Sep 6th 2010 5:14a   Tommy Valand
precode// Helper for inconsistent APIbr /// Wrap around @DbLookup/@DbColumn/@Trim/@Unique calls to have an array returnedbr /function $A( object ){br / // undefined/null - empty arraybr / if( typeof object === 'undefined' || object === null ){ return []; }br / // Array - return object unharmed br / if( object.constructor === Array ){ return object; }br / // Return array with object as first itembr / return [ object ];br /}/code/preE.g. br /@Unique( 1, 1, 1 ) - 1br /$A( @Unique( 1, 1, 1 ) - [ 1 [read] Keywords: dblookup ibm xpages blogger

If you want to run XPages API Inspector in the Client
Fri, Sep 3rd 2010 9:08a   Tommy Valand
Add this line to your java.policy file (in the notes directory):br /precodegrant {br / permission java.lang.RuntimePermission "accessDeclaredMembers";br /};/code/preThanks to a href="http://www.openntf.org/internal/home.nsf/response.xsp?action=openDocumentdocumentId=3A1011FC2404755586257793003C219EMainID=12E6CFFD35D690768625779200760E2E"F. Kranenburg/a for the tip. :)div class="blogger-post-footer"img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/374550498283 [read] Keywords: notes xpages blogger java openntf

Need help.. ECL Exception when using Java Reflection API
Fri, Sep 3rd 2010 3:14a   Tommy Valand
I got a a href="http://www.openntf.org/internal/home.nsf/request.xsp?action=openDocumentdocumentId=12E6CFFD35D690768625779200760E2E"feature request/a for my XPages API Inspector. When running the inspector on an strongXPage in the Notes Client/strong:br /emException:ECL Permission Denied (java.lang.RuntimePermission accessDeclaredMembers)/embr /br /I think it has something to do with accessing declared members of a class. Have any of you encountered this, and if so, is there a way to work arou [read] Keywords: notes notes client xpages blogger java openntf server

XPages API Inspector V3
Thu, Sep 2nd 2010 2:21p   Tommy Valand
Changes:br /precodeFrom feature requests (thanks, Mark Leusink):br / * Classes that doesn't have a constructor can now be inspected (e.g. lotus.domino.local.Item)br / * The API Inspector now has partial refresh. No more full reload of pagebr /br /My own tweaks:br / * Removed the clear-buttonbr / * If you select something other than custom, the input field/inspect button is hidden. br / To reset, select custombr / * The expression field is now an auto-growing text-area. br / This allows you to t [read] Keywords: domino lotus xpages blogger openntf

XPiNC: Prevent tabs being closed on ESC
Wed, Aug 25th 2010 3:13a   Tommy Valand
A reader of my blog asked me how to prevent tabs being closed when pressing escape in XPages running in the Notes Client.br /br /This strongclient side/strong code seems to work in Notes 8.5.2 at least:precodedojo.addOnLoad( function(){ br / dojo.connect( document, 'keydown', function(e){ br / // 27 - Key code for ESC - stop eventbr / if(e.keyCode === 27){ dojo.stopEvent(e); } br / });br /});/code/prediv class="blogger-post-footer"img width='1' height='1' src='https://blogger.googleuser [read] Keywords: notes notes client xpages blogger dojo

XPages: Simple function to clear scoped variables
Thu, Jun 24th 2010 2:14a   Tommy Valand
All scope objects (applicationScope, sessionScope, etc.) are maps, so it's quite easy to clear them. This might come in handy during development, if you want to clear the applicationScope. br /br /I've tested it on both applicationScope and sessionScope, and it doesn't seem to do any harm. After the maps are cleared, the server automatically loads the "internal" values used by the system.br /br /precodefunction clearMap( map:Map ){br / // Get iterator for the keysbr / var iterator = map.key [read] Keywords: xpages blogger development server

XPages: Adding default value for empty view columns
Tue, Jun 22nd 2010 5:13a   Tommy Valand
Go to source mode, and find the column you want to add the default text. Add a computed field that's rendered when:br /strong!( this.getParent().getValue() )/strongbr /br /E.g.br /precodelt;xp:viewColumn columnName="notes" id="colNotes"gt;br / lt;xp:viewColumnHeader value="Notes"gt;lt;/xp:viewColumnHeadergt;br / lt;xp:text value="No notes"br / rendered="#{javascript:return !( this.getParent().getValue() );}" /gt;br /lt;/xp:viewColumngt;/code/prebr /this.getParent() returns the cell. I [read] Keywords: notes xpages blogger javascript

XPages: Code snippet for Multi Value Custom Converter
Thu, Jun 17th 2010 3:16a   Tommy Valand
I got a href="https://www.blogger.com/comment.g?blogID=3745504982837212509postID=3596771585756735811#c1781090065923016497"a question/a regarding how to work around the buggy multi-value implementation in XPages. I use a custom converter for my multi value fields.br /br /precodevar Converters = { br / multivalue: {br / // separator: String or RegExpbr / getAsObject: function( valuesString, separator ){br / try {br / separator = separator || ',';br / var values = valuesString.split( separator [read] Keywords: script library xpages blogger

Created and Maintained by Yancy Lent - About - Blog Submission - Suggestions - Change Log - Blog Widget - Advertising - Mobile Edition