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.jsf.core;
20
21 import javax.faces.component.UIImportConstants;
22 import javax.faces.component.UIParameter;
23 import javax.faces.component.UISelectItem;
24 import javax.faces.component.UISelectItems;
25 import javax.faces.component.UIViewAction;
26 import javax.faces.component.UIViewParameter;
27 import javax.faces.convert.DateTimeConverter;
28 import javax.faces.convert.NumberConverter;
29 import javax.faces.validator.BeanValidator;
30 import javax.faces.validator.DoubleRangeValidator;
31 import javax.faces.validator.LengthValidator;
32 import javax.faces.validator.LongRangeValidator;
33 import javax.faces.validator.RegexValidator;
34 import javax.faces.validator.RequiredValidator;
35 import org.apache.myfaces.component.validate.ValidateWholeBeanComponent;
36
37 import org.apache.myfaces.view.facelets.tag.AbstractTagLibrary;
38
39
40
41
42
43
44
45
46 public final class CoreLibrary extends AbstractTagLibrary
47 {
48
49 public final static String NAMESPACE = "http://xmlns.jcp.org/jsf/core";
50 public final static String ALIAS_NAMESPACE = "http://java.sun.com/jsf/core";
51
52 public final static CoreLibrary INSTANCE = new CoreLibrary();
53
54 public CoreLibrary()
55 {
56 super(NAMESPACE, ALIAS_NAMESPACE);
57
58 this.addTagHandler("actionListener", ActionListenerHandler.class);
59
60 this.addTagHandler("ajax", AjaxHandler.class);
61
62 this.addTagHandler("attribute", AttributeHandler.class);
63
64 this.addTagHandler("attributes", AttributesHandler.class);
65
66 this.addConverter("convertDateTime", DateTimeConverter.CONVERTER_ID, ConvertDateTimeHandler.class);
67
68 this.addConverter("convertNumber", NumberConverter.CONVERTER_ID, ConvertNumberHandler.class);
69
70 this.addConverter("converter", null, ConvertDelegateHandler.class);
71
72 this.addTagHandler ("event", EventHandler.class);
73
74 this.addTagHandler("facet", FacetHandler.class);
75
76 this.addTagHandler("loadBundle", LoadBundleHandler.class);
77
78 this.addTagHandler("metadata", ViewMetadataHandler.class);
79
80 this.addComponent("param", UIParameter.COMPONENT_TYPE, null);
81
82 this.addTagHandler("passThroughAttribute", PassThroughAttributeHandler.class);
83
84 this.addTagHandler("passThroughAttributes", PassThroughAttributesHandler.class);
85
86 this.addTagHandler("phaseListener", PhaseListenerHandler.class);
87
88 this.addTagHandler("resetValues", ResetValuesActionListenerHandler.class);
89
90 this.addComponent("selectItem", UISelectItem.COMPONENT_TYPE, null, SelectItemHandler.class);
91
92 this.addComponent("selectItems", UISelectItems.COMPONENT_TYPE, null, SelectItemsHandler.class);
93
94 this.addTagHandler("setPropertyActionListener", SetPropertyActionListenerHandler.class);
95
96 this.addComponent("subview", "javax.faces.NamingContainer", null);
97
98 this.addValidator("validateBean", BeanValidator.VALIDATOR_ID);
99
100 this.addValidator("validateLength", LengthValidator.VALIDATOR_ID);
101
102 this.addValidator("validateLongRange", LongRangeValidator.VALIDATOR_ID);
103
104 this.addValidator("validateDoubleRange", DoubleRangeValidator.VALIDATOR_ID);
105
106 this.addValidator("validateRegex", RegexValidator.VALIDATOR_ID);
107
108 this.addValidator("validateRequired", RequiredValidator.VALIDATOR_ID);
109
110 this.addValidator("validator", null, ValidateDelegateHandler.class);
111
112 this.addTagHandler("valueChangeListener", ValueChangeListenerHandler.class);
113
114 this.addTagHandler("view", ViewHandler.class);
115
116 this.addComponent("viewAction", UIViewAction.COMPONENT_TYPE, null);
117
118 this.addComponent("viewParam", UIViewParameter.COMPONENT_TYPE, null);
119
120 this.addComponent("importConstants", UIImportConstants.COMPONENT_TYPE, null);
121
122 this.addComponent("verbatim", "javax.faces.HtmlOutputText", "javax.faces.Text", VerbatimHandler.class);
123
124 this.addComponent("validateWholeBean", ValidateWholeBeanComponent.COMPONENT_TYPE, null);
125
126 this.addComponent("websocket", "javax.faces.Websocket",
127 "javax.faces.Websocket", WebsocketHandler.class);
128 }
129 }