357 Lotus blogs updated hourly. Who will post next? Home | Downloads | Events | Pods | Blogs | Search | myPL | About 
 
Latest 7 Posts
The Industry's Vileness
Tue, Jul 22nd 2014 47
Generating Toaster, dGrowl, etc. Notifications From Server Code
Tue, Jul 22nd 2014 42
Value and Method Bindings in XPages
Mon, Jul 21st 2014 94
Building an App with the frostillic.us Framework, Part 5
Mon, Jul 21st 2014 56
Meandering Musing About Views
Sun, Jul 20th 2014 105
How I Deal With Collections in the Framework
Sun, Jul 20th 2014 90
Platform Defensiveness
Fri, Jul 18th 2014 151
Top 10
"Build Automatically", "Refresh automatically", and "Team Development"
Thu, Jan 23rd 2014 473
Domino the Identity Server
Tue, Feb 11th 2014 417
Couchbase StateManager for XPages, Part 1
Wed, Jan 29th 2014 398
So it goes.
Mon, May 12th 2014 369
An XPage As A Tree: Implications
Wed, Apr 16th 2014 339
SNTT: Reconstructing DateRanges
Thu, Feb 27th 2014 333
The Trouble With Developing on Domino
Tue, Jul 8th 2014 331
Better Living Through Reverse Proxies
Thu, May 30th 2013 315
My Current Model Framework, Part 2: An Example
Fri, Feb 21st 2014 312
Couchbase StateManager for XPages, Part 2
Fri, Feb 21st 2014 306


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



Recent Blog Posts
47


The Industry's Vileness
Tue, Jul 22nd 2014 9:13p   Jesse Gallagher
Fair warning: this post isn't technical. It's also full of sweeping generalities. When I attended middle and high school, it was as part of the last group of geeks and nerds that should face systemic ostracization. Naturally, high school will still be terrible for most people, just because it's full of high schoolers, but the world at large has seen a near-complete triumph for geeks and nerds generally. And this has had some very positive side effects: because we had to deal with exclu [read] Keywords: community development
42


Generating Toaster, dGrowl, etc. Notifications From Server Code
Tue, Jul 22nd 2014 10:12a   Jesse Gallagher
In yesterday's Framework-series post, I offhandedly mentioned that the "flashMessage" routine I use could easily be paired with or replaced by "toaster"-style notifications. This turned out to be very coincidental, as just today a NotesIn9 episode went up featuring Brad Balassaitis talking about using dGrowl for this purpose, along with an accompanying blog post. Whenever I've used something like this, I've run into situations where I want to generate the message from the server, sa [read] Keywords: formula language ibm xpages dojo java javascript properties server xml
94


Value and Method Bindings in XPages
Mon, Jul 21st 2014 3:12p   Jesse Gallagher
When you use any binding in XPages - anything with "#{...}" or "${...}", regardless of whether it's EL, SSJS, or other - you're creating what is called in JSF-land either a ValueBinding or a MethodBinding, and the distinction is important but can be subtle, particularly when dealing with SSJS. Value Bindings The simplest case of value bindings are sprinkled throughout even the most basic XPage app, created when you bind a control to a document's field: The meaning is clear: "thi [read] Keywords: notes xpages interface java javascript
56


Building an App with the frostillic.us Framework, Part 5
Mon, Jul 21st 2014 1:12p   Jesse Gallagher
Define the data model Create the view and add it to an XPage Create the editing page Add validation and translation to the model Add notification to the model Add sorting to the view Basic servlet REST with Angular.js Add notification to the model The next step in building our Framework app is a simple one: adding some basic visual notification when user saves a note. We'll leave the navigation rule to send the user to the home page in place and use flashScope (included in the Framework) a [read] Keywords: email java
105


Meandering Musing About Views
Sun, Jul 20th 2014 9:15p   Jesse Gallagher
As happens periodically, I've been thinking about Domino views lately. When I get into one of these moods, I find it helps to take a step back to look at what an NSF is. An NSF is, in its heart of hearts, a key/value store. Each entry has several keys of which the useful ones are Note ID and the UNID, which are 32-bit and 128-bit integers, respectively, and where the Note ID is fixed and the UNID is mutable. Each entry's value is a multimap with string keys and values that are either ef [read] Keywords: agent domino formula language ibm database java javascript openntf server sql
90


How I Deal With Collections in the Framework
Sun, Jul 20th 2014 8:13a   Jesse Gallagher
A post on Christian Güdemann's blog and a followup on Nathan Freeman's made me figure it could be useful to discuss how I deal with the job of working with document collections in the frostillic.us Framework. First of all: I am not solving the same original problem Christian had. His post discussed strategies for actually opening and processing every document and secondarily building a collection using inadvisable selection formulas for views (namely, @Today). I don't generally do that [read] Keywords: domino ibm rich text xpages bug database java openntf
151


Platform Defensiveness
Fri, Jul 18th 2014 6:12p   Jesse Gallagher
If you were a Mac user in the 90s and early 2000s, life could be tough. Though you loved your platform of choice and could see its advantages plain as day, you were in a distinct minority. The world was full of people ready to line up to explain why you're an idiot on a sinking ship. And the part that stung was that they weren't always wrong: for every person talking out of their ass about how great having a menu bar in every window was or the joys of running ancient line-of-business DOS [read] Keywords: domino ibm notes notes client xpages apple community desktop exchange exchange google mac microsoft server
73


Building an App with the frostillic.us Framework, Part 4
Thu, Jul 17th 2014 1:12p   Jesse Gallagher
Define the data model Create the view and add it to an XPage Create the editing page Add validation and translation to the model Add notification to the model Add sorting to the view Basic servlet REST with Angular.js Add validation and translation to the model Now that we have a page to edit the model objects, it's time to spruce them up a bit by adding some type information, an additional field, and some basic translation. When we first set up the Note model, it didn't contain any infor [read] Keywords: domino xpages java properties sql
61


Building an App with the frostillic.us Framework, Part 3
Thu, Jul 17th 2014 12:12p   Jesse Gallagher
Define the data model Create the view and add it to an XPage Create the editing page Add validation and translation to the model Add notification to the model Add sorting to the view Basic servlet REST with Angular.js On the scale of "bog-standard" to "weird", the next phase of writing a frostillic.us Framework app sits in the middle: the basic steps of creating a model-editing page are pretty standard, but you can use unique aspects of the Framework to save a bunch of coding and add som [read] Keywords: domino ibm notes xpages dojo properties xml
124


Building an App with the frostillic.us Framework, Part 2
Fri, Jul 11th 2014 3:12p   Jesse Gallagher
Define the data model Create the view and add it to an XPage Create the editing page Add notification to the model Add sorting to the view Basic servlet REST with Angular.js The first stage of building a frostillic.us-Framework-based app was a bit unusual - focusing on creating a model object in Java - but the next phase is about as bog-standard as it gets: Create the view and add it to an XPage The view we'll need is a basic one showing all Notes. We'll name it "NotesAll" to match the [read] Keywords: notes xpages java




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