001: //** Copyright Statement ***************************************************
002: //The Salmon Open Framework for Internet Applications (SOFIA)
003: // Copyright (C) 1999 - 2002, Salmon LLC
004: //
005: // This program is free software; you can redistribute it and/or
006: // modify it under the terms of the GNU General Public License version 2
007: // as published by the Free Software Foundation;
008: //
009: // This program is distributed in the hope that it will be useful,
010: // but WITHOUT ANY WARRANTY; without even the implied warranty of
011: // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
012: // GNU General Public License for more details.
013: //
014: // You should have received a copy of the GNU General Public License
015: // along with this program; if not, write to the Free Software
016: // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
017: //
018: // For more information please visit http://www.salmonllc.com
019: //** End Copyright Statement ***************************************************
020: package com.salmonllc.jsp.tags;
021:
022: ////////////////////////////////////////////////////////////
023: //$Archive: /SOFIA/SourceCode/com/salmonllc/jsp/tags/AppletParameterTag.java $
024: //$Author: Fred $
025: //$Revision: 2 $
026: //$Modtime: 4/17/03 11:14a $
027: ////////////////////////////////////////////////////////////
028:
029: import com.salmonllc.util.Util;
030:
031: import com.salmonllc.html.*;
032:
033: /**
034: * The option tag represents the options of a list box
035: * or drop down list box and needs to live in an input tag.
036: */
037: public class AppletParameterTag extends BaseEmptyTag {
038: private String _value;
039: private String _table;
040: private String _criteria;
041:
042: /**
043: * There is no component for an option. It adds the option to it's parent
044: * @return HtmlComponent
045: */
046: public HtmlComponent createComponent() {
047: String table = null;
048: HtmlComponent comp = getHelper().getAppletTag().getHelper()
049: .getComponent();
050: table = getTable();
051: if (comp != null) {
052: if (!Util.isNull(table) && !Util.isEmpty(table)) {
053: ((HtmlApplet) comp).addParameters(table, getName(),
054: getValue(), getCriteria());
055: } else
056: ((HtmlApplet) comp).setParm(getName(), _value);
057: }
058:
059: return null;
060: }
061:
062: /**
063: * Get the tag's value attribute
064: * @return
065: */
066:
067: public String getValue() {
068: return _value;
069: }
070:
071: /**
072: * Release all resources used by the tag.
073: */
074: public void release() {
075: super .release();
076: _value = null;
077: _table = null;
078: _criteria = null;
079: }
080:
081: /**
082: * Set the tag's value attribute
083: * @param value
084: */
085:
086: public void setValue(String value) {
087: _value = value;
088: }
089:
090: /**
091: * Get the tag's table attribute
092: * @return
093: */
094: public String getTable() {
095: return _table;
096: }
097:
098: /**
099: * Set the tag's table attribute
100: * @param table
101: */
102: public void setTable(String table) {
103: _table = table;
104: }
105:
106: /**
107: * Get the tag's criteria attribute
108: * @return
109: */
110: public String getCriteria() {
111: return _criteria;
112: }
113:
114: /**
115: * Set the tag's criteria attribute
116: * @param displaycolumn
117: */
118: public void setCriteria(String criteria) {
119: _criteria = criteria;
120: }
121:
122: }
|