357 Lotus blogs updated hourly. Who will post next? Home | Downloads | Events | Pods | Blogs | Search | myPL | About 
 
Latest 7 Posts
The Basic Xots Tasklet in the Blog
Sat, Sep 6th 2014 141
How I'm Handling URLs for the Blog
Fri, Sep 5th 2014 253
New Blog Structure
Fri, Sep 5th 2014 141
(Not) My Slide Decks From MWLUG
Tue, Sep 2nd 2014 159
A Centralized Bean for Translation
Mon, Sep 1st 2014 110
Quick Tip: Use Dojo Content Panes for Speedier Initial Page Loads
Mon, Aug 18th 2014 114
My Sessions at MWLUG This Year
Mon, Aug 18th 2014 108
Top 10
"Build Automatically", "Refresh automatically", and "Team Development"
Thu, Jan 23rd 2014 472
So it goes.
Mon, May 12th 2014 453
An XPage As A Tree: Implications
Wed, Apr 16th 2014 423
The Trouble With Developing on Domino
Tue, Jul 8th 2014 409
Be a Better Programmer, Part 1
Thu, May 15th 2014 372
Swift
Wed, Jun 4th 2014 342
My Current Ideal App-Dev Routine, April 2014
Sun, Apr 27th 2014 316
Code for Tim: LESS CSS for XPages
Sun, May 25th 2014 313
Better Living Through Reverse Proxies
Thu, May 30th 2013 308
SNTT: Reconstructing DateRanges
Thu, Feb 27th 2014 299


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
100 hits



Recent Blog Posts
141


The Basic Xots Tasklet in the Blog
Sat, Sep 6th 2014 7:12a   Jesse Gallagher
Continuing in my two-day spat of blog posts shamelessly containing "blog" in the title, I figured I'd mention how I'm using Xots for new-comment notifications. If you're not familiar with it, Xots is a recent addition to the OpenNTF Domino API (added in the recently-released M5 RC1 build), intended to replace both agents and DOTS. There's still more work to be done on the scheduling portion, but Xots is perfectly capable of running manually-created tasks in a similar manner to Threa [read] Keywords: agent domino database openntf server
253


How I'm Handling URLs for the Blog
Fri, Sep 5th 2014 6:13p   Jesse Gallagher
As I mentioned in the introductory post for the blog, I'm putting my investigation into RequestCustomizerFactory classes to work in the blog. At its core, the point of what I'm doing is to allow me to write code like this: ...and have the generated link be something like: whatever The core of this is the ability of a RequestCustomizerFactory to specify a UrlProcessor that is used by basically every URL-generation routine in XPages to map the XSP-side URLs to their final HTML version. [read] Keywords: xpages database java server
141


New Blog Structure
Fri, Sep 5th 2014 3:13p   Jesse Gallagher
So I finally got around to re-doing my blog app after letting the previous one wither on the vine for years. The main things this new template has over the previous one are: A properly responsive design care of WrapBootstrap. Conveniently, it's the same design I use for our internal task-tracking app, so I had most of the renderers ready. Along those lines, the XSP structure is heavily based on standard/ExtLib components when at all possible, rather than putting the Bootstrap structure i [read] Keywords: development
159


(Not) My Slide Decks From MWLUG
Tue, Sep 2nd 2014 6:14p   Jesse Gallagher
At this year's MWLUG, I presented two sessions: one on using nginx as a reverse proxy and load balancer, and one on structured XPages development. Normally, the next step would be to post the slides, but my decks aren't particularly useful on their own - they were small 8-slide affairs that mostly served as a memory assistance to me, one sight gag, and then a "Demo" slide where I switched to the normal screen for the actual code. So my plan instead is to blog with the details. The latter s [read] Keywords: xpages development twitter
110


A Centralized Bean for Translation
Mon, Sep 1st 2014 2:12p   Jesse Gallagher
The normal method for doing translation in XPages is by using the built-in Designer tooling, which creates properties files for each language for each XPage in your app. This is okay, though it requires using Designer to update the properties (since apparently the translation happens as part of the build process). For the refresh of my blog I'm working on, I'm taking a different tack, inspired by the way a client does it and similar to how I do it in the Framework. Specifically, I have a cent [read] Keywords: domino ibm xpages application java javascript properties
114


Quick Tip: Use Dojo Content Panes for Speedier Initial Page Loads
Mon, Aug 18th 2014 5:13p   Jesse Gallagher
The XPages Extension Library is full of hidden gems and one I particularly like keeping in my back pocket is the control. It's a fairly unassuming control; like the rest of the components in the "Dojo Layout" category, it takes its name and basic concept from the underlying Dijit. However, you don't have to use it in a full Dojo layout - and, in fact, all of the actual layout types have more-appropriate XSP components. Presumably, its initial use is to load content from a specified UR [read] Keywords: xpages database dojo javascript network properties
108


My Sessions at MWLUG This Year
Mon, Aug 18th 2014 1:13p   Jesse Gallagher
As I mentioned at the end of this morning's post about SSL and reverse proxies, I'm going to be giving a session on using a reverse proxy in front of Domino at this year's MWLUG next week. Specifically, it will be one of two sessions, both on Friday: OS101: Load Balancing, Failover, and More With nginx I'll be discussing the general reasons why you would use a reverse proxy - not just the aforementioned SSL benefit, but also load balancing, failover, multi-app integration, new feature [read] Keywords: domino xpages integration server
233


Domino SSL and Reverse Proxies
Mon, Aug 18th 2014 7:12a   Jesse Gallagher
Domino's SSL stack has been long-in-the-tooth and awkward to deal with for a while. Until recently, this has mostly just resulted in the sort of stilted way you have to set up SSL keychains, using the Server Certificate Admin database initially and then "IKeyMan" more and more (specifically, an old version you need 32-bit Windows XP for, like a barbarian), but the job eventually got done. However, as a post from Steve Pitcher points out, this is becoming rapidly impractical. While I gen [read] Keywords: admin domino ibm database development server smtp websphere
165


Quicker Tip: Lowering XPage Build Overhead When Using Jars
Thu, Aug 14th 2014 1:13p   Jesse Gallagher
(Caveat: I don't actually know if this matters with the Jar design element in 9.0+, since the only times I've needed it are with clients using obsolete versions) If you use Jar files stored in an NSF in your build path with XPages apps, you've likely noticed that it makes your build times interminable, particularly if it's a large library. From what I can tell, Designer seems convinced that it must download the entire Jar file during every build, in order to find out what's inside of [read] Keywords: xpages archive eclipse
206


Be a Better Programmer, Part 4
Thu, Aug 14th 2014 7:12a   Jesse Gallagher
This topic isn't, strictly speaking, in the same vein as the rest of this series; instead, it's more of a meandering "case study" sort of thing. But it has something of a unifying theme, if you'll bear with me: Be Mindful of Your Layer of Abstraction Basically everything about computers has to do with layers of abstraction, but what I have in mind at the moment is how it interacts with web programming. First, I'll dive into a bit of background. The original premise of HTML was that [read] Keywords: domino xpages best practice css desktop development java javascript properties server widgets




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