Opened 7 years ago

Closed 7 years ago

#16932 closed defect (fixed)

InlineEditBox: cannot set default value for dijit/form/Select editor

Reported by: Eric Martin Owned by:
Priority: undecided Milestone: 1.8.4
Component: Dijit Version: 1.8.3
Keywords: Cc:
Blocked By: Blocking:

Description

I am unable to set the default selected item for the Select editor on the InlineEditBox?. I have tried setting it through the value of the InlineEditBox? and the editor parameters. I have tried setting the option attribute selected=true and selected="selected". The value of the InlineEditBox? is correct, but when I activate it the Select editor has the first option selected instead of the one I have set by default.

Attachments (2)

inlineeditboxerror.txt (320 bytes) - added by Eric Martin 7 years ago.
HTML to replicate issue
test.htm (1.0 KB) - added by Eric Martin 7 years ago.
HTML file replicating error

Download all attachments as: .zip

Change History (7)

Changed 7 years ago by Eric Martin

Attachment: inlineeditboxerror.txt added

HTML to replicate issue

comment:1 Changed 7 years ago by bill

Component: GeneralDijit
Resolution: invalid
Status: newclosed

The problem is that the value of your InlineEditBox does not exist in the Select.

It should be something like:

1	<span data-dojo-type="dijit/InlineEditBox"
2	        data-dojo-props="
3	                id: 'userTypeEditor',
4	                editor:'dijit/form/Select',
5	                editorParams:
6	                {
7	                        id: 'userType',
8	                        options: [ { label: 'Client User', value: '0' }, { label: 'Client Admin', value: '1' } ],
9	                        displayedValue: 'label'
10	                }"
11	        >Client Admin</span>

comment:2 Changed 7 years ago by Eric Martin

Sorry, in my code I had set the value of userTypeEditor dynamically to 'Client Admin'. I tried copying your code exactly and it still does not work. I have attached a test.htm file using the suggested code above which does not work. Please advise. Opened case #16942.

Last edited 7 years ago by Eric Martin (previous) (diff)

Changed 7 years ago by Eric Martin

Attachment: test.htm added

HTML file replicating error

comment:3 Changed 7 years ago by bill

Resolution: invalid
Status: closedreopened
Summary: dijit/InlineEditBox cannot set default value for dijit/form/Select editorInlineEditBox: cannot set default value for dijit/form/Select editor

OK I'll take a look.

comment:4 Changed 7 years ago by bill

#16940 is a duplicate of this ticket.

comment:5 Changed 7 years ago by bill

Milestone: tbd1.8.4
Resolution: fixed
Status: reopenedclosed

OK, actually it's already fixed by [30568]. Also, your test case is missing a call to dojo.ready() or dojo/domReady! but that's not the cause of the failure.

Note: See TracTickets for help on using tickets.