Despite my grousing about the state of programming for Domino in general and Designer in particular, I'm still mostly a fan of XPages. I use it for my guild's web site and pretty much every new project at work. However, I haven't been able to crack migrating my main work database template over.
Without getting too much into it, the point of the template is to create one database per project to act as a project web site listing online events with arbitrary registration forms and exit evaluations (among other things). Except for custom changes, everything is done via the normal Notes client, not Designer - pages exist as documents with a Body rich text field and associated data and register forms/exit evals, crucially, contain a set of response documents describing their fields. It's important to keep everything as visual as possible, because the users (the people at my company that set up these web sites) are not programmers.
I scrupulously try to avoid modifying the design of the database, so I go out of my way to do custom work via the existing mechanisms as much as possible, and I make pretty good use of rich-text-isms like embedded views, tabbed/computed tables, attachments, buttons, and computed text. In the case of the generated forms, fields can be placed either automatically (with a surrounding template of HTML per-field) or directly into the rich text body via <%FieldName%> placeholders (creating an experience like form design in Designer). Additionally, I have "WebQueryOpen" and "WebQuerySave" fields in the documents for formulas that I pass on into @Eval() in the equivalent places in the actual forms; most of the time, I use these for running agents.
Of the various potential show-stoppers, I think computed text fares the best. For one, it mostly worked - the computed formulas are indeed evaluated and the result is put into place correctly. However, they don't have the same environment you get with the "classic" design elements. The big one that I ran into immediately was @UrlQueryString(...) - it appears that the rich text renderer doesn't inform the rich text about its web environment completely. Prior to 8.5.3, "Display XPage instead" pages didn't know about the real URL, so they couldn't get query parameters at all, but 8.5.3 appears to pass that information along properly. So that means it MIGHT be fixable, if I find a way to properly set fields in the document before the rich text is rendered, so I can set QUERY_STRING - if I can do that, either @UrlQueryString(...) will work or I can manually parse the string as needed.
They work! ...ish. It looks like icon columns get their URLs a bit messed up, but I can't think of a time when I actually used them, particularly in a situation where I couldn't just write out the URL myself.
From a cursory glance, I think I'd be SOL when it comes to these. Tabbed tables render flattened out and computed tables don't seem to work.
These show up as "(See attached file: foo.jpg)". So... not functional. I might be able to fix it by using a filter on the text to replace the HTML with a link to the document, but I don't know if I could get the attachment image properly. Attachment images aren't amazing, but sometimes they do the job.
In some cases, I could run the formulas through session.evaluate(), though I'm not even sure queryOpenDocument/postOpenDocument let me hook into the right spots (sometimes I set fields on document open). I don't think that would run agents, though, so I'd be stuck trying to parse out the text to look for @Command([ToolsRunMacro]; "...").
It's a lot of hurdles! I'd love to switch over to XPages, particularly since, for everything that's more difficult than using classic elements, there are 10 things that are way easier. It'd just be quite an investment of time to merely get up to par with the functionality I already have, if it's even possible in all cases.
Public Service Announcement - NotesIn9 is down.
Tue, May 7th 2013 11:16a Jesse Gallagher David Leedy has run into some trouble with NotesIn9.com being down and he asked
if I could help him get the word out about it, which I'm more than happy to do:
Hi - Just wanted to drop a note out there about my NotesIn9.com website.
Currently it's redirecting to someplace else for some unknown reason. I
assume it's been php hacked but I don't know.
My Wordpress site is generously hosted by Chris Miller and I've sent him a
note. Though since he's in the middle of the [read] Keywords: xpages bug
Java Traps and Misconceptions
Tue, Apr 23rd 2013 6:16a Jesse Gallagher I wrote a post over at the Social Biz UG site covering a number of traps and
conceptual hurdles I frequently see people running into when it comes to Java:
ang=en_us [read] Keywords: java
Fun With Old XML Features
Tue, Apr 2nd 2013 11:18p Jesse Gallagher One of the side effects of working on the OpenNTF Domino API is that I saw
every method in the interfaces, including ones that were either new to me or
that I had forgotten about a long time ago. One of these is the "parseXML"
method found on Items, RichTextItems, and EmbeddedObjects. This was added back
in 5.0.3, I assume for some reason related to the mail template, like
everything else added back then. Basically, it takes either the contents of a
text item, the text of a rich text ite [read] Keywords: domino
Release M1 of org.openntf.domino
Tue, Apr 2nd 2013 9:17p Jesse Gallagher Yesterday, we released milestone 1 of our improved Domino API. This is our
first tagged release meant for proper testing - all of the classes are
implemented, many of the banner features are in there, and we've been using it
in various real-world situations. I switched a couple of my side projects over
- my portfolio site, the code for this blog (though I haven't deployed the
template yet), and a couple personal game-related apps. That kind of testing is
going to be crucial in getting us [read] Keywords: domino
A Mini-Vacation With Ruby and the Domino Data Service
Sat, Mar 2nd 2013 4:11p Jesse Gallagher Since I've been neck-deep in LotusScript and Java for the past couple weeks, I
decided to take a bit of a sanity break today and play around with Ruby.
Specifically, I wrote a skeletal wrapper for the Domino Data Service in the
ExtLib and the first steps of a Rails app using it a bit. I don't expect this
to actually be useful down the line, or even necessarily to get any more work
put into it, but it was a fun diversion.
The API takes the same general shape as the normal Domino API, exce [read] Keywords: domino
I Know Some Guys
Tue, Feb 26th 2013 12:09p Jesse Gallagher I've been a bit quiet lately, but that's mostly because I've been pretty busy
lately. After my old company began closing down, I started going whole-hog in
my consulting company, I Know Some Guys. Naturally, I can't go TOO much into
it, but the general gist is "so far, so good." We have a couple clients so far
and they've been keeping me busy indeed. A lot of that has involved classic
Notes client and web development, but I guess that serves me right for
snickering at people work [read] Keywords: domino
The Bean-Backed Table Design Pattern
Tue, Jan 22nd 2013 4:13p Jesse Gallagher First off, I don't like the name of this that I came up with, but it'll have to
One of the design problems that comes up all the time in Notes/Domino
development is the "arbitrary table" idea. In classic Notes, you could solve
this with an embedded view, generated HTML (if you didn't want it to be good),
or a fixed-size table with a bunch of hide-whens. With XPages, everything is
much more flexible, but there's still the question of the actual implementation.
The route I've bee [read] Keywords: domino