01: /**
02: * Copyright 2006 Webmedia Group Ltd.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: **/package org.araneaframework.jsp.tag.presentation;
16:
17: import javax.servlet.jsp.JspException;
18: import org.araneaframework.jsp.tag.PresentationTag;
19:
20: /**
21: * Button base tag.
22: *
23: * @author Oleg Mürk
24: */
25: public class BaseButtonTag extends PresentationTag {
26: protected String id = null;
27: protected String labelId = null;
28: protected String onclick = null;
29: protected String tabindex;
30:
31: /* ***********************************************************************************
32: * Tag attributes
33: * ***********************************************************************************/
34:
35: /**
36: * @jsp.attribute
37: * type = "java.lang.String"
38: * required = "false"
39: * description = "Button id, allows to access button from JavaScript."
40: */
41: public void setId(String id) throws JspException {
42: this .id = (String) evaluate("id", id, String.class);
43: }
44:
45: /**
46: * @jsp.attribute
47: * type = "java.lang.String"
48: * required = "false"
49: * description = "Id of button label."
50: */
51: public void setLabelId(String labelId) throws JspException {
52: this .labelId = (String) evaluate("labelId", labelId,
53: String.class);
54: }
55:
56: /**
57: * @jsp.attribute
58: * type = "java.lang.String"
59: * required = "true"
60: * description = "onClick Javascript action."
61: */
62: public void setOnclick(String onclick) throws JspException {
63: this .onclick = (String) evaluate("onclick", onclick,
64: String.class);
65: }
66:
67: /**
68: * @since 1.0.11
69: * @jsp.attribute
70: * type = "java.lang.String"
71: * required = "false"
72: * description = "HTML tabindex for the button."
73: */
74: public void setTabindex(String tabindex) throws JspException {
75: this .tabindex = (String) evaluateNotNull("tabindex", tabindex,
76: String.class);
77: }
78: }
|