001
014
015 package com.liferay.taglib.aui.base;
016
017 import javax.servlet.http.HttpServletRequest;
018 import javax.servlet.jsp.JspException;
019
020
027 public class BaseColTag extends com.liferay.taglib.util.IncludeTag {
028
029 @Override
030 public int doStartTag() throws JspException {
031 setAttributeNamespace(_ATTRIBUTE_NAMESPACE);
032
033 return super.doStartTag();
034 }
035
036 public java.lang.String getCssClass() {
037 return _cssClass;
038 }
039
040 public java.lang.String getId() {
041 return _id;
042 }
043
044 public int getOffset() {
045 return _offset;
046 }
047
048 public int getOffsetWidth() {
049 return _offsetWidth;
050 }
051
052 public int getSpan() {
053 return _span;
054 }
055
056 public int getWidth() {
057 return _width;
058 }
059
060 public void setCssClass(java.lang.String cssClass) {
061 _cssClass = cssClass;
062
063 setScopedAttribute("cssClass", cssClass);
064 }
065
066 public void setId(java.lang.String id) {
067 _id = id;
068
069 setScopedAttribute("id", id);
070 }
071
072 public void setOffset(int offset) {
073 _offset = offset;
074
075 setScopedAttribute("offset", offset);
076 }
077
078 public void setOffsetWidth(int offsetWidth) {
079 _offsetWidth = offsetWidth;
080
081 setScopedAttribute("offsetWidth", offsetWidth);
082 }
083
084 public void setSpan(int span) {
085 _span = span;
086
087 setScopedAttribute("span", span);
088 }
089
090 public void setWidth(int width) {
091 _width = width;
092
093 setScopedAttribute("width", width);
094 }
095
096 @Override
097 protected void cleanUp() {
098 super.cleanUp();
099
100 _cssClass = null;
101 _id = null;
102 _offset = 0;
103 _offsetWidth = 0;
104 _span = 12;
105 _width = 0;
106 }
107
108 @Override
109 protected String getEndPage() {
110 return _END_PAGE;
111 }
112
113 @Override
114 protected String getStartPage() {
115 return _START_PAGE;
116 }
117
118 @Override
119 protected void setAttributes(HttpServletRequest request) {
120 setNamespacedAttribute(request, "cssClass", _cssClass);
121 setNamespacedAttribute(request, "id", _id);
122 setNamespacedAttribute(request, "offset", _offset);
123 setNamespacedAttribute(request, "offsetWidth", _offsetWidth);
124 setNamespacedAttribute(request, "span", _span);
125 setNamespacedAttribute(request, "width", _width);
126 }
127
128 protected static final String _ATTRIBUTE_NAMESPACE = "aui:col:";
129
130 private static final String _END_PAGE =
131 "/html/taglib/aui/col/end.jsp";
132
133 private static final String _START_PAGE =
134 "/html/taglib/aui/col/start.jsp";
135
136 private java.lang.String _cssClass = null;
137 private java.lang.String _id = null;
138 private int _offset = 0;
139 private int _offsetWidth = 0;
140 private int _span = 12;
141 private int _width = 0;
142
143 }