1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.seasar.teeda.core.config.faces.handler; |
17 | |
|
18 | |
import org.seasar.framework.xml.TagHandlerContext; |
19 | |
import org.seasar.teeda.core.config.faces.element.FacesConfig; |
20 | |
import org.seasar.teeda.core.config.faces.element.FactoryElement; |
21 | |
import org.seasar.teeda.core.config.faces.element.impl.FactoryElementImpl; |
22 | |
import org.xml.sax.Attributes; |
23 | |
|
24 | |
|
25 | |
|
26 | |
|
27 | |
public class FactoryTagHandler extends JsfTagHandler { |
28 | |
|
29 | |
private static final long serialVersionUID = 1L; |
30 | |
|
31 | 16 | public FactoryTagHandler() { |
32 | 16 | } |
33 | |
|
34 | |
public void start(TagHandlerContext context, Attributes attributes) { |
35 | 6 | FactoryElement factoryTag = createFactoryElement(); |
36 | 6 | context.push(factoryTag); |
37 | 6 | } |
38 | |
|
39 | |
public void end(TagHandlerContext context, String body) { |
40 | 7 | FactoryElement factoryConfig = (FactoryElement) context.pop(); |
41 | 7 | FacesConfig facesConfig = (FacesConfig) context.peek(); |
42 | 7 | facesConfig.addFactoryElement(factoryConfig); |
43 | 7 | } |
44 | |
|
45 | |
protected FactoryElement createFactoryElement() { |
46 | 6 | return new FactoryElementImpl(); |
47 | |
} |
48 | |
|
49 | |
} |