我有一个表格,其中有 AutoCompleteTextField 和两个组合框(检票口中的 DropDowns)。
当显示自动完成下拉菜单时,组合框在 IE6 中隐藏。
我的测试页代码是:
package net.betlista;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
import org.apache.wicket.Session;
import org.apache.wicket.extensions.ajax.markup.html.autocomplete.AutoCompleteTextField;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.model.Model;
public class AutoCompleteAndDropDownTestPage extends WebPage {
public AutoCompleteAndDropDownTestPage() {
final DropDownChoice<Integer> drop1 = new DropDownChoice<Integer>("drop1", getNewList(15));
drop1.setOutputMarkupId(true);
final DropDownChoice<Integer> drop2 = new DropDownChoice<Integer>("drop2", getNewList(10));
drop2.setOutputMarkupId(true);
Session.get().setLocale(Locale.ENGLISH);
final AutoCompleteTextField<Integer> auto = new AutoCompleteTextField<Integer>("auto", new Model<Integer>(null)) {
@Override
protected Iterator<Integer> getChoices(final String input) {
return getNewList(20).iterator();
}
};
add(auto);
add(drop1);
add(drop2);
add(new TextField<String>("text"));
}
private static List<Integer> getNewList(final int upTo) {
final LinkedList<Integer> list = new LinkedList<Integer>();
for (int i = 0; i < upTo; i++) {
list.add(i);
}
return list;
}
}
测试页标记是
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<form>
<input type="text" wicket:id="auto"/><br>
<select wicket:id="drop1"></select><br>
<select wicket:id="drop2"></select><br>
<input type="text" wicket:id="text"/><br>
</form>
</body>
</html>
Wicket 不支持 IE6,所以我正在寻找解决方法。