JeeCG - <t:choose/> 标签用法 输入框控件 查询输入
Posted 廿二又
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了JeeCG - <t:choose/> 标签用法 输入框控件 查询输入相关的知识,希望对你有一定的参考价值。
页面
<td class="value">
<!-- <input id="mateCode" name="mateCode" type="text" maxlength="32" style="width: 150px" class="inputxt" datatype="*" ignore="checked" />
<span class="Validform_checktip"></span>
<label class="Validform_label" style="display: none;">物料编码</label> -->
<input id="mateCode" name="mateCode" type="hidden" value="$id"/>
<input name="mateName" id="mateName" class="inputxt" value="$mateName " readonly="readonly" datatype="*" />
<t:choose hiddenName="mateCode" hiddenid="id" textname="mateName" url="jysBomBodyController.do?mateList" name="mateList" icon="icon-search" title="物料列表" isclear="true" isInit="true"></t:choose>
<span class="Validform_checktip">物料编码</span>
</td>
涉及的后台方法
//====================ADD or UPDATE 页 选择框查询 t:choose 标签用法 S=====================================
/**
* BOM选择 物料 跳转页面
* @return
*/
@RequestMapping(params = "mateList")
public ModelAndView roles(HttpServletRequest request)
//编辑BOM,选择物料,弹出的物料列表页面,默认没选中
ModelAndView mv = new ModelAndView("com/jeecg/jysbombody/mateList");
String ids = oConvertUtils.getString(request.getParameter("ids"));
mv.addObject("ids", ids);
return mv;
/**
* 物料显示列表
* @param request
* @param response
* @param dataGrid
*/
@RequestMapping(params = "datagridMate")
public void datagridRole(TSRole tsRole, HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid)
List<Map<String, Object>> data = new ArrayList<Map<String, Object>>();
Object object = cacheService.get(CacheServiceI.NC_MATE_CACHE, ResourceUtil.NC_MATE_CACHE_KEY);
if(object!=null)
data = (List<Map<String, Object>>) object;
List<Map<String, Object>> showList = null;//要显示的数据
int showLen = dataGrid.getRows();//动态得到前端需要显示多少条
int totlePage = data.size()%showLen == 0 ? data.size()/showLen : data.size()/showLen + 1;
if(dataGrid.getPage() == 1 )
if(showLen > data.size())
showLen = data.size();
showList = data.subList(0, showLen);
else
if(dataGrid.getPage() == totlePage)
showList = data.subList(((dataGrid.getPage()-1)*showLen),data.size());
else
showList = data.subList(((dataGrid.getPage()-1)*showLen),((dataGrid.getPage()-1)*showLen)+showLen);
dataGrid.setResults(showList);
dataGrid.setTotal(data.size());//总条数
TagUtil.datagrid(response, dataGrid);
//====================ADD or UPDATE 页 选择框查询 t:choose 标签用法 E=====================================
选择页面查询
以上是关于JeeCG - <t:choose/> 标签用法 输入框控件 查询输入的主要内容,如果未能解决你的问题,请参考以下文章