361 Lotus blogs updated hourly. Who will post next? Home | Downloads | Events | Pods | Blogs | Search | myPL | About 
 
Latest 7 Posts
Last usage of a mail file - for all users
Fri, Nov 21st 2014 136
Providing user information in JSON
Thu, Nov 20th 2014 124
Building a shared approval frontend in XPages
Sun, Nov 16th 2014 207
Mustache Helper for Domino
Sun, Nov 16th 2014 203
Karma and Wealth
Sat, Nov 15th 2014 140
A peek in my JavaScript Toolbox
Fri, Nov 14th 2014 246
Custom experience for IBM Connections Cloud - Project Muse
Wed, Nov 12th 2014 132
Top 10
Domino Development - Back to Basics - Part 5: Finding data - Collections and Search
Thu, Jan 2nd 2014 332
A peek in my JavaScript Toolbox
Fri, Nov 14th 2014 246
Custom REST service in XPages using a service bean
Wed, Oct 22nd 2014 224
Building a shared approval frontend in XPages
Sun, Nov 16th 2014 207
Mustache Helper for Domino
Sun, Nov 16th 2014 203
Dear SingTel, please fix your routing performance!
Wed, Apr 24th 2013 167
Karma and Wealth
Sat, Nov 15th 2014 140
Last usage of a mail file - for all users
Fri, Nov 21st 2014 136
Custom experience for IBM Connections Cloud - Project Muse
Wed, Nov 12th 2014 132
Providing user information in JSON
Thu, Nov 20th 2014 124


Setting focus to the first invalid field
Stephan H Wissel    

When it comes to validation, the only secure way is server side validation (Client side validation is more: "nice suggestions for users"). One little grievance developers have - and try to fix with elaborate measures - is the requirement to set the focus on the first failed field. XPages makes this quite simple. As Tommy pointed out fields that are invalidated server side get the attribute aria-invalid="true".
Besides, as Tommy suggested, using it to style the input (check his comment - cool idea), you can use it to set the focus on the first invalid field. The key component is the dojo.query function. It allows all sorts of interesting queries, including for attributes. So add a simple Script block with this static value to your page:
XSP.addOnLoad(function() {
     var invalid = dojo.query("[aria-invalid=true]");
     if (invalid.length > 0) {
         invalid[0].focus();
     };
});
As usual YMMV

---------------------
http://feedproxy.google.com/~r/Wisselnet/~3/HVXB0Y3b1Q4/SHWL-8T5JSS
Apr 07, 2012
16 hits



Recent Blog Posts
136


Last usage of a mail file - for all users
Fri, Nov 21st 2014 8:18a   Stephan H Wissel
My admin is getting a little rusty. When I was asked: "How can I indentify a dormant mailbox?" I couldn't name a place in admin where to look. Of course, there is the NotesDatabase.LastModified property, but that would get updated on a design refresh too. So I asked innocently: "dormant, how?" After an amusing 2 hour discussion between the stake holders (only the popcorn was missing) we concluded that it is either No document has been created for a while (including incoming) No email has [read] Keywords: admin ibm lotusscript notes email
124


Providing user information in JSON
Thu, Nov 20th 2014 5:12a   Stephan H Wissel
In the MUSE project we encountered the need to retrieve user information in JSON format. Easy done one would think. The trouble starts, when you have multiple directories and you need reasonable speed. Sometimes falling back to @Fomulas gives you what you need, fast and easy. @NameLookup knows where to look and you don't need any extra configuration. A simple call to an form will give you all you need: https://yourserver/somedb.nsf/namelookup?Readform for yourself or add &User=John Doe for [read] Keywords: domino dxl ibm email
207


Building a shared approval frontend in XPages
Sun, Nov 16th 2014 8:18p   Stephan H Wissel
The saying goes: "God would not have been able to create the world in 7 days, if there would have been an installed base to take care of". As much as we wish to have divine powers, we need to make with less and look after an installed base. Point in case: You have a set of approval applications in classic Notes client code, like: Travel, Leave, Expenses, Gifts, Training, BoM changes etc. You are challenged to provide a web and/or mobile interface for them. Considering your options you have to [read] Keywords: lotusscript notes notes client policies xpages application applications development interface java mobile wiki
203


