001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.taglib.ui;
016    
017    import com.liferay.taglib.util.IncludeTag;
018    
019    import javax.servlet.http.HttpServletRequest;
020    
021    /**
022     * @author Sergio González
023     */
024    public class HeaderTag extends IncludeTag {
025    
026            protected void setAttributes(HttpServletRequest request) {
027                    request.setAttribute("liferay-ui:header:backLabel", _backLabel);
028                    request.setAttribute("liferay-ui:header:backURL", _backURL);
029                    request.setAttribute("liferay-ui:header:cssClass", _cssClass);
030                    request.setAttribute("liferay-ui:header:title", _title);
031            }
032    
033            protected void cleanUp() {
034                    _backLabel = null;
035                    _backURL = null;
036                    _cssClass = null;
037                    _title = null;
038            }
039    
040            protected String getPage() {
041                    return _PAGE;
042            }
043    
044            protected boolean isCleanUpSetAttributes() {
045                    return _CLEAN_UP_SET_ATTRIBUTES;
046            }
047    
048            public void setBackLabel(String backLabel) {
049                    _backLabel = backLabel;
050            }
051    
052            public void setBackURL(String backURL) {
053                    _backURL = backURL;
054            }
055    
056            public void setCssClass(String cssClass) {
057                    _cssClass = cssClass;
058            }
059    
060            public void setTitle(String title) {
061                    _title = title;
062            }
063    
064            private static final boolean _CLEAN_UP_SET_ATTRIBUTES = true;
065    
066            private static final String _PAGE = "/html/taglib/ui/header/page.jsp";
067    
068            private String _backLabel;
069            private String _backURL;
070            private String _cssClass;
071            private String _title;
072    
073    }