1
22
23 package com.liferay.taglib.ui;
24
25 import com.liferay.taglib.util.IncludeTag;
26
27 import javax.servlet.http.HttpServletRequest;
28
29
34 public class CustomAttributeTag extends IncludeTag {
35
36 public int doStartTag() {
37 HttpServletRequest request =
38 (HttpServletRequest)pageContext.getRequest();
39
40 request.setAttribute(
41 "liferay-ui:custom-attribute:className", _className);
42 request.setAttribute(
43 "liferay-ui:custom-attribute:classPK", String.valueOf(_classPK));
44 request.setAttribute(
45 "liferay-ui:custom-attribute:editable", String.valueOf(_editable));
46 request.setAttribute(
47 "liferay-ui:custom-attribute:label", String.valueOf(_label));
48 request.setAttribute("liferay-ui:custom-attribute:name", _name);
49
50 return EVAL_BODY_BUFFERED;
51 }
52
53 public void setClassName(String className) {
54 _className = className;
55 }
56
57 public void setClassPK(long classPK) {
58 _classPK = classPK;
59 }
60
61 public void setEditable(boolean editable) {
62 _editable = editable;
63 }
64
65 public void setLabel(boolean label) {
66 _label = label;
67 }
68
69 public void setName(String name) {
70 _name = name;
71 }
72
73 protected String getDefaultPage() {
74 return _PAGE;
75 }
76
77 private static final String _PAGE =
78 "/html/taglib/ui/custom_attribute/page.jsp";
79
80 private String _className;
81 private long _classPK;
82 private boolean _editable = false;
83 private boolean _label = false;
84 private String _name;
85
86 }