class CompanyDataSource extends DataSource {
public CompanyDataSource(String id) {
setRecordXPath("/List/datasource");
setID(id);
DataSourceTextField companyName = new DataSourceTextField("screen",
"Screen");
companyName.setValueMap("Google", "EBW", "IBM");
DataSourceFloatField price = new DataSourceFloatField(
"screenInstance", "ScreenInstance");
price.setValueMap("10.5", "2.1", "9.8");
// price.setPrimaryKey(true);
setFields(companyName, price);
setDataURL("/datasource.data.xml");
}
}
这是我用来在ListGrid上显示两个组合框的DataSource。 虽然我使用硬编码值填充价格组合框但我打算动态选择companyName组合框值。
有没有办法处理companyName组合框值的选择?