1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.myfaces.custom.htmlTag;
20
21 import javax.faces.component.UIOutput;
22 import javax.faces.context.FacesContext;
23
24 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFComponent;
25 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFJspProperty;
26 import org.apache.myfaces.component.ForceIdAware;
27 import org.apache.myfaces.component.StyleAware;
28 import org.apache.myfaces.component.UserRoleAware;
29 import org.apache.myfaces.component.UserRoleUtils;
30 import org.apache.myfaces.component.html.util.HtmlComponentUtils;
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54 @JSFComponent(
55 name = "t:htmlTag",
56 clazz = "org.apache.myfaces.custom.htmlTag.HtmlTag",
57 tagClass = "org.apache.myfaces.custom.htmlTag.HtmlTagTag")
58 @JSFJspProperty(
59 name = "converter",
60 returnType = "javax.faces.convert.Converter",
61 tagExcluded = true)
62 public abstract class AbstractHtmlTag extends UIOutput
63 implements UserRoleAware, StyleAware, ForceIdAware
64 {
65 public static final String COMPONENT_TYPE = "org.apache.myfaces.HtmlTag";
66 public static final String COMPONENT_FAMILY = "javax.faces.Output";
67 private static final String DEFAULT_RENDERER_TYPE = "org.apache.myfaces.HtmlTagRenderer";
68
69 public String getClientId(FacesContext context)
70 {
71 String clientId = HtmlComponentUtils.getClientId(this,
72 getRenderer(context), context);
73 if (clientId == null)
74 {
75 clientId = super.getClientId(context);
76 }
77
78 return clientId;
79 }
80
81 public boolean isRendered()
82 {
83 if (!UserRoleUtils.isVisibleOnUserRole(this)) return false;
84 return super.isRendered();
85 }
86
87 }