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: /JADE/SourceCode/com/salmonllc/jsp/tags/DetailFormTag.java $
024: //$Author: Dan $
025: //$Revision: 16 $
026: //$Modtime: 10/30/02 2:40p $
027: /////////////////////////
028:
029: import com.salmonllc.html.*;
030: import com.salmonllc.jsp.*;
031:
032: /**
033: * This is a tag used to implement the a Detailform.
034: */
035:
036: public class DetailFormTag extends BaseEmptyTag {
037: public String _datadef;
038: public String _savebutton;
039: public String _deletebutton;
040: public String _cancelbutton;
041: public String _caption;
042: private String _dataSource;
043:
044: /**
045: * This method creates the JspDetailForm object for this tag.
046: */
047:
048: public HtmlComponent createComponent() {
049: JspDetailForm detailForm = new JspDetailForm(getName(),
050: getHelper().getController());
051: //
052:
053: if (_datadef != null)
054: detailForm.setDataDictionary(_datadef);
055: if (_savebutton != null)
056: detailForm.setSaveButton(_savebutton);
057: if (_deletebutton != null)
058: detailForm.setDeleteButton(_deletebutton);
059: if (_cancelbutton != null)
060: detailForm.setCancelButton(_cancelbutton);
061: if (_caption != null)
062: detailForm.setCaption(_caption);
063: if (_dataSource != null)
064: detailForm.setDataSource(_dataSource);
065: return detailForm;
066: }
067:
068: /**
069: * Gets the cancel button specified in the JSP page
070: * Creation date: (8/2/01 11:33:55 AM)
071: * @return java.lang.String
072: */
073: public java.lang.String getCancelbutton() {
074: return _cancelbutton;
075: }
076:
077: /**
078: * Gets the caption for Detail form page
079: * Creation date: (8/2/01 11:33:55 AM)
080: * @return java.lang.String
081: */
082: public java.lang.String getCaption() {
083: return _caption;
084: }
085:
086: /**
087: * Gets the data definition, XML file, used by detail form component.
088: * Creation date: (7/20/01 4:04:16 PM)
089: * @return java.lang.String
090: */
091: public java.lang.String getDatadef() {
092: return _datadef;
093: }
094:
095: /**
096: * Get the Data Source the component should be bound to.
097: */
098: public java.lang.String getDatasource() {
099: return _dataSource;
100: }
101:
102: /**
103: * Gets the handle to the delete button specified in the JSP page
104: * Creation date: (8/2/01 11:32:58 AM)
105: * @return java.lang.String
106: */
107: public java.lang.String getDeletebutton() {
108: return _deletebutton;
109: }
110:
111: /**
112: * Gets the handle to the save button specified in the JSP page
113: * Creation date: (8/2/01 11:32:58 AM)
114: * @return java.lang.String
115: */
116: public java.lang.String getSavebutton() {
117: return _savebutton;
118: }
119:
120: /**
121: * Sets the handle to the cancel button specified in the JSP page
122: * Creation date: (8/2/01 11:33:55 AM)
123: * @param new_cancelbutton java.lang.String
124: */
125: public void setCancelbutton(java.lang.String new_cancelbutton) {
126: _cancelbutton = new_cancelbutton;
127: }
128:
129: /**
130: * Sets the caption for the detail form used by detail form component.
131: * Creation date: (8/2/01 11:33:55 AM)
132: * @param new_caption java.lang.String
133: */
134: public void setCaption(java.lang.String new_caption) {
135: _caption = new_caption;
136: }
137:
138: /**
139: * Sets the data definition, XML filename, used by detail form component.
140: * Creation date: (7/20/01 4:04:16 PM)
141: * @param new_datadef java.lang.String
142: */
143: public void setDatadef(java.lang.String new_datadef) {
144: _datadef = new_datadef;
145: }
146:
147: /**
148: * Set the Data Source the component should be bound to
149: */
150: public void setDatasource(java.lang.String val) {
151: _dataSource = val;
152: }
153:
154: /**
155: * Sets the handle to the delete button specified in the JSP page
156: * Creation date: (8/2/01 11:32:58 AM)
157: * @param new_deletebutton java.lang.String
158: */
159: public void setDeletebutton(java.lang.String new_deletebutton) {
160: _deletebutton = new_deletebutton;
161: }
162:
163: /**
164: * Sets the handle to the save button specified in the JSP page
165: * Creation date: (8/2/01 11:32:58 AM)
166: * @param new_savebutton java.lang.String
167: */
168: public void setSavebutton(java.lang.String new_savebutton) {
169: _savebutton = new_savebutton;
170: }
171: }
|