/*
* $Header: /home/cvs/jakarta-struts/src/exercise-taglib/org/apache/struts/webapp/exercise/TestBean.java,v 1.8 2002/10/12 19:21:18 martinc Exp $
* $Revision: 1.8 $
* $Date: 2002/10/12 19:21:18 $
*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Struts", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.struts.webapp.exercise;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Vector;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.util.LabelValueBean;
/**
* General purpose test bean for Struts custom tag tests.
*
* @author Craig R. McClanahan
* @author Martin F N Cooper
* @version $Revision: 1.8 $ $Date: 2002/10/12 19:21:18 $
*/
public class TestBean extends ActionForm {
// ------------------------------------------------------------- Properties
/**
* A collection property where the elements of the collection are
* of type <code>LabelValueBean</code>.
*/
private Collection beanCollection = null;
public Collection getBeanCollection() {
if (beanCollection == null) {
Vector entries = new Vector(10);
entries.add(new LabelValueBean("Label 0", "Value 0"));
entries.add(new LabelValueBean("Label 1", "Value 1"));
entries.add(new LabelValueBean("Label 2", "Value 2"));
entries.add(new LabelValueBean("Label 3", "Value 3"));
entries.add(new LabelValueBean("Label 4", "Value 4"));
entries.add(new LabelValueBean("Label 5", "Value 5"));
entries.add(new LabelValueBean("Label 6", "Value 6"));
entries.add(new LabelValueBean("Label 7", "Value 7"));
entries.add(new LabelValueBean("Label 8", "Value 8"));
entries.add(new LabelValueBean("Label 9", "Value 9"));
beanCollection = entries;
}
return (beanCollection);
}
public void setBeanCollection(Collection beanCollection) {
this.beanCollection = beanCollection;
}
/**
* A multiple-String SELECT element using a bean collection.
*/
private String[] beanCollectionSelect = { "Value 1", "Value 3",
"Value 5" };
public String[] getBeanCollectionSelect() {
return (this.beanCollectionSelect);
}
public void setBeanCollectionSelect(String beanCollectionSelect[]) {
this.beanCollectionSelect = beanCollectionSelect;
}
/**
* A boolean property whose initial value is true.
*/
private boolean booleanProperty = true;
public boolean getBooleanProperty() {
return (booleanProperty);
}
public void setBooleanProperty(boolean booleanProperty) {
this.booleanProperty = booleanProperty;
}
/**
* A multiple-String SELECT element using a collection.
*/
private String[] collectionSelect = { "Value 2", "Value 4",
"Value 6" };
public String[] getCollectionSelect() {
return (this.collectionSelect);
}
public void setCollectionSelect(String collectionSelect[]) {
this.collectionSelect = collectionSelect;
}
/**
* A double property.
*/
private double doubleProperty = 321.0;
public double getDoubleProperty() {
return (this.doubleProperty);
}
public void setDoubleProperty(double doubleProperty) {
this.doubleProperty = doubleProperty;
}
/**
* A boolean property whose initial value is false
*/
private boolean falseProperty = false;
public boolean getFalseProperty() {
return (falseProperty);
}
public void setFalseProperty(boolean falseProperty) {
this.falseProperty = falseProperty;
}
/**
* A float property.
*/
private float floatProperty = (float) 123.0;
public float getFloatProperty() {
return (this.floatProperty);
}
public void setFloatProperty(float floatProperty) {
this.floatProperty = floatProperty;
}
/**
* Integer arrays that are accessed as an array as well as indexed.
*/
private int intArray[] = { 0, 10, 20, 30, 40 };
public int[] getIntArray() {
return (this.intArray);
}
public void setIntArray(int intArray[]) {
this.intArray = intArray;
}
private int intIndexed[] = { 0, 10, 20, 30, 40 };
public int getIntIndexed(int index) {
return (intIndexed[index]);
}
public void setIntIndexed(int index, int value) {
intIndexed[index] = value;
}
private int intMultibox[] = new int[0];
public int[] getIntMultibox() {
return (this.intMultibox);
}
public void setIntMultibox(int intMultibox[]) {
this.intMultibox = intMultibox;
}
/**
* An integer property.
*/
private int intProperty = 123;
public int getIntProperty() {
return (this.intProperty);
}
public void setIntProperty(int intProperty) {
没有合适的资源?快使用搜索试试~ 我知道了~
Struts 标签库
共98个文件
jsp:49个
class:13个
java:12个
需积分: 3 7 下载量 22 浏览量
2008-11-30
23:18:53
上传
评论
收藏 1.36MB RAR 举报
温馨提示
struts 标签库 struts标签帮助
资源推荐
资源详情
资源评论
收起资源包目录
Struts标签帮助.rar (98个子文件)
Struts标签帮助
taglib1
html-cancel.jsp 3KB
.project 382B
html-errors.jsp 9KB
bean-struts.jsp 1KB
html-submit.jsp 853B
html-message.jsp 444B
test.jsp 644B
bean-message.jsp 4KB
html-setters.jsp 4KB
bean-cookie.jsp 4KB
WEB-INF
struts-tiles.tld 8KB
web.xml 2KB
struts-config.xml 4KB
struts-bean.tld 9KB
struts-nested.tld 63KB
src
org
apache
struts
webapp
exercise
TestBean2.java 2KB
ErrAction.java 889B
HtmlSettersAction.java 4KB
TestBean.java 14KB
Profile.java 2KB
Address.java 2KB
UploadAction.java 2KB
UploadBean.java 675B
Account.java 3KB
TestPageBean.java 451B
AccountActionForm.java 4KB
ErrBean.java 1KB
ApplicationResources.properties 906B
struts-html.tld 65KB
struts-template.tld 2KB
struts-logic.tld 14KB
lib
commons-logging.jar 31KB
commons-digester.jar 107KB
commons-fileupload.jar 22KB
commons-beanutils.jar 116KB
antlr.jar 350KB
struts.jar 512KB
commons-validator.jar 82KB
jakarta-oro.jar 64KB
commons-collections.jar 161KB
classes
org
apache
struts
webapp
exercise
Account.class 2KB
Address.class 2KB
ErrAction.class 1KB
HtmlSettersAction.class 1KB
TestAction.class 901B
UploadBean.class 1KB
ErrBean.class 1KB
UploadAction.class 3KB
Profile.class 1KB
TestBean2.class 3KB
AccountActionForm.class 3KB
TestPageBean.class 882B
ApplicationResources.properties 906B
TestBean.class 9KB
message.properties 1KB
message2.properties 127B
html-rewrite.jsp 2KB
html-link.jsp 5KB
index.jsp 3KB
html-textarea.jsp 1002B
nested-root.jsp 0B
logic-iterate.jsp 7KB
nested-nest.jsp 5KB
html-password.jsp 1KB
html-option.jsp 2KB
html-multibox.jsp 2KB
bean-resource.jsp 2KB
html-form.jsp 2KB
bean-size.jsp 2KB
bean-page.jsp 4KB
html-checkbox.jsp 2KB
bean-define.jsp 3KB
bean-parameter.jsp 4KB
logic-forward&redirect.jsp 1KB
bean-write.jsp 4KB
html-hidden.jsp 1KB
html-file.jsp 6KB
fileupload
logic-present.jsp 5KB
logic-empty.jsp 1KB
nested-nest-result.jsp 2KB
html-text.jsp 2KB
logic-match.jsp 2KB
html-select.jsp 2KB
html-reset.jsp 903B
nested-writeNesting.jsp 5KB
logic-compare-numeric.jsp 16KB
html-html.jsp 1KB
.classpath 1KB
html-img.jsp 768B
bean-include.jsp 2KB
bean-header.jsp 2KB
logic-compare.jsp 7KB
style.css 105B
html-base.jsp 1KB
html-options.jsp 3KB
html-optionsCollection.jsp 3KB
html-messages.jsp 4KB
html-radio.jsp 1KB
共 98 条
- 1
资源评论
liuqi0213
- 粉丝: 0
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- unity开发教程.docx
- 代码使用Pygame库实现了一个简单的烟花模拟 核心逻辑包括烟花和粒子类的定义,处理位置、爆炸、尾迹和绘制等操作
- Matlab Simulink 电力电子仿真-Flyback(反激电路)电路分析
- tudou-android-release.apk
- 数据分析教程.docx
- 基于matlab实现用有限元法计算电磁场的Matlab工具 .rar
- 基于matlab实现有限元算法 计算电磁场问题 边界条件包括第一类边界和第二类边界.rar
- 基于matlab实现用于计算不同车重下的电动汽车动力性和经济性.rar
- 基于matlab实现遗传算法求解多车场车辆路径问题 有多组算例可以用.rar
- 浏览器.apk
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功