标签的引入和beandefine的用法
2007-10-30 19:28
288 查看
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib prefix="html" uri="/WEB-INF/struts-html.tld" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<html:html xhtml="true" lang="true">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Multibox Example</title>
<html:base />
<link rel="stylesheet" type="text/css" href="../../css/example.css" />
</head>
<body>
<html:link page="/jsp/multibox/source.jsp">
<img src="../../images/code.gif" width="24" height="24" alt="View Source" class="icon" />
</html:link>
<a href="../../index.jsp"><img src="../../images/return.gif" height="24" width="24" alt="Return to examples page" class="icon" /></a>
<h1>Multibox Example</h1>
<hr noshade="noshade"/>
<html:form action="/processMultibox">
<bean:define id="tabInitId" value="5"></bean:define>
<bean:define id="maxTabIndex" value="0"></bean:define>
<logic:iterate name="colors" id="color" indexId="indexId">
<html:multibox property="colors" tabindex="<%=Integer.toString(Integer.valueOf(tabInitId)+8*indexId.intValue()) %>">
<bean:write name="color" />
</html:multibox>
<bean:write name="color" /><br />
<% maxTabIndex = Integer.toString((indexId+1)*8); %>
</logic:iterate>
<hr />
<p>
<html:multibox property="fruits" value="Pineapples" tabindex="<%=Integer.toString(Integer.valueOf(maxTabIndex))%>"/>Pineapple<br />
<html:submit />
<html:cancel />
<html:reset />
</p>
</html:form>
</body>
</html:html>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib prefix="html" uri="/WEB-INF/struts-html.tld" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<html:html xhtml="true" lang="true">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Multibox Example</title>
<html:base />
<link rel="stylesheet" type="text/css" href="../../css/example.css" />
</head>
<body>
<html:link page="/jsp/multibox/source.jsp">
<img src="../../images/code.gif" width="24" height="24" alt="View Source" class="icon" />
</html:link>
<a href="../../index.jsp"><img src="../../images/return.gif" height="24" width="24" alt="Return to examples page" class="icon" /></a>
<h1>Multibox Example</h1>
<hr noshade="noshade"/>
<html:form action="/processMultibox">
<bean:define id="tabInitId" value="5"></bean:define>
<bean:define id="maxTabIndex" value="0"></bean:define>
<logic:iterate name="colors" id="color" indexId="indexId">
<html:multibox property="colors" tabindex="<%=Integer.toString(Integer.valueOf(tabInitId)+8*indexId.intValue()) %>">
<bean:write name="color" />
</html:multibox>
<bean:write name="color" /><br />
<% maxTabIndex = Integer.toString((indexId+1)*8); %>
</logic:iterate>
<hr />
<p>
<html:multibox property="fruits" value="Pineapples" tabindex="<%=Integer.toString(Integer.valueOf(maxTabIndex))%>"/>Pineapple<br />
<html:submit />
<html:cancel />
<html:reset />
</p>
</html:form>
</body>
</html:html>
相关文章推荐
- Struts bean:define标签用法
- Struts bean:define标签用法
- Struts bean:define标签用法
- Struts bean:define标签用法
- Struts bean:define标签用法
- JSP_Struts标签 bean:write基本用法
- bean:define标签
- struts标签之bean:write用法
- struts标签bean:define
- struts标签之bean:write用法
- Struts2的bean标签用法
- 引入js文件标签中的属性for ,event 用法
- Struts 2中<s:bean>标签的用法
- bean:message的用法 以及标签的使用
- struts标签之bean:write用法
- struts标签bean:write的用法
- struts标签bean:define
- struts的bean标签用法
- struts标签之bean:write用法
- bean:define标签