1 /*
2 * Copyright (c) 2001 - 2005 ivata limited.
3 * All rights reserved.
4 * -----------------------------------------------------------------------------
5 * ivata masks may be redistributed under the GNU General Public
6 * License as published by the Free Software Foundation;
7 * version 2 of the License.
8 *
9 * These programs are free software; you can redistribute them and/or
10 * modify them under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; version 2 of the License.
12 *
13 * These programs are distributed in the hope that they will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 *
17 * See the GNU General Public License in the file LICENSE.txt for more
18 * details.
19 *
20 * If you would like a copy of the GNU General Public License write to
21 *
22 * Free Software Foundation, Inc.
23 * 59 Temple Place - Suite 330
24 * Boston, MA 02111-1307, USA.
25 *
26 *
27 * To arrange commercial support and licensing, contact ivata at
28 * http://www.ivata.com/contact.jsp
29 * -----------------------------------------------------------------------------
30 * $Log: OkTag.java,v $
31 * Revision 1.3 2005/04/11 15:26:32 colinmacleod
32 * Removed comment about submit tag attributes.
33 *
34 * Revision 1.2 2005/04/09 18:04:20 colinmacleod
35 * Changed copyright text to GPL v2 explicitly.
36 *
37 * Revision 1.1 2005/01/06 23:10:06 colinmacleod
38 * Moved up a version number.
39 * Changed copyright notices to 2005.
40 * Updated the documentation:
41 * - started working on multiproject:site docu.
42 * - changed the logo.
43 * Added checkstyle and fixed LOADS of style issues.
44 * Added separate thirdparty subproject.
45 * Added struts (in web), util and webgui (in webtheme) from ivata op.
46 *
47 * Revision 1.2 2004/03/21 21:16:35 colinmacleod
48 * Shortened name to ivata op.
49 *
50 * Revision 1.1.1.1 2004/01/27 20:59:40 colinmacleod
51 * Moved ivata op to SourceForge.
52 *
53 * Revision 1.2 2003/10/16 15:43:03 jano
54 * Fixes problems with building and some problems with splitting to subprojects
55 *
56 * Revision 1.1.1.1 2003/10/13 20:49:26 colin
57 * Restructured portal into subprojects
58 *
59 * Revision 1.1 2003/03/03 16:57:12 colin
60 * converted localization to automatic paths
61 * added labels
62 * added mandatory fieldName attribute
63 * -----------------------------------------------------------------------------
64 */
65 package com.ivata.mask.web.tag.html;
66 import javax.servlet.jsp.JspException;
67 /***
68 * <p>
69 * Overridden from <code>SubmitTag</code> for convenience, this tag creates a
70 * submit button with the name <code>ok</code>.
71 * </p>
72 *
73 * @since ivata masks 0.4 (2003-03-01)
74 * @author Colin MacLeod
75 * <a href='mailto:colin.macleod@ivata.com'>colin.macleod@ivata.com</a>
76 * @version $Revision: 1.3 $
77 */
78 public class OkTag extends SubmitTag {
79 /***
80 * <p>
81 * Overridden to set the value and title strings to the values represented
82 * by the localized keys in this class.
83 * </p>
84 *
85 * @return value returned by superclass method.
86 *
87 * @throws JspException
88 * if either <code>valueKey</code> or <code>titleKey</code>
89 * have not been set, or as thrown by superclass method.
90 */
91 public int doStartTag() throws JspException {
92 setFieldName("ok");
93 return super.doStartTag();
94 }
95 }
96