views:

369

answers:

1

Hi

I'm using the dojo filtering select widget. I'm trying to customize the queryExpr. According to all forums/documentation, there are 4 types of expressions: - ${0} - find exact expression - ${0} - contains - ${0}* - starts with - *${0} - ends with

I'm trying to accomplish an auto-completion where any word starts with the typed in string. For example:

if I type "expr" the following suggestion will pop up "some expression".

The contains expression doesn't really do the job, because I don't want that suggestion to appear if I type "press" for example.

Does the queryExpr attribute accept regular expressions? If not, is there any way of achieving this?

Thank you!

A: 

The auto-completion functionality in dijit.form.FilteringSelect is derived from dijit.form.ComboBox.

You could extend dijit.form.ComboBox, override the _autoCompleteText() function, providing your custom implementation.

Finally, you could then create your own custom filtering select control that inherited from your custom combo box instead of the ComboBox.

Writing Custom Widgets Quickstart Guide

Abboq