快速业务通道

常用的Struts 2.0的标志(Tag)介绍 - 编程入门网

作者 佚名技术 来源 NET编程 浏览 发布时间 2012-06-16
5 2006-07-10 00:57:05Z mrdon $ * * Copyright 2006 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.struts2.showcase; import org.apache.struts2.ServletActionContext; import com.opensymphony.xwork2.ActionSupport; import com.opensymphony.xwork2.Validateable; import com.opensymphony.xwork2.util.OgnlValueStack; import java.util.ArrayList; import java.util.Collections; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import java.io.File; /** *//** */ public class UITagExample extends ActionSupport implements Validateable { private static final long serialVersionUID = -94044809860988047L; String name; Date birthday; String bio; String favoriteColor; List friends; boolean legalAge; String state; String region; File picture; String pictureContentType; String pictureFileName; String favouriteLanguage; String favouriteVehicalType = "MotorcycleKey"; String favouriteVehicalSpecific = "YamahaKey"; List leftSideCartoonCharacters; List rightSideCartoonCharacters; List favouriteLanguages = new ArrayList(); List vehicalTypeList = new ArrayList(); Map vehicalSpecificMap = new HashMap(); String thoughts; public UITagExample() { favouriteLanguages.add(new Language("EnglishKey", "English Language")); favouriteLanguages.add(new Language("FrenchKey", "French Language")); favouriteLanguages.add(new Language("SpanishKey", "Spanish Language")); VehicalType car = new VehicalType("CarKey", "Car"); VehicalType motorcycle = new VehicalType("MotorcycleKey", "Motorcycle"); vehicalTypeList.add(car); vehicalTypeList.add(motorcycle); List cars = new ArrayList(); cars.add(new VehicalSpecific("MercedesKey", "Mercedes")); cars.add(new VehicalSpecific("HondaKey", "Honda")); cars.add(new VehicalSpecific("FordKey", "Ford")); List motorcycles = new ArrayList(); motorcycles.add(new VehicalSpecific("SuzukiKey", "Suzuki")); motorcycles.add(new VehicalSpecific("YamahaKey", "Yamaha")); vehicalSpecificMap.put(car, cars); vehicalSpecificMap.put(motorcycle, motorcycles); } public List getLeftSideCartoonCharacters() { return leftSideCartoonCharacters; } public void setLeftSideCartoonCharacters(List leftSideCartoonCharacters) { this.leftSideCartoonCharacters = leftSideC

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号