标签:tag
使用了easyui的样式封装的下拉框标签:
<%@ tag language="java" pageEncoding="utf-8"%> <%@ tag import="com.cseds.common.dic.DicHolder" %> <%@ tag import="com.cseds.common.dic.Dics" %> <%@ tag import="com.cseds.system.dto.DataDictionaryDTO" %> <%@ tag import="java.util.List" %> <%@ attribute name="id" required="true" rtexprvalue="true" %> <%@ attribute name="name" required="true" rtexprvalue="true" %> <%@ attribute name="required" required="false" rtexprvalue="true" %> <%@ attribute name="width" required="false" rtexprvalue="true" %> <%@ attribute name="type" required="true" rtexprvalue="true" %> <%@ attribute name="readonly" required="false" rtexprvalue="true" %> <select class="easyui-validatebox easyui-combobox" style="width:<%=width%>" <%=readonly %> data-options="editable:false,required:<%=required%>" id="<%=id%>" name="<%=name%>"> <% Dics dics = DicHolder.getDicsByType(type); List<DataDictionaryDTO> list = dics.getAllDicList(); if(required.equals("false")){ %> <option value="-1">--请选择--</option> <% } for(DataDictionaryDTO dto : list) { %> <option value="<%=dto.getDictData_Value() %>"><%=dto.getName()%></option> <% } %> </select> <br>
调用方式:
<%@ taglib prefix="mx" tagdir="/WEB-INF/tags"%> <mx:cb_dic id="insresult" name="insresult" required="false" width="200px" type="INSRESULT" readonly="readonly=‘true‘" />
参考:http://blog.csdn.net/hongweigg/article/details/12006849
http://zhangxing119.iteye.com/blog/1919548
本文出自 “java程序猿的博客” 博客,请务必保留此出处http://chengxuyuan.blog.51cto.com/5789198/1787170
标签:tag
原文地址:http://chengxuyuan.blog.51cto.com/5789198/1787170