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 _cssClass = null;
099 _id = null;
100 _offset = 0;
101 _offsetWidth = 0;
102 _span = 12;
103 _width = 0;
104 }
105
106 @Override
107 protected String getEndPage() {
108 return _END_PAGE;
109 }
110
111 @Override
112 protected String getStartPage() {
113 return _START_PAGE;
114 }
115
116 @Override
117 protected void setAttributes(HttpServletRequest request) {
118 setNamespacedAttribute(request, "cssClass", _cssClass);
119 setNamespacedAttribute(request, "id", _id);
120 setNamespacedAttribute(request, "offset", _offset);
121 setNamespacedAttribute(request, "offsetWidth", _offsetWidth);
122 setNamespacedAttribute(request, "span", _span);
123 setNamespacedAttribute(request, "width", _width);
124 }
125
126 protected static final String _ATTRIBUTE_NAMESPACE = "aui:col:";
127
128 private static final String _END_PAGE =
129 "/html/taglib/aui/col/end.jsp";
130
131 private static final String _START_PAGE =
132 "/html/taglib/aui/col/start.jsp";
133
134 private java.lang.String _cssClass = null;
135 private java.lang.String _id = null;
136 private int _offset = 0;
137 private int _offsetWidth = 0;
138 private int _span = 12;
139 private int _width = 0;
140
141 }