01: /* Raw.java
02:
03: {{IS_NOTE
04: Purpose:
05:
06: Description:
07:
08: History:
09: Tue Oct 4 09:15:59 2005, Created by tomyeh
10: }}IS_NOTE
11:
12: Copyright (C) 2005 Potix Corporation. All Rights Reserved.
13:
14: {{IS_RIGHT
15: This program is distributed under GPL Version 2.0 in the hope that
16: it will be useful, but WITHOUT ANY WARRANTY.
17: }}IS_RIGHT
18: */
19: package org.zkoss.zhtml;
20:
21: import org.zkoss.zk.ui.WrongValueException;
22: import org.zkoss.zk.ui.ext.DynamicTag;
23:
24: import org.zkoss.zhtml.impl.AbstractTag;
25:
26: /**
27: * The raw component used to generate raw HTML elements.
28: *
29: * @author tomyeh
30: */
31: public class Raw extends AbstractTag implements DynamicTag {
32: public Raw(String tagname) {
33: super (tagname);
34: }
35:
36: public Raw() {
37: }
38:
39: //-- DynamicTag --//
40: public boolean hasTag(String tagname) {
41: return tagname != null && !"zscript".equals(tagname)
42: && !"attribute".equals(tagname);
43: }
44:
45: public void setTag(String tagname) throws WrongValueException {
46: if (tagname == null || tagname.length() == 0)
47: throw new WrongValueException("A tag name is required");
48: _tagnm = tagname;
49: }
50: }
|