Hosted By

Contact Me

Misc Links

OpenNTF BlogSphere LotusGeek CoComment Custom Button

Ads by Google

Welcome to keithstric.com!

I hope you find this site useful in some way or another. I strive to bring you all sorts of geeky information and solutions to your most frustrating of issues with the occasional rant on whatever topic, technical reviews and weblog. You'll also find many products that I've developed and make available for you to use however you like. So, grab a cup of coffee, sit down and visit for a while.

XPages Type Ahead and Multiple Values frustration

07/25/2009 1:22 PM By Keith Strickland

Here's the scenario. I've got an edit box which holds multiple names, when the page is in read mode I can display those names separated by a new line "\n". However, I'm wanting to use the type ahead functionality to pick multiple names, which isn't a problem. The problem is I can't figure out how to get the names selected from the picker to show in the field separated by anything other than a comma and all on one line, which makes it impossible to see what values are in the field. I've tried the Multilne Edit Box but you can't use type ahead functionality with that control. I've tried all different kinds of things with the Suggestions Separator and Client Separator properties, the edit box's multipleSeparator property and using some javascript to change how it displays, the only result I get is that the type ahead stops working, there are no errors just no type ahead.

Don't get me wrong here, I've totally enjoyed delving into XPages, but it's little things lke this that really frustrate me. Something that is so polished and fairly easy to get used to there seems to always be these little gotcha moments along the way

Rant off


XPages Domino Directory Type ahead

07/22/2009 8:38 PM By Keith Strickland

As I said earlier, I've been delving into XPages here lately and found the cool "Type Ahead" properties of an editable field. This is so easy to implement and comes out looking nice to boot. To add a name picker to your application follow these procedures. Now I'm sure there are other ways to accomplish the same thing, but this is pretty darn easy.

Go to one of your name fields and in the properties select the "Type Ahead" entry. Check the "Enable Type Ahead" check box. Add the proper separators and click the blue diamond next to Suggestions and pick "Compute Value". In the resulting javascript editor put the following code and click OK:

var dbname = new Array(@Subset(@DbName(), 1),"names.nsf");
return @DbColumn(dbname,"($VIMPeopleAndGroups)",2);
You should end up with something like this:

2009-07-22_2042.jpg

Now save the page and visit the page in your browser, start typing LocalDomain and you should see the selections show up below the field. Like I said, easy peasy.

2009-07-22_2044.jpg

XPages experience and resources

07/19/2009 9:24 AM By Keith Strickland

I've recently started messing with XPages and I think I like it. Now there is a rather steep learning curve for XPages, especially if your web development hat is as dusty as mine. I even had to bust out the "Beginning JavaScript" book by Paul Wilton (which is an excellent JavaScript reference). But learning them is certainly doable, and quite fun (in a geek sort-of way). But this trek started with an OpenSource project I've been working on which I mentioned a little over a month ago. I want a web gui to go with the project so I figured it was the perfect excuse to delve into XPages head first.

My first impression with XPages seems to be pretty good, it's easily implemented, looks nice and easily compartmentalized (is that a word?). As I said above the learning curve is pretty steep and when using the @Functions it is easy to make a mistake, since those are now serverside JavaScript it is case sensitive. I've also noticed any bad habits you have with using LotusScript and @Formulas that those bad habits really come back to bite you as you try to use that knowledge in the XPages world. As for all the controls, it seems that everything I've needed has been there in some form or fashion. My biggest issue so far has been trying to figure out how to use a checkbox. In the notes client a checkbox is a multi-value field with each value being a checked checkbox, in XPages they are individual elements and a field with values already there doesn't seem to translate over, at least I haven't been able to figure out a way yet, but I'm sure it's there somewhere. Radio buttons are similar but a little easier to figure out.

But something that has provided A LOT of help is the excellent XPages tutorial over on Declan Lynch 's site. This is a great reasource to get you moving in the right direction. Thanks Declan! Interestingly enough though there is no mention of how to use Check Boxes or radio buttons in this tutorial or any of the other tuturials I've come across.

Some other resources I've found are listed below:

I guess the biggest complaint I've had with this process is the quirks of the 8.5 designer. The double-clicking to open a design element is killing me. Also, sometimes it takes 4 clicks to get a group of design elements (say XPages) to open and show the XPages in that group. I know that isn't a very good description of what I'm talking about. But hopefully the resource list above will get you on your way to starting XPages. I am by no means really knowledgeable enough to really speak about XPages in any way other than my experiences so far, but this trek should be something new and interesting and produce some really nice applications. Plus it seems that this is really the next logical step for Domino development.


Subscribe to keithstric.com

OpenNTF

Disclaimer

The opinions and ideas posted on keithstric.com are not necessarily the opinions and ideas of my employer. The solutions, techniques and code provided here are not guaranteed or warranted in any way and are free for you to use at your own risk.