Disabled and read only

Posted on

XPages has a “read only” feature for fields. It also has a “disabled” feature for fields. In case that’s not confusing enough, it has a “show read only as disabled” feature too. These three flags determine whether a field’s value is saved, whether it appears as text or as a form control, and whether the form control is read-only or disabled. Read-only fields can be selected normally with the mouse, but (at least in Bootstrap) are greyed out:…

Read more »

Perils of automatic invisible software updates

A couple of days ago I noticed my Google Fiber uplink was only 100Mbps instead of 1Gbps. While debugging with the tech via phone, it seemed as though any time I had something connected to port 4 on the network box, the speed dropped. I moved cables around until the speed was back to normal, and they scheduled a tech to come swap out the box. Today the tech arrived and was unable to reproduce the problem.…

Read more »

OpenID Connect introduction

OpenID Connect is an authentication standard built on top of OAuth2. From my point of view it has the following key features: It’s a lot simpler than anything involving SAML. Validating SAML requires a full implementation of XML Signature, which requires an implementation of XML Canonicalization, which requires a full XPath implementation. I’m not anti-XML in general, but I don’t think authenticating a user should require parsing, traversing and rearranging a DOM tree multiple times.…

Read more »

Reflection in Go and modifying struct values

Recently I found myself wanting to write some code to load values into a Go object. The obvious approach is reflection. However, the Go documentation on reflection is somewhat impenetrable, and the accompanying article on The Laws of Reflection only has a single skimpy example involving structs right at the end. After some trial and error I came up with some robust code to demonstrate examining a struct and altering its fields.…

Read more »

Bluemix J2EE basics with Eclipse and WAS Liberty Profile

IBM Bluemix is a cloud platform build around Cloud Foundry, OpenStack, and other popular open source projects. As well as using it to deploy Go, nodeJS and PHP applications, you can use it to develop J2EE applications. To do so, you can use WebSphere Liberty, a clean ground-up implementation of J2EE in a single 60MB download. Don’t confuse it with the old WebSphere Application Server — this new beast can start up in seconds and run in 512MB of RAM.…

Read more »

XPages reliability checklist

When XPages works, it’s great. When it doesn’t work, it’s a pain. Partial refreshes suddenly stop working, user data is thrown away, and forms become unsubmittable. The root problem is that JSF holds a complex tree of objects on the server, representing the state of all the components on the web page — along with a Domino document for your data, and all the scope variables. Each HTTP request to the back end is accompanied by a $$viewid value fetched from a hidden field on the Web form.…

Read more »

Better string lists in XPages

Like Notes, XPages supports multi-valued fields. You can set a separator for multiple values, and tell XPages whether to trim whitespace from around each value. Unfortunately, if you have (say) a list of string values, the separator ends up with no whitespace after it. This can look ugly: Mon,Tue,Wed Ideally we’d like to display the multiple values with a space after each comma, and also accept separators like newline or semicolon when entering data.…

Read more »

Search is hard

Getting search right in applications has many interesting subtleties. One problem is that most people don’t understand boolean algebra, to the point that they don’t understand the difference between “and” and “or” in a set of search clauses. Unless your audience is highly technical, giving them a choice between “and” and “or” will only confuse them. If you look at sites which successfully allow complex queries, they do it by using the type of UI component to express whether the choice is “and” or “or”.…

Read more »

Implementing live search on a web form using XPages

Given that people find it hard to select from more than around 8 options, the “drop-down selector with live search filter” design pattern is useful for all sorts of situations. If you have a reasonably small number of options, you can do it all client-side. A couple of thousand select items can be read as JSON and filtered client-side without too much of a performance hit — at least, on the desktop, with a reasonably fast Internet connection.…

Read more »

Domino XPages namePicker vs Directory Assistance

A common need in Domino applications is a way to add one or more users to a list using their Domino IDs, for example to add additional allowed editors to a document. In the Notes client, this is pretty easy — you select “Use Address dialog for choices” in a drop-down, and optionally check the two boxes to turn on autocomplete. Done. In XPages, it’s nowhere near that simple. The XPages Extension Library — which is now a standard part of Domino — provides a Name Picker componebnt, xe:namePicker.…

Read more »