It's not directly available on the field. If you select the <typeAhead>-node in the source, you will get an "All properties" view for the Type Ahead component. Under data, you can set the var property.
If you, like me, like modifying source-code better, add a var attribute to the typeAhead node.
In the suggestions-code, you can now do:
@DbLookup( [ @DbName()[0], 'database.nsf' ], '(lupView)', lupKey, 1, '[PARTIALMATCH]' )
Another tip: Although you can compute Type Ahead on and off in the field, after the field loses focus, it looks like Type Ahead is always enabled. If you select the <typeAhead>-node, you can modify the rendered property (enables/disables type-ahead).
7 comments:
Do you know how to get multiple values with this typeahead. Like if i want to choose 4 persons in sendto field.
I'm not aware of any way to do this out of the box.
The closest you'll get with out of the box functionality is putting a button next to the type ahead field, that adds the selected person (the value of the type ahead field) to the SendTo field (remember to validate the name).
Great tip, Tommy!
Do you know if it's possible to do return a partial match not only at the beginning of the column value?
E.g, a search for "John" should return a match for the entry "John Anderson", but also for the entry "Andy Johnson".
As far as I know, XPages type-ahead suggestions are limited to value*, so *value* won't work.
True, Tommy!
Managed to created the "*value*" search by doing some hacking on my own! Will post the details after Easter, if anyone's interested!
Great! I look forward to it :)
As promised, better late than never:
http://devxpages.blogspot.com/2010/04/extending-xpages-type-ahead.html
Feel free to add a comment, if you like!
Post a Comment