My favorites
▼
|
Sign in
jmesa
Table Rendering API
Project Home
Downloads
Wiki
Issues
Source
Export to GitHub
READ-ONLY: This project has been
archived
. For more information see
this post
.
Search
Search within:
All issues
Open issues
New issues
Issues to verify
for
Advanced search
Search tips
Subscriptions
Issue
208
attachment: Set_struts_locale_to_WebContext_.patch
(1.5 KB)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Index: src/org/jmesa/facade/TableFacadeFactory.java
===================================================================
--- src/org/jmesa/facade/TableFacadeFactory.java (revision 2167)
+++ src/org/jmesa/facade/TableFacadeFactory.java Thu Jul 23 21:16:03 BST 2009
@@ -29,10 +29,11 @@
import org.jmesa.web.SpringWebContext;
import org.jmesa.web.WebContext;
import org.springframework.context.i18n.LocaleContextHolder;
+import com.opensymphony.xwork2.ActionContext;
/**
* A factory to create TableFacade implementations.
- *
+ *
* @since 2.2
* @author Jeff Johnston
*/
@@ -64,9 +65,9 @@
}
public static TableFacade createSpringTableFacade(String id, SpringWebContext springWebContext) {
-
+
springWebContext.setLocale(LocaleContextHolder.getLocale());
-
+
TableFacade tableFacade = createTableFacade(id, springWebContext);
Messages messages = MessagesFactory.getMessages(springWebContext);
SpringMessages springMessages = new SpringMessages(messages, springWebContext);
@@ -80,6 +81,9 @@
}
public static TableFacade createStruts2TableFacade(String id, WebContext webContext) {
+
+ webContext.setLocale(ActionContext.getContext().getLocale());
+
TableFacade tableFacade = createTableFacade(id, webContext);
Messages messages = MessagesFactory.getMessages(webContext);
Struts2Messages struts2Messages = new Struts2Messages(messages, webContext);
Powered by
Google Project Hosting