Mustache Helper for Domino
Sun, Nov 16th 2014 10:18a   Stephan H Wissel
Previously we had a look, how to use Mustache with the CKEditor to have an editing environment for templates. I glossed over the part where to store and how to use these templates. Let me continue there. I'll store the template in Notes documents and use an application managed bean to transform a document (and later other things) using these templates. I have 2 use cases in mind: one is to allow the configuration of HTML notification messages in applications and the other to configure the dis [read] Keywords: agent domino ibm notes xpages application applications database java xml
140


Karma and Wealth
Sat, Nov 15th 2014 11:19p   Stephan H Wissel
Karma has gotten some attention lately, while I muse it for some time. The common short explanation is "What goes around comes around" or in other words: "Every action (or inaction) you take has consequences, you ultimately will be confronted with". We are reminded by various spiritual traditions , that nothing good can come from a bad deed and that good deeds will yield (in mysterious ways, somewhen) good results. This is where the trouble starts. Our and the mystic perceptions what is "g [read] Keywords: wiki
246


A peek in my JavaScript Toolbox
Fri, Nov 14th 2014 5:19a   Stephan H Wissel
Every craftsman has a toolbox, except developers: we have many. For every type of challenge we use a different box. Here's a peek into my web front-end programming collection. It works with any of your favorite backends. In no specific order: AngularJS one of the popular data binding frameworks, created by Google engineers. With a focus on extensibility, testability and clear seperation of concerns it allows to build clean MVC style applications Data Driven Documents short: D3JS. If anything n [read] Keywords: ibm application applications community database eclipse google integration javascript server twitter wiki
132


Custom experience for IBM Connections Cloud - Project Muse
Wed, Nov 12th 2014 8:19a   Stephan H Wissel
The old saying goes: "You can't have your cake and eat it too". When organisations move computing from servers they control into a SaaS (the artist formerly known as ASP) environment, they swap customisability for configurability and standardisation. The idea is, that a vendor controlled cloud environment benefits from both the economy of scale as well as the frequent updates the claimed DevOps model brings. But you can have both. One of IBM's best secret are the assets that the IBM Softwar [read] Keywords: atlas collaboration connections ibm lotus application linkedin twitter wiki xml




107


LifeBEAM helmet first impressions
Wed, Nov 5th 2014 10:12a   Stephan H Wissel
After quite a wait (they were sold out) my LifeBEAM helmet arrived today. The helmet is based on a Lazer design. Here are my unpacking impressions: There are no experiments on the box. Black always has been the new black. [read] Keywords:
121


Enterprise architecture - from Silos to Layers
Wed, Nov 5th 2014 9:11a   Stephan H Wissel
In a recent discussion with a client the approaches and merits of Enterprise Architecture took center stage. IBM for a very long time proposed SOA (service oriented architecture) which today mostly gets implemented in a cloud stack. While it looks easy from high enough above, the devils is in the details. Mostly in the details how to get there. The client had an application landscape that was segmented along a full stack development platform with little or no interaction between the segments or [read] Keywords: ibm notes application applications development enterprise sap soa wiki
224


Custom REST service in XPages using a service bean
Wed, Oct 22nd 2014 6:11a   Stephan H Wissel
Talking to your backend using JSON and REST is all the rage for contemporary development. Domino has supported, at least reading, this access for quite a while using ?ReadViewEntries[&OutputFormat=JSON]. Using Domino Access Services (DAS) this has been extended to read/write support for documents as well. However, as a result, your front-end application now needs to deal with the Domino way to present data, especially the odd use of @ in JSON keys (which e.g. jquery isn't fond of). [read] Keywords: domino ibm ldd lotus xpages application database development javascript openntf wiki xml




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