⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 newlist.jsp

📁 Web开发的基本框架
💻 JSP
字号:
<%@ taglib uri="/tags/web-list" prefix="list"%>
<%@ taglib uri="/tags/web-html" prefix="html"%>
<%@ taglib uri="/tags/web-i18n" prefix="web"%>
<%@ page contentType="text/html;charset=GBK" %>
<%@ page import="org.loushang.web.taglib.util.skin.SkinUtils"%>
<%@ page import="java.util.*"%>
<%@ page import="html.*"%>
<%@ page import="tree.*"%>
<%@ page import="org.loushang.web.taglib.util.Global"%>
<%
    Vector options = new Vector();
    options.add(new LabelValueBean("Label 0", "Value 0"));
    options.add(new LabelValueBean("Label 1", "Value 1"));
    options.add(new LabelValueBean("Label 2", "Value 2"));
    options.add(new LabelValueBean("Label 3", "Value 3"));
    options.add(new LabelValueBean("Label 4", "Value 4"));
    options.add(new LabelValueBean("Label 5", "Value 5"));
    options.add(new LabelValueBean("Label 6", "Value 6"));
    options.add(new LabelValueBean("Label 7", "Value 7"));
    options.add(new LabelValueBean("Label 8", "Value 8"));
    options.add(new LabelValueBean("Label 9", "Value 9"));
    request.setAttribute("options", options);  
    
	Map map = new HashMap();
	map.put("id","2");
	map.put("ids",new String[]{"2", "4"});
	map.put("name","web-html组件");
	map.put("code","Value 3");
	map.put("codes",new String[]{"Value 2", "Value 4","Value 6"});
	map.put("optionsCollection",options);
    request.setAttribute(Global.getString("html.data"), map); 
%>
<html>
<head>
<title>list</title>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<web:js src="list.js"/>
</head>
<table width="100%">
<tr>
<td><label class="title">list 组件</label></td>
<% String file=request.getServletPath().substring(1);
   String app=request.getContextPath();
%>
<td><label class="title">url:<%=file%></label></td>
<td align="right" valign="bottom" nowrap>&nbsp;[<a href="<%=app%>/src.jsp?target=<%=file %>" target="source">源代码</a>]&nbsp;</td>
</tr>
</table>
<hr>
<body scroll="auto">
<table>
<button onclick="alert(opc.getRightOptions());">右边</button>
<button onclick="alert(opc.getLeftOptions())">左边</button>
<button onclick="alert(opc.getRightOptionsValues());">右边value</button>
<button onclick="alert(opc.getLeftOptionsValues())">左边value</button>
<button onclick="alert(opc.getRightOptionsLabels());">右边label</button>
<button onclick="alert(opc.getLeftOptionsLabels())">左边label</button>
  <tr>
  <td>
        单选list组件(option):
        <list:pageToPage style="width:400" type="oneImg" id="ones" name="one">
        <list:left size="10" name="下拉条1" property="id" styleTd="align:center;width:40%" style="width:100%">
          <html:option value="1">新浪</html:option>
          <html:option value="2">搜狐</html:option>
          <html:option value="3">中国人</html:option>
          <html:option value="4">343</html:option>
          <html:option value="5">google</html:option>
          <html:option value="6">csdn</html:option>
        </list:left>
       <list:right size="10" name="下拉条2" styleTd="align:center;width:40%" style="width:100%" value="">
       </list:right>
       </list:pageToPage>
       </td>
       <td>
       多选list组件(option)
        <list:pageToPage style="width:400"  type="limitMoveRight"  id = "multis" name="multi">
        <list:left size="10" name="下拉条1" property="ids" multiple="true" styleTd="align:center;width:40%" style="width:100%">
          <html:option value="1">Chinese</html:option>
          <html:option value="2">Russian</html:option>
          <html:option value="3">American</html:option>
          <html:option value="4">French</html:option>
          <html:option value="5">korean</html:option>
          <html:option value="5">Spaniard</html:option>
        </list:left>
       <list:right size="10" name="下拉条2" multiple="true" styleTd="align:center;width:40%" value="" style="width:100%">
       <html:optionsCollection property="optionsCollection" label="label" value="value"/>
       </list:right>
       </list:pageToPage>
  </td>
  </tr>
  
   <tr>
  <td>
    单选list组件(options):
        <list:pageToPage style="width:400"  type="oneImg" name="op">
        <list:left size="10" name="下拉条1" property="codes" styleTd="align:center;width:40%" style="width:100%">
          <html:options collection="options" property="value" labelProperty="label"/>
        </list:left>
       <list:right size="10" name="下拉条2" styleTd="align:center;width:40%" value="" style="width:100%">
       </list:right>
       </list:pageToPage>
  </td>
  <td>       
    多选list组件(optionsCollection)
        <list:pageToPage style="width:400"  type="limitMoveLeft" name="opc">
        <list:left size="10" name="下拉条1" property="codes" multiple="true" styleTd="align:center;width:40%" style="width:100%">
          <html:optionsCollection property="optionsCollection" label="label" value="value"/>
        </list:left>
       <list:right size="10" name="下拉条2" multiple="true" styleTd="align:center;width:40%" value="" style="width:100%">
       <html:option value="1">Chinese</html:option>
       <html:option value="2">Russian</html:option>
       <html:option value="3">American</html:option>
       <html:option value="4">French</html:option>
       <html:option value="5">korean</html:option>
       <html:option value="5">Spaniard</html:option>
       </list:right>
       </list:pageToPage>
  </td>
  </tr>
 

</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -