2009/05/20 - Apache Shale has been retired.
For more information, please explore the Attic.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.shale.examples.test.view;
21
22 import javax.faces.context.FacesContext;
23 import org.apache.shale.view.AbstractViewController;
24 import org.apache.shale.view.Constants;
25 import org.apache.shale.view.faces.FacesConstants;
26
27 /***
28 * <p>View Controller class for <code>/status.jsp</code>.</p>
29 */
30 public class Status extends AbstractViewController {
31
32
33
34
35
36 /***
37 * <p>Return the class name of the attribute configured under name
38 * {@link FacesConstants.EXCEPTION_HANDLER}.</p>
39 */
40 public String getExceptionHandler() {
41 FacesContext context = FacesContext.getCurrentInstance();
42 Object result = context.getApplication().getVariableResolver().
43 resolveVariable(context, Constants.EXCEPTION_HANDLER);
44 if (result == null) {
45 return null;
46 } else {
47 return result.getClass().getName();
48 }
49 }
50
51
52 /***
53 * <p>Return the class name of the attribute configured under name
54 * {@link FacesConstants.VIEW_CALLBACKS}.</p>
55 */
56 public String getViewCallbacks() {
57 FacesContext context = FacesContext.getCurrentInstance();
58 Object result = context.getApplication().getVariableResolver().
59 resolveVariable(context, FacesConstants.VIEW_CALLBACKS);
60 if (result == null) {
61 return null;
62 } else {
63 return result.getClass().getName();
64 }
65 }
66
67
68 /***
69 * <p>Return the class name of the attribute configured under name
70 * {@link FacesConstants.VIEW_MAPPER}.</p>
71 */
72 public String getViewMapper() {
73 FacesContext context = FacesContext.getCurrentInstance();
74 Object result = context.getApplication().getVariableResolver().
75 resolveVariable(context, Constants.VIEW_MAPPER);
76 if (result == null) {
77 return null;
78 } else {
79 return result.getClass().getName();
80 }
81 }
82
83
84
85
86
87 }