1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.myfaces.view.facelets.tag.composite;
20
21 import java.io.IOException;
22 import java.util.logging.Level;
23 import java.util.logging.Logger;
24
25 import jakarta.faces.component.UIComponent;
26 import jakarta.faces.view.facelets.FaceletContext;
27 import jakarta.faces.view.facelets.TagConfig;
28 import jakarta.faces.view.facelets.TagHandler;
29
30 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFFaceletTag;
31
32
33
34
35
36 @JSFFaceletTag(name="composite:extension")
37 public class ExtensionHandler extends TagHandler
38 {
39
40 private static final Logger log = Logger.getLogger(ExtensionHandler.class.getName());
41
42 public ExtensionHandler(TagConfig config)
43 {
44 super(config);
45 }
46
47 public void apply(FaceletContext ctx, UIComponent parent)
48 throws IOException
49 {
50
51
52
53
54
55 CompositeComponentBeanInfo beanInfo =
56 (CompositeComponentBeanInfo) parent.getAttributes()
57 .get(UIComponent.BEANINFO_KEY);
58
59 if (beanInfo == null)
60 {
61 if (log.isLoggable(Level.SEVERE))
62 {
63 log.severe("Cannot find composite bean descriptor UIComponent.BEANINFO_KEY ");
64 }
65 return;
66 }
67
68
69 }
70
71 }