001
014
015 package com.liferay.taglib.ui;
016
017 import com.liferay.portal.kernel.util.StringPool;
018 import com.liferay.portal.kernel.util.Validator;
019
020 import javax.servlet.http.HttpServletRequest;
021
022
025 public class SearchPaginatorTag<R> extends SearchFormTag<R> {
026
027 public void setId(String id) {
028 _id = id;
029 }
030
031 public void setMarkupView(String markupView) {
032 _markupView = markupView;
033 }
034
035 public void setType(String type) {
036 _type = type;
037 }
038
039 @Override
040 protected void cleanUp() {
041 super.cleanUp();
042
043 _markupView = StringPool.BLANK;
044 _type = "regular";
045 }
046
047 @Override
048 protected String getPage() {
049 if (Validator.isNotNull(_markupView)) {
050 return "/html/taglib/ui/search_paginator/" + _markupView +
051 "/page.jsp";
052 }
053
054 return "/html/taglib/ui/search_paginator/page.jsp";
055 }
056
057 @Override
058 protected void setAttributes(HttpServletRequest request) {
059 super.setAttributes(request);
060
061 request.setAttribute("liferay-ui:search:id", _id);
062 request.setAttribute("liferay-ui:search:markupView", _markupView);
063 request.setAttribute("liferay-ui:search:type", _type);
064 }
065
066 private String _id;
067 private String _markupView;
068 private String _type = "regular";
069
070 }