001
014
015 package com.liferay.taglib.ui;
016
017 import com.liferay.taglib.util.IncludeTag;
018
019 import javax.servlet.http.HttpServletRequest;
020
021
026 public class NavigationTag extends IncludeTag {
027
028 public void setBulletStyle(String bulletStyle) {
029 _bulletStyle = bulletStyle;
030 }
031
032 public void setDisplayStyleDefinition(String[] displayStyleDefinition) {
033 _displayStyleDefinition = displayStyleDefinition;
034 }
035
036 public void setHeaderType(String headerType) {
037 _headerType = headerType;
038 }
039
040 public void setIncludedLayouts(String includedLayouts) {
041 _includedLayouts = includedLayouts;
042 }
043
044 public void setNestedChildren(boolean nestedChildren) {
045 _nestedChildren = nestedChildren;
046 }
047
048 public void setPreview(boolean preview) {
049 _preview = preview;
050 }
051
052 public void setRootLayoutLevel(int rootLayoutLevel) {
053 _rootLayoutLevel = rootLayoutLevel;
054 }
055
056 public void setRootLayoutType(String rootLayoutType) {
057 _rootLayoutType = rootLayoutType;
058 }
059
060 @Override
061 protected void cleanUp() {
062 _bulletStyle = "1";
063 _displayStyleDefinition = null;
064 _headerType = "none";
065 _includedLayouts = "auto";
066 _nestedChildren = true;
067 _preview = false;
068 _rootLayoutLevel = 1;
069 _rootLayoutType = "absolute";
070 }
071
072 @Override
073 protected String getPage() {
074 return _PAGE;
075 }
076
077 @Override
078 protected void setAttributes(HttpServletRequest request) {
079 request.setAttribute("liferay-ui:navigation:bulletStyle", _bulletStyle);
080 request.setAttribute(
081 "liferay-ui:navigation:displayStyleDefinition",
082 _displayStyleDefinition);
083 request.setAttribute("liferay-ui:navigation:headerType", _headerType);
084 request.setAttribute(
085 "liferay-ui:navigation:includedLayouts", _includedLayouts);
086 request.setAttribute(
087 "liferay-ui:navigation:nestedChildren",
088 String.valueOf(_nestedChildren));
089 request.setAttribute(
090 "liferay-ui:navigation:preview", String.valueOf(_preview));
091 request.setAttribute(
092 "liferay-ui:navigation:rootLayoutLevel",
093 String.valueOf(_rootLayoutLevel));
094 request.setAttribute(
095 "liferay-ui:navigation:rootLayoutType", _rootLayoutType);
096 }
097
098 private static final String _PAGE = "/html/taglib/ui/navigation/page.jsp";
099
100 private String _bulletStyle = "1";
101 private String[] _displayStyleDefinition;
102 private String _headerType = "none";
103 private String _includedLayouts = "auto";
104 private boolean _nestedChildren = true;
105 private boolean _preview;
106 private int _rootLayoutLevel = 1;
107 private String _rootLayoutType = "absolute";
108
109 }