1
14
15 package com.liferay.taglib.ui;
16
17 import com.liferay.portal.kernel.util.Validator;
18 import com.liferay.taglib.util.IncludeTag;
19
20 import javax.servlet.http.HttpServletRequest;
21
22
27 public class WriteTag extends IncludeTag {
28
29 public void setBean(Object bean) {
30 _bean = bean;
31 }
32
33 public void setProperty(String property) {
34 _property = property;
35 }
36
37 protected void cleanUp() {
38 _bean = null;
39 _property = null;
40 }
41
42 protected String getPage() {
43 if ((_bean == null) || Validator.isNull(_property)) {
44 return null;
45 }
46 else {
47 return _PAGE;
48 }
49 }
50
51 protected void setAttributes(HttpServletRequest request) {
52 request.setAttribute("liferay-ui:write:bean", _bean);
53 request.setAttribute("liferay-ui:write:property", _property);
54 }
55
56 private static final String _PAGE = "/html/taglib/ui/write/page.jsp";
57
58 private Object _bean;
59 private String _property;
60
61 }