下拉框

<select sf_type="SF_ComboBox" id="PROVINCES" name="PROVINCEID" nullText="请选择" textField="PNAME" valueField="PROVINCEID"></select>

sf_type :下拉框类型

id:model 赋值

name :bean属性名  对应sql语句

textField :展示字段

valueField :下拉框提交赋值

 

 

protected void toList_bind(HttpServletRequest request, ModelMap modelMap,FormSource source, SFObject mainEntity, ModuleService service) throws Exception {
SH_PROVINCEService sh_provinceService = IocFactory.instance(SH_PROVINCEService.class);
SH_CITIESService sh_citiesService = this.createService();
SH_CITIES sh_cities = this.bean(request, SH_CITIES.class,false);

source.add("PROVINCES", sh_provinceService.beans(new SH_PROVINCE()));
source.add("CITIESS", sh_citiesService.beans(sh_cities));
}

 

 

 

 

树型绑定source.add("SF_USERS_DEP_ID", sf_DepartmentService.beans_comb( new SF_DEPARTMENT() ) );

posted @ 2018-09-29 11:45  剑小新  阅读(114)  评论(0编辑  收藏  举报