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 Domino Directory Type ahead | Home Page| XPages development helps in other places too... »

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


Comments

ID: 1
Date: 07/25/2009 04:44:51 PM
Name: Paul T Calhoun
Website: http://www.nnsu.com

I'm not sure I'm understand the requirement, so I'm restating it.

In edit mode users should be able to select multiple values using type ahead.

In read mode those selected values should be displayed on a single line, but not separated by a comma.

How do you want the separated then to distinguish the different values?

Let me know as I spent ALOT of time making the type ahead stuff work.

ID: 2
Date: 07/25/2009 05:23:24 PM
Name: Keith Strickland
Website: http://www.keithstric.com

Thanks Paul, I'm wanting the field with type ahead to display multiple values separated by a new line in both read and edit mode. I'm able to do that in read mode, but not edit mode. In edit mode I can only get it to be separated by a comma.

ID: 3
Date: 07/27/2009 11:50:00 AM
Name: Paul T Calhoun
Website: http://www.nnsu.com

Keith,

I experimented with this and my results seem to be the same as yours. It seems to be a limitation of the edit box control not to be able to accept new lines in Edit mode.
Two suggestions (though you probably already thought of these) is
1. Use the same trick we use in Domino Development, one control for edit mode and one control for read mode. Still doesn't solve the list in edit mode.
2. Possibly use a dojo control instead of the included controls from the palette.

Sorry I couldn't be more help.

Paul T. Calhoun

Post A Comment

:-D:-o:-p:-(:-):-\:-|:angry::cool::cry::dontknow::emb::hairout::laugh::rolleyes::whew:;-)

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.