2006/unicorn/src/org/w3c/unicorn/action IndexAction.java,1.8,1.9 ObserveAction.java,1.9,1.10

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

Modified Files:
	IndexAction.java ObserveAction.java 
Log Message:
add the queryString to the context

Index: IndexAction.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/action/IndexAction.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- IndexAction.java	2 Sep 2009 10:40:45 -0000	1.8
+++ IndexAction.java	3 Sep 2009 12:28:49 -0000	1.9
@@ -54,7 +54,13 @@
 		
 		velocityContext = new VelocityContext(Language.getContext(langParameter));
 		
-		
+		String query = req.getQueryString();
+		String queryString = "";
+		if (query != null)
+			queryString = query.replaceAll("&?ucn_lang=[^&]*", "");
+		if (!queryString.equals(""))
+			queryString += "&";
+		velocityContext.put("queryString", queryString);
 		
 		/*messages.add(new Message(Message.Level.WARNING, "un warning", null));
 		messages.add(new Message(Message.Level.ERROR, "une error", null));

Index: ObserveAction.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/action/ObserveAction.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- ObserveAction.java	2 Sep 2009 13:53:48 -0000	1.9
+++ ObserveAction.java	3 Sep 2009 12:28:49 -0000	1.10
@@ -100,6 +100,18 @@
 		
 		logger.debug("Lang Parameter: " + langParameter);
 		
+		// Add query string
+		
+		
+		String query = req.getQueryString();
+		String queryString = "";
+		if (query != null)
+			queryString = query.replaceAll("&?ucn_lang=[^&]*", "");
+		if (!queryString.equals(""))
+			queryString += "&";
+		mapOfStringObject.put("queryString", queryString);
+		
+		
 		
 		
 		// Variables related to the output
@@ -119,6 +131,7 @@
 			aUnicornCall.setLang(langParameter + "," + aLocale);
 		}
 
+		
 		for (final Enumeration<?> aEnumParamName = req
 				.getParameterNames(); aEnumParamName.hasMoreElements();) {
 			final String sParamName = (String) aEnumParamName.nextElement();

Received on Thursday, 3 September 2009 12:29:03 UTC