Opened 15 years ago

Closed 14 years ago

Last modified 14 years ago

#3169 closed task (fixed)

refactor interface to AutoCompleterMenu

Reported by: bill Owned by: haysmark
Priority: high Milestone: 0.9
Component: Dijit Version: 0.9
Keywords: Cc: [email protected]
Blocked By: Blocking:


As per notes in Autocompleter.js:

I'd like the interface to AutoCompleterMenu? to be higher level, taking a list of items to initialize it, and returns the selected item

new _AutoCompleterMenu({
        items: /*[]*/ items,
        labelFunc: dojo.hitc(this, "_makeLabel"),
        onSelectItem: dojo.hitch(this, "_itemSelected")

(This is dependent on NOT having a global widget for this, but rather creating it on the fly, as per discussion with Bill, Adam, and Mark)

It should also have a method like handleKey(evt) that takes a keystroke the <input> received and handles it.

Also, shouldn't inherit from FormElement? since it isn't a form element.

Change History (3)

comment:1 Changed 15 years ago by haysmark

Cc: [email protected] added
Status: newassigned

Because this ticket is so closely tied to data pagination UI issues, I'm going to use this ticket to document James's data pagination request.

As part of James's request, I moved the menu population code out of ComboBox? and into the menu. This gives the access to the menu a much higher-level look.

Also in light of James's request, I'm not sure we should be instantiating new menus every time fetch calls the callback function, which the above code sample suggests with its items argument. Maintaining menu state is actually useful in the case of data pagination because it enables the menu to remember where it is in the search results, further encapsulating behavior inside the menu.

I've gone ahead and implemented data pagination in ComboBox?, without changing the public ComboBox? API. The pagination code works, now it is just a matter of agreeing on the menu UI. Per James's suggestion, I hardcoded Previous and Next buttons inline with the rest of the menu items just to test the pagination. Is this the best UI solution? I don't know, but it seems to make sense in the context of ComboBox?'s existing a11y.

comment:2 Changed 14 years ago by bill

Resolution: fixed
Status: assignedclosed

(In [9924]) Add paging to Combobox drop down list (in case many values are returned). Fixes #3169.

Patch from Mark Hays (IBM, CCLA on file)

comment:3 Changed 14 years ago by Douglas Hays

(In [9927]) References #3169. Remove extraneous comma from nls file.

Note: See TracTickets for help on using tickets.