1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.seasar.teeda.core.mock; |
17 | |
|
18 | |
import java.io.IOException; |
19 | |
import java.util.Locale; |
20 | |
|
21 | |
import javax.faces.FacesException; |
22 | |
import javax.faces.component.UIViewRoot; |
23 | |
import javax.faces.context.FacesContext; |
24 | |
|
25 | |
|
26 | |
|
27 | |
|
28 | 1370 | public class MockViewHandlerImpl extends MockViewHandler { |
29 | |
|
30 | 1370 | private Locale locale_ = Locale.getDefault(); |
31 | |
|
32 | |
public Locale calculateLocale(FacesContext context) { |
33 | 8 | return locale_; |
34 | |
} |
35 | |
|
36 | |
public String calculateRenderKitId(FacesContext context) { |
37 | 0 | return null; |
38 | |
} |
39 | |
|
40 | |
public UIViewRoot createView(FacesContext context, String viewId) { |
41 | 9 | UIViewRoot root = new UIViewRoot(); |
42 | 9 | root.setViewId(viewId); |
43 | 9 | return root; |
44 | |
} |
45 | |
|
46 | |
public String getActionURL(FacesContext context, String viewId) { |
47 | 13 | return viewId; |
48 | |
} |
49 | |
|
50 | |
public String getResourceURL(FacesContext context, String path) { |
51 | 7 | return path; |
52 | |
} |
53 | |
|
54 | |
public void renderView(FacesContext context, UIViewRoot viewToRender) |
55 | |
throws IOException, FacesException { |
56 | 0 | } |
57 | |
|
58 | |
public UIViewRoot restoreView(FacesContext context, String viewId) { |
59 | 3 | return null; |
60 | |
} |
61 | |
|
62 | |
public void writeState(FacesContext context) throws IOException { |
63 | 10 | } |
64 | |
|
65 | |
public void setLocale(Locale locale) { |
66 | 3 | locale_ = locale; |
67 | 3 | } |
68 | |
|
69 | |
} |