Ticket #5487 (new defect)

Opened 6 months ago

Last modified 3 months ago

ComboBox: using a value that isn't the display label is too hard

Reported by: alex Owned by: alex
Priority: normal Milestone: 1.2
Component: Dijit Version: 0.9
Severity: normal Keywords:
Cc: kurund

Description (last modified by bill) (diff)

there are some issues with the behavior of the ComboBox WRT it's similarity to the <select> tag. It's not clear today how to set the value such that it's different from the option label.

Change History

Changed 6 months ago by kurund

  • cc kurund added

Changed 6 months ago by alex

to clarify, there are cases when the behavior of FilteringSelect? (minus insistence on an existing value) is preferable to that of ComboBox?, which has no valueNode. It may be the case that you want to spot users the ability to select from one of the available options, and if what they are entering isn't in that list, check with the server manually.

It's probably possible to do this with a hack on FilteringSelect? today, but ISTM that it's more in-line with the UI design goal of ComboBox?.

Changed 6 months ago by alex

(In [11933]) trying to bring FilteringSelect? and ComboBox? up to the style guide and make them readable. Refs #5487

Changed 6 months ago by alex

so it looks like the workaround is to do something to change the way FIlteringSelect handles valid and invalid items. For instance:

<select dojoType="dijit.form.FilteringSelect" name="state" id="state">
    <script type="dojo/method" event="isValid">
        if(this._isvalid){
            return true;
        }
        // otherwise check the value against the server (via ajax?) here
    </script>
    <option value="AL">Alabama</option>
    <option value="AK">Alaska</option>
    ...
</select>

Changed 3 months ago by bill

  • summary changed from using a value in a ComboBox that isn't the display label is too hard to ComboBox: using a value that isn't the display label is too hard
  • component changed from General to Dijit
  • description modified (diff)
  • milestone changed from 1.1 to 1.2

Move all milestone 1.1 tickets to 1.2, except for reopened tickets and tickets opened after 1.1RC1 was released.

I'm not sure what this ticket is about, exactly (the title & description seem unrelated to the comments) but if you have a patch, run it by me and maybe we can add it to the code base. I need to review it first though, before adding any functionality to ComboBox.

Note: See TracTickets for help on using tickets.