001: /*
002: * $Id: AbstractUITag.java 474574 2006-11-13 23:30:17Z hermanns $
003: *
004: * Licensed to the Apache Software Foundation (ASF) under one
005: * or more contributor license agreements. See the NOTICE file
006: * distributed with this work for additional information
007: * regarding copyright ownership. The ASF licenses this file
008: * to you under the Apache License, Version 2.0 (the
009: * "License"); you may not use this file except in compliance
010: * with the License. You may obtain a copy of the License at
011: *
012: * http://www.apache.org/licenses/LICENSE-2.0
013: *
014: * Unless required by applicable law or agreed to in writing,
015: * software distributed under the License is distributed on an
016: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017: * KIND, either express or implied. See the License for the
018: * specific language governing permissions and limitations
019: * under the License.
020: */
021: package org.apache.struts2.views.jsp.ui;
022:
023: import org.apache.struts2.components.UIBean;
024: import org.apache.struts2.views.jsp.ComponentTagSupport;
025:
026: /**
027: * Abstract base class for all UI tags.
028: *
029: */
030: public abstract class AbstractUITag extends ComponentTagSupport {
031: protected String cssClass;
032: protected String cssStyle;
033: protected String title;
034: protected String disabled;
035: protected String label;
036: protected String labelPosition;
037: protected String requiredposition;
038: protected String name;
039: protected String required;
040: protected String tabindex;
041: protected String value;
042: protected String template;
043: protected String theme;
044: protected String templateDir;
045: protected String onclick;
046: protected String ondblclick;
047: protected String onmousedown;
048: protected String onmouseup;
049: protected String onmouseover;
050: protected String onmousemove;
051: protected String onmouseout;
052: protected String onfocus;
053: protected String onblur;
054: protected String onkeypress;
055: protected String onkeydown;
056: protected String onkeyup;
057: protected String onselect;
058: protected String onchange;
059: protected String accesskey;
060:
061: protected String key;
062:
063: // tooltip attributes
064: protected String tooltip;
065: protected String tooltipConfig;
066:
067: protected void populateParams() {
068: super .populateParams();
069:
070: UIBean uiBean = (UIBean) component;
071: uiBean.setCssClass(cssClass);
072: uiBean.setCssClass(cssClass);
073: uiBean.setCssStyle(cssStyle);
074: uiBean.setTitle(title);
075: uiBean.setDisabled(disabled);
076: uiBean.setLabel(label);
077: uiBean.setLabelposition(labelPosition);
078: uiBean.setRequiredposition(requiredposition);
079: uiBean.setName(name);
080: uiBean.setRequired(required);
081: uiBean.setTabindex(tabindex);
082: uiBean.setValue(value);
083: uiBean.setTemplate(template);
084: uiBean.setTheme(theme);
085: uiBean.setTemplateDir(templateDir);
086: uiBean.setOnclick(onclick);
087: uiBean.setOndblclick(ondblclick);
088: uiBean.setOnmousedown(onmousedown);
089: uiBean.setOnmouseup(onmouseup);
090: uiBean.setOnmouseover(onmouseover);
091: uiBean.setOnmousemove(onmousemove);
092: uiBean.setOnmouseout(onmouseout);
093: uiBean.setOnfocus(onfocus);
094: uiBean.setOnblur(onblur);
095: uiBean.setOnkeypress(onkeypress);
096: uiBean.setOnkeydown(onkeydown);
097: uiBean.setOnkeyup(onkeyup);
098: uiBean.setOnselect(onselect);
099: uiBean.setOnchange(onchange);
100: uiBean.setTooltip(tooltip);
101: uiBean.setTooltipConfig(tooltipConfig);
102: uiBean.setAccesskey(accesskey);
103: uiBean.setKey(key);
104: }
105:
106: public void setCssClass(String cssClass) {
107: this .cssClass = cssClass;
108: }
109:
110: public void setCssStyle(String cssStyle) {
111: this .cssStyle = cssStyle;
112: }
113:
114: public void setTitle(String title) {
115: this .title = title;
116: }
117:
118: public void setDisabled(String disabled) {
119: this .disabled = disabled;
120: }
121:
122: public void setLabel(String label) {
123: this .label = label;
124: }
125:
126: public void setLabelposition(String labelPosition) {
127: this .labelPosition = labelPosition;
128: }
129:
130: public void setRequiredposition(String requiredPosition) {
131: this .requiredposition = requiredPosition;
132: }
133:
134: public void setName(String name) {
135: this .name = name;
136: }
137:
138: public void setRequired(String required) {
139: this .required = required;
140: }
141:
142: public void setTabindex(String tabindex) {
143: this .tabindex = tabindex;
144: }
145:
146: public void setValue(String value) {
147: this .value = value;
148: }
149:
150: public void setTemplateDir(String templateDir) {
151: this .templateDir = templateDir;
152: }
153:
154: public void setTemplate(String template) {
155: this .template = template;
156: }
157:
158: public void setTheme(String theme) {
159: this .theme = theme;
160: }
161:
162: public void setOnclick(String onclick) {
163: this .onclick = onclick;
164: }
165:
166: public void setOndblclick(String ondblclick) {
167: this .ondblclick = ondblclick;
168: }
169:
170: public void setOnmousedown(String onmousedown) {
171: this .onmousedown = onmousedown;
172: }
173:
174: public void setOnmouseup(String onmouseup) {
175: this .onmouseup = onmouseup;
176: }
177:
178: public void setOnmouseover(String onmouseover) {
179: this .onmouseover = onmouseover;
180: }
181:
182: public void setOnmousemove(String onmousemove) {
183: this .onmousemove = onmousemove;
184: }
185:
186: public void setOnmouseout(String onmouseout) {
187: this .onmouseout = onmouseout;
188: }
189:
190: public void setOnfocus(String onfocus) {
191: this .onfocus = onfocus;
192: }
193:
194: public void setOnblur(String onblur) {
195: this .onblur = onblur;
196: }
197:
198: public void setOnkeypress(String onkeypress) {
199: this .onkeypress = onkeypress;
200: }
201:
202: public void setOnkeydown(String onkeydown) {
203: this .onkeydown = onkeydown;
204: }
205:
206: public void setOnkeyup(String onkeyup) {
207: this .onkeyup = onkeyup;
208: }
209:
210: public void setOnselect(String onselect) {
211: this .onselect = onselect;
212: }
213:
214: public void setOnchange(String onchange) {
215: this .onchange = onchange;
216: }
217:
218: public void setTooltip(String tooltip) {
219: this .tooltip = tooltip;
220: }
221:
222: public void setTooltipConfig(String tooltipConfig) {
223: this .tooltipConfig = tooltipConfig;
224: }
225:
226: public void setAccesskey(String accesskey) {
227: this .accesskey = accesskey;
228: }
229:
230: public void setKey(String key) {
231: this.key = key;
232: }
233: }
|