/* =============================================================================== * * Part of the InfoGlue Content Management Platform (www.infoglue.org) * * =============================================================================== * * Copyright (C) * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License version 2, as published by the * Free Software Foundation. See the file LICENSE.html for more information. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY, including the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc. / 59 Temple * Place, Suite 330 / Boston, MA 02111-1307 / USA. * * =============================================================================== */ package org.infoglue.calendar.taglib; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.ResourceBundle; import javax.servlet.jsp.JspException; import javax.servlet.jsp.JspTagException; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.infoglue.common.util.ResourceBundleHelper; import com.opensymphony.webwork.ServletActionContext; import com.opensymphony.xwork.ActionContext; /** * */ public class HiddenFieldTag extends AbstractInputCalendarTag { private static Log log = LogFactory.getLog(HiddenFieldTag.class); private static final long serialVersionUID = 3617579309963752240L; private String name = ""; private String value = ""; /** * */ public HiddenFieldTag() { super(); } public int doEndTag() throws JspException { StringBuffer sb = new StringBuffer(); sb.append(" <input type=\"hidden\" id=\"" + name + "\" name=\"" + name + "\" value=\"" + ((value == null) ? "" : value) + "\">"); write(sb.toString()); this.name = null; return EVAL_PAGE; } public void setName(String name) { Object o = findOnValueStack(name); if(o != null) this.name = o.toString(); else this.name = name; } public void setValue(String value) { Object o = findOnValueStack(value); if(o != null) this.value = o.toString(); else this.value = null; //this.value = value; } }