dxy1999
发贴: 32
积分: 20
|
于 2003-08-04 20:44
组合框的实现 Action: ArrayList list = new ArrayList();
list.add(0, new LabelValueBean("China", "000")); list.add(0, new LabelValueBean("Japan", "001"));
instance.setCboNewsML_list(list);
request.setAttribute("response", instance);
JavaBean:
private ArrayList cboNewsML_list = null; public ArrayList getCboNewsML_list() { return cboNewsML_list; } public void setCboNewsML_list(ArrayList cboNewsML_list) { this.cboNewsML_list = cboNewsML_list; }
JSP: <bean:define id = "NewsML" name="response" property="cboNewsML_list"/> <html:select property="cboNewsML" onchange="changeNewsML()"> <html:options collection="NewsML" property="value" labelProperty="label"/> </html:select>
dxy1999 edited on 2003-08-05 09:32
|