mirror of
https://github.com/apache/struts.git
synced 2026-08-31 19:35:40 +00:00
Keep backward compatibility for setSelectedValue() javascript function on autocompleter tag
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@543909 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
+11
-7
@@ -494,13 +494,17 @@ dojo.widget.defineWidget(
|
||||
},
|
||||
|
||||
setSelectedValue : function(text) {
|
||||
var data = this.dataProvider.data;
|
||||
for(element in data) {
|
||||
var obj = data[element];
|
||||
if(obj[0].toString() == text) {
|
||||
this.setValue(obj[0].toString());
|
||||
this.comboBoxSelectionValue.value = obj[1].toString();
|
||||
}
|
||||
if(this.dataProvider) {
|
||||
var data = this.dataProvider.data;
|
||||
for(element in data) {
|
||||
var obj = data[element];
|
||||
if(obj[0].toString() == text) {
|
||||
this.setValue(obj[0].toString());
|
||||
this.comboBoxSelectionValue.value = obj[1].toString();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.comboBoxSelectionValue.value = text;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user