下面的響應來自Struts2的對象響應,我必須將它們填充到s:select標籤列表中。s:選擇填充ajax響應
{"items":[{"label":"BAD CIRCUIT/POOR CONNECTION","key":1100009028300},{"label":"CRACK","key":1100009028340},{"label":"HIGH PRESSURE","key":1100009028260},{"label":"HIGH TEMPERATURE","key":1100009028380},{"label":"LACK OF POWER/NO DRIVE","key":1100009028280},{"label":"LEAKED","key":1100009028220},{"label":"LOOSE","key":1100009028320},{"label":"LOW PRESSURE","key":1100009028240},{"label":"MISSING OR INCOMPLETE","key":1100009028600},{"label":"PITTED/ERODED","key":1100009028360}],"identifier":"key"}
<s:select id="faultFound"
list="#{}" name="faultFoundName" listKey="key" listValue = "label" emptyOption="true"
value="%{destination.key.toString()}"
/>
這是對我的類似問題。但我需要把列表放在s中:由dojo選擇。 spring3mvcportlet populate JSON dojo select
_onchange ajax_是什麼意思? –
onchange autocompleter我解僱了ajax請求。 – user533
顯示代碼,因爲我不明白你在說什麼。 –