1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
package org.apache.myfaces.renderkit.html; |
20 | |
|
21 | |
import java.io.IOException; |
22 | |
import java.util.logging.Level; |
23 | |
import java.util.logging.Logger; |
24 | |
|
25 | |
import javax.faces.component.UIComponent; |
26 | |
import javax.faces.context.FacesContext; |
27 | |
|
28 | |
import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFRenderer; |
29 | |
import org.apache.myfaces.shared.renderkit.html.HtmlRenderer; |
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | |
|
35 | |
|
36 | |
@JSFRenderer(renderKitId = "HTML_BASIC", family = "javax.faces.NamingContainer", type = "javax.faces.Composite") |
37 | 0 | public class HtmlCompositeComponentRenderer extends HtmlRenderer |
38 | |
{ |
39 | |
|
40 | 0 | private static final Logger log = Logger.getLogger(HtmlCompositeComponentRenderer.class.getName()); |
41 | |
|
42 | |
public boolean getRendersChildren() |
43 | |
{ |
44 | 0 | return true; |
45 | |
} |
46 | |
|
47 | |
public void encodeBegin(FacesContext context, UIComponent component) |
48 | |
throws IOException |
49 | |
{ |
50 | 0 | } |
51 | |
|
52 | |
public void encodeChildren(FacesContext context, UIComponent component) |
53 | |
throws IOException |
54 | |
{ |
55 | 0 | UIComponent compositeFacet = (UIComponent) component.getFacet(UIComponent.COMPOSITE_FACET_NAME); |
56 | |
|
57 | 0 | if (compositeFacet == null) |
58 | |
{ |
59 | 0 | if (log.isLoggable(Level.SEVERE)) |
60 | |
{ |
61 | 0 | log.severe("facet UIComponent.COMPOSITE_FACET_NAME not found when rendering composite component "+ |
62 | |
component.getClientId(context)); |
63 | |
} |
64 | 0 | return; |
65 | |
} |
66 | 0 | compositeFacet.encodeAll(context); |
67 | 0 | } |
68 | |
|
69 | |
public void encodeEnd(FacesContext context, UIComponent component) |
70 | |
throws IOException |
71 | |
{ |
72 | 0 | } |
73 | |
|
74 | |
} |