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.ui;
16  
17  import com.liferay.taglib.util.IncludeTag;
18  
19  import javax.servlet.http.HttpServletRequest;
20  
21  /**
22   * <a href="HeaderTag.java.html"><b><i>View Source</i></b></a>
23   *
24   * @author Sergio González
25   */
26  public class HeaderTag extends IncludeTag {
27  
28      protected void setAttributes(HttpServletRequest request) {
29          request.setAttribute("liferay-ui:header:backLabel", _backLabel);
30          request.setAttribute("liferay-ui:header:backURL", _backURL);
31          request.setAttribute("liferay-ui:header:cssClass", _cssClass);
32          request.setAttribute("liferay-ui:header:title", _title);
33      }
34  
35      protected void cleanUp() {
36          _backLabel = null;
37          _backURL = null;
38          _cssClass = null;
39          _title = null;
40      }
41  
42      protected String getPage() {
43          return _PAGE;
44      }
45  
46      protected boolean isCleanUpSetAttributes() {
47          return _CLEAN_UP_SET_ATTRIBUTES;
48      }
49  
50      public void setBackLabel(String backLabel) {
51          _backLabel = backLabel;
52      }
53  
54      public void setBackURL(String backURL) {
55          _backURL = backURL;
56      }
57  
58      public void setCssClass(String cssClass) {
59          _cssClass = cssClass;
60      }
61  
62      public void setTitle(String title) {
63          _title = title;
64      }
65  
66      private static final boolean _CLEAN_UP_SET_ATTRIBUTES = true;
67  
68      private static final String _PAGE = "/html/taglib/ui/header/page.jsp";
69  
70      private String _backLabel;
71      private String _backURL;
72      private String _cssClass;
73      private String _title;
74  
75  }