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 package org.apache.shale.usecases.lookup;
19
20 import javax.faces.model.SelectItem;
21
22 import org.apache.commons.logging.Log;
23 import org.apache.commons.logging.LogFactory;
24 import org.apache.shale.usecases.view.Domains;
25 import org.apache.shale.util.Messages;
26 import org.apache.shale.view.AbstractViewController;
27
28 /***
29 * <p>ViewController to retrieve the locales that are
30 * supported by this application.</p>
31 *
32 * $Id: ListLocales.java 464373 2006-10-16 04:21:54Z rahul $
33 */
34 public class ListLocales extends AbstractViewController {
35
36
37
38
39
40 /***
41 * <p>The <code>Log</code> instance for this class.</p>
42 */
43 private static final Log log = LogFactory.getLog(ListLocales.class);
44
45
46 /***
47 * <p>Localized messages for this application.</p>
48 */
49 private static Messages messages =
50 new Messages("org.apache.shale.usecases.view.Bundle");
51
52
53
54
55
56 /***
57 * <p>The set of supported locales for this application.</p>
58 */
59 private SelectItem supportedLocales[] = null;
60 public SelectItem[] getSupportedLocales()
61 { return this.supportedLocales; }
62 public void setSupportedLocales(SelectItem[] supportedLocales)
63 { this.supportedLocales = supportedLocales; }
64
65
66
67
68
69
70
71
72 /***
73 * <p>If any calculations were required to acquire the data required to
74 * perform this rendering, that logic would go in this method.</p>
75 */
76 public void prerender() {
77
78 setSupportedLocales
79 (((Domains) getBean("domains")).getSupportedLocales());
80
81 }
82
83
84 /***
85 * <p>If any resources were allocated in the <code>prerender()</code> method
86 * that were needed for rendering, and now need to be cleaned up, that
87 * logic would go in this method.</p>
88 */
89 public void destroy() {
90
91 setSupportedLocales(null);
92
93 }
94
95
96 }