1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.seasar.teeda.core.config.faces.assembler.impl; |
17 | |
|
18 | |
import java.util.List; |
19 | |
import java.util.Locale; |
20 | |
|
21 | |
import javax.faces.application.Application; |
22 | |
|
23 | |
import org.seasar.teeda.core.config.faces.assembler.ApplicationChildAssembler; |
24 | |
import org.seasar.teeda.core.config.faces.element.LocaleConfigElement; |
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | |
public class LocaleConfigAssembler extends ApplicationChildAssembler { |
30 | |
|
31 | |
private LocaleConfigElement localeConfig_; |
32 | |
|
33 | |
public LocaleConfigAssembler(LocaleConfigElement localeConfig, |
34 | |
Application application) { |
35 | 4 | super(application); |
36 | 4 | localeConfig_ = localeConfig; |
37 | 4 | } |
38 | |
|
39 | |
public void assemble() { |
40 | 4 | Locale defaultLocale = localeConfig_.getDefaultLocale(); |
41 | 4 | getApplication().setDefaultLocale(defaultLocale); |
42 | |
|
43 | 4 | List supportedLocales = localeConfig_.getSupportedLocales(); |
44 | 4 | getApplication().setSupportedLocales(supportedLocales); |
45 | 4 | } |
46 | |
|
47 | |
} |