2006/unicorn/src/org/w3c/unicorn/action IndexAction.java,1.25,1.26

Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/action
In directory hutz:/tmp/cvs-serv30781/src/org/w3c/unicorn/action

Modified Files:
	IndexAction.java 
Log Message:
changed typed of "lang" from String to ULocale to match new signatures of Message and MessageList objects

Index: IndexAction.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/action/IndexAction.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- IndexAction.java	6 Oct 2009 08:16:02 -0000	1.25
+++ IndexAction.java	20 Mar 2010 17:04:37 -0000	1.26
@@ -22,14 +22,12 @@
 import org.w3c.unicorn.util.Property;
 import org.w3c.unicorn.util.Templates;
 
+import com.ibm.icu.util.ULocale;
+
 public class IndexAction extends Action {
 
 	private static final long serialVersionUID = 599055553694915687L;
 	
-	//private static Log logger = LogFactory.getLog(IndexAction.class);
-	
-	//private VelocityContext velocityContext;
-	
 	@Override
 	public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
 		
@@ -43,13 +41,12 @@
 		
 		resp.setContentType("text/html; charset=UTF-8");
 		
-		//ArrayList<Message> messages = new ArrayList<Message>();
-		MessageList messages = new MessageList(Property.get("DEFAULT_LANGUAGE"));
+		MessageList messages = new MessageList(Language.getDefaultLocale());
 		String paramPrefix = Property.get("UNICORN_PARAMETER_PREFIX");
 		
 		String queryString = "./" + getQueryStringWithout(paramPrefix + "lang", req);
-		String lang = getLanguage((String) req.getParameter(paramPrefix + "lang"), req, messages);
-		messages.setLang(lang);
+		ULocale lang = getLanguage((String) req.getParameter(paramPrefix + "lang"), req, messages);
+		messages.setLocale(lang);
 		String task = getTask((String) req.getParameter(paramPrefix + "task"), null);
 		
 		VelocityContext velocityContext = new VelocityContext(Language.getContext(lang));

Received on Saturday, 20 March 2010 17:04:40 UTC