信息选择和详情查看
成员属性 | 必填 | 作用说名 |
sf_ds_user | 是 | 对于div的id |
选择用户 | 否 | 页面标题 |
500,300 | 否 | 弹窗的宽度和高度 默认(750,350) |
selectUrl | 是 | 选择窗的页面URL 需要自己写 |
detailUrl | 是 | 详情窗的页面 需要自己写 |
cellLength | 否 | 文本的宽度 超过部分以...代替 (例如,cellLength=1 东方明 变为 东...) |
cellwidth | 否 | 文本的总宽度 |
SF_DS_DATA_sf_ds_user | 不需要写 | 该隐藏域保存用户id的集合,以逗号给开 格式为SF_DS_DATA_ 拼接 div的id |
<tr> <td>示例一:没有初始值</td> <td colspan="2"><input type="button" onClick="SF_DetailSelector.toSelect('sf_ds_user','选择用户',500,300)" value="选择" /> <div id="sf_ds_user" selectUrl="${sfroot}/sf_js_api/tag/toSelect.do" data="" detailUrl="${sfroot}/sf_js_api/tag/toDetail.do?ID=" cellLength="4" cellwidth="100"></div></td> </tr> <tr> <td>示例二:带有初始值</td> <td colspan="2"><input type="button" value="选择" /> <div id="sf_ds_user1" selectUrl="${sfroot}/sf_js_api/tag/toSelect.do" data="1:admin" detailUrl="${sfroot}/sf_js_api/tag/toDetail.do?ID=" cellLength="4" cellwidth="60"></div></td> </tr>
<tr>
<td class="sf_w15 sf_td_l_bg sf_ar">登录名:</td>
<td class="sf_w35" id="SF_USERS_LNAME"></td>
<td class="sf_w15 sf_td_l_bg sf_ar">姓名:</td>
<td class="sf_w35" id="SF_USERS_UNAME" sf_modul="1"></td>
</tr>
@RequestMapping("toDetailselector.do") public ModelAndView toDetailselector(HttpServletRequest request,HttpServletResponse response, ModelMap modelMap) { return new ModelAndView( this.getActionPath("detailselector"), modelMap ); } @RequestMapping("toSelect.do") public ModelAndView toSelect(HttpServletRequest request,HttpServletResponse response, ModelMap modelMap) { FormSource source = this.source(request); TagService service = this.createService(); try { List<?> list = service.beans(new SF_USERS());//查询所有用户信息 source.add("SF_USERS",list); source.put(modelMap); } catch (Exception e) { this.logger.error(e); } return new ModelAndView( this.getActionPath("detailselector_select"), modelMap ); } @RequestMapping("toDetail.do") public ModelAndView toDetail(HttpServletRequest request,HttpServletResponse response, ModelMap modelMap) { FormSource source = this.source(request); SF_USERS user = this.bean(request, SF_USERS.class,false); TagService service = this.createService(); try { user = service.bean(user);//查询用户信息 绑定到详情页面 source.add(user); source.put(modelMap); } catch (Exception e) { this.logger.error(e); } return new ModelAndView( this.getActionPath("detailselector_detail"), modelMap ); }