gigaZhang / struts2-jquery

Automatically exported from code.google.com/p/struts2-jquery
0 stars 0 forks source link

value is not preselected with sj:select and autocomplete=true #1125

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
(This is for feature requests and bugs in Struts2 jQuery Plugin - for
getting help, please use the User Group.
http://groups.google.com/group/struts2-jquery )

What steps will reproduce the problem?
1. Create a sj:select with a json call and autocomplete option set to true

        <s:url id="institutionUrl" action="institution/jsongrid"/>

    <sj:select
        autocomplete="true"
        selectBoxIcon="true"            
        label="Institution" 
        value="selectedInstitutionId"
            title="Choose an institution"
            href="%{institutionUrl}"
            id="selectId"
            name="institution"
            list="gridModel"
            listKey="id"
            listValue="category"
            reloadTopics="reloadInstitution"
    />

What is the expected output? What do you see instead?
The item represented by "selectedInstitutionId" is not preselected. However, if 
I remove autocomplete="true", the list shows the preselected item.

Which struts2 version?
2.3.16.3

Which struts2-jquery plugin version?
3.7.1

Please provide any additional information below.

Original issue reported on code.google.com by kenf...@gmail.com on 15 Dec 2014 at 3:33

GoogleCodeExporter commented 9 years ago
My bad. I wrongly set the listValue attribute and this is why the list did not 
display the selected value.

My problem is solved.

Original comment by kenf...@gmail.com on 20 Dec 2014 at 7:44