329 Lotus blogs updated hourly. Who will post next? Home | Downloads | Events | Jobs | Twitter | Bookmarks | Pods | Blogs | Search | myPL | About 
 
Latest 7 Posts
How I Got XPiNC Run-On-Server With SSO Working
Fri, May 17th 2013 126
Public Service Announcement - NotesIn9 is down.
Tue, May 7th 2013 322
My Latest Programming-Technique Improvements
Tue, Apr 23rd 2013 184
Java Traps and Misconceptions
Tue, Apr 23rd 2013 182
Fun With Old XML Features
Tue, Apr 2nd 2013 214
Release M1 of org.openntf.domino
Tue, Apr 2nd 2013 200
We Have The Technology: The org.openntf.domino API
Thu, Mar 21st 2013 200
Top 10
"Controller" Classes Have Been Helping Me Greatly
Wed, Dec 26th 2012 678
Putting Apache in Front of Domino
Sat, Dec 8th 2012 666
Programming Tips: Implied Booleans and the Ternary Operator
Tue, Dec 11th 2012 478
Moving From Ruby-in-XPages to Polyglot
Wed, Dec 12th 2012 469
More On "Controller" Classes
Mon, Jan 7th 2013 442
Quick-and-Dirty CKEditor Toolbar Setup for XPages
Tue, Sep 4th 2012 372
Building XPages servlets with FacesContext access
Thu, Sep 6th 2012 332
Faking Sortable View Data
Sun, Jul 22nd 2012 330
Public Service Announcement - NotesIn9 is down.
Tue, May 7th 2013 322
My Current Data-Source Musings
Mon, Nov 26th 2012 321


In Between My Project and XPages
Jesse Gallagher    

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.

Computed Text

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.

Embedded Views

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.

Tabbed/Computed Tables

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.

Attachments

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.

Buttons

Nope.

WebQueryOpen/WebQuerySave

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]; "...").

User-generated Forms

This is the toughest one. I've given this thought a number of times, and I can't think of a great solution. I can't just re-use the subforms I have already, I don't think I can generate and import an XPage via DXL (though I haven't given that a significant shot), and I can't just do a <xp:repeat/> to create all the fields, since some are in the body area. The main routes I can think of to try are a) arranging the fields on the page after the fact via JavaScript and b) generating the page components on the fly with Java or Server JavaScript. I'll probably give the latter a shot eventually, but I expect it to be a bag of hurt.

 

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.



---------------------
http://frostillic.us/?p=293
Mar 15, 2012
137 hits



Recent Blog Posts
126


How I Got XPiNC Run-On-Server With SSO Working
Fri, May 17th 2013 5:14p   Jesse Gallagher
Among the new features in Domino 9 is this little guy, found on the Launch pane of a database's properties when you set it to open an XPage: If you've ever used an XPiNC application before, you'll know this is a godsend, promising the vast performance benefits of running an app on a server combined with the "the users are stuck using the Notes client" benefits of XPiNC. I turned this on for a new app on one of my client's servers (let's say the server name is ClientName-2/ClientNa [read] Keywords: admin domino notes notes client policies sametime xpages application database desktop network properties server
322


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
184


My Latest Programming-Technique Improvements
Tue, Apr 23rd 2013 9:18a   Jesse Gallagher
Over the past couple weeks, I've been trying out some new things to make my code a bit cleaner and I've been having a good time of it, so I figured I'd write up a quick summary. Composed Method First and foremost, I've been trying out the Composed Method of programming. This is not a new idea - indeed, it's a pretty direct application of general refactoring - but the slight perspective change from "factor out reused code" to starting out with clean, small blocks has been a pleasan [read] Keywords: agent domino ibm lotusscript xpages application database eclipse java openntf
182


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: https://www.socialbizug.org/blogs/gidgerby/entry/java_traps_and_misconceptions?l ang=en_us [read] Keywords: java
214


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 ibm notes rich text xpages java javascript openntf xml
200


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 openntf
200


We Have The Technology: The org.openntf.domino API
Thu, Mar 21st 2013 7:13p   Anonymous
As Nathan and Tim posted earlier today, a number of us have been working recently on a pretty exciting new project: the org.openntf.domino API. This is a drop-in replacement/extension for the existing lotus.domino Java API that improves its stability and feature set in numerous ways. The way I see it, there are a couple main areas of improvement: Plain Old Bug Fixes doc.hasItem(null) crashes a Domino server. That's no good! We've fixed that, and we're going through and fixing other [read] Keywords: agent domino dxl lotus notes bug database java openntf server xml
250


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 lotusscript database java server




264


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 notes notes client consulting database development
286


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 do. 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 notes xpages database development java




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