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.ConverterElement; |
20 | |
import org.seasar.teeda.core.config.faces.element.FacesConfig; |
21 | |
import org.seasar.teeda.core.config.faces.element.impl.ConverterElementImpl; |
22 | |
import org.xml.sax.Attributes; |
23 | |
|
24 | |
|
25 | |
|
26 | |
|
27 | |
public class ConverterTagHandler extends JsfTagHandler { |
28 | |
|
29 | |
private static final long serialVersionUID = 1L; |
30 | |
|
31 | 17 | public ConverterTagHandler() { |
32 | 17 | } |
33 | |
|
34 | |
public void start(TagHandlerContext context, Attributes attributes) { |
35 | 7 | super.start(context, attributes); |
36 | 7 | ConverterElement converter = createConverterElement(); |
37 | 7 | context.push(converter); |
38 | 7 | } |
39 | |
|
40 | |
public void end(TagHandlerContext context, String body) { |
41 | 7 | ConverterElement converter = (ConverterElement) context.pop(); |
42 | 7 | FacesConfig facesConfig = (FacesConfig) context.peek(); |
43 | 7 | facesConfig.addConverterElement(converter); |
44 | 7 | } |
45 | |
|
46 | |
protected ConverterElement createConverterElement() { |
47 | 5 | return new ConverterElementImpl(); |
48 | |
} |
49 | |
} |