1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.taglib.aui;
16  
17  import com.liferay.taglib.util.IncludeTag;
18  
19  import javax.servlet.http.HttpServletRequest;
20  
21  /**
22   * <a href="FieldsetTag.java.html"><b><i>View Source</i></b></a>
23   *
24   * @author Julio Camarero
25   * @author Jorge Ferrer
26   * @author Brian Wing Shun Chan
27   */
28  public class FieldsetTag extends IncludeTag {
29  
30      public void setColumn(boolean column) {
31          _column = column;
32      }
33  
34      public void setCssClass(String cssClass) {
35          _cssClass = cssClass;
36      }
37  
38      public void setLabel(String label) {
39          _label = label;
40      }
41  
42      protected void cleanUp() {
43          _column = false;
44          _cssClass = null;
45          _label = null;
46      }
47  
48      protected String getEndPage() {
49          return _END_PAGE;
50      }
51  
52      protected String getStartPage() {
53          return _START_PAGE;
54      }
55  
56      protected boolean isCleanUpSetAttributes() {
57          return _CLEAN_UP_SET_ATTRIBUTES;
58      }
59  
60      protected void setAttributes(HttpServletRequest request) {
61          request.setAttribute("aui:fieldset:column", String.valueOf(_column));
62          request.setAttribute("aui:fieldset:cssClass", _cssClass);
63          request.setAttribute(
64              "aui:fieldset:dynamicAttributes", getDynamicAttributes());
65          request.setAttribute("aui:fieldset:label", _label);
66      }
67  
68      private static final boolean _CLEAN_UP_SET_ATTRIBUTES = true;
69  
70      private static final String _END_PAGE =
71          "/html/taglib/aui/fieldset/end.jsp";
72  
73      private static final String _START_PAGE =
74          "/html/taglib/aui/fieldset/start.jsp";
75  
76      private boolean _column;
77      private String _cssClass;
78      private String _label;
79  
80  }