使用了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
时间: 2024-10-27 19:48:04