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