tiles-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r529592 - in /tiles/examples/trunk/tiles-showcase: pom.xml src/main/java/org/apache/tiles/showcase/lang/SelectLocaleAction.java src/main/java/org/apache/tiles/showcase/portal/UserMenuAction.java
Date Tue, 17 Apr 2007 13:15:42 GMT
Author: apetrelli
Date: Tue Apr 17 06:15:41 2007
New Revision: 529592

URL: http://svn.apache.org/viewvc?view=rev&rev=529592
Log:
Aligned showcase to 2.0.4-SNAPSHOT version of Tiles.

Modified:
    tiles/examples/trunk/tiles-showcase/pom.xml
    tiles/examples/trunk/tiles-showcase/src/main/java/org/apache/tiles/showcase/lang/SelectLocaleAction.java
    tiles/examples/trunk/tiles-showcase/src/main/java/org/apache/tiles/showcase/portal/UserMenuAction.java

Modified: tiles/examples/trunk/tiles-showcase/pom.xml
URL: http://svn.apache.org/viewvc/tiles/examples/trunk/tiles-showcase/pom.xml?view=diff&rev=529592&r1=529591&r2=529592
==============================================================================
--- tiles/examples/trunk/tiles-showcase/pom.xml (original)
+++ tiles/examples/trunk/tiles-showcase/pom.xml Tue Apr 17 06:15:41 2007
@@ -52,7 +52,7 @@
       <dependency>
          <groupId>${pom.groupId}</groupId>
          <artifactId>tiles-jsp</artifactId>
-         <version>2.0.2-SNAPSHOT</version>
+         <version>2.0.4-SNAPSHOT</version>
       </dependency>
       <dependency>
          <groupId>javax.servlet</groupId>

Modified: tiles/examples/trunk/tiles-showcase/src/main/java/org/apache/tiles/showcase/lang/SelectLocaleAction.java
URL: http://svn.apache.org/viewvc/tiles/examples/trunk/tiles-showcase/src/main/java/org/apache/tiles/showcase/lang/SelectLocaleAction.java?view=diff&rev=529592&r1=529591&r2=529592
==============================================================================
--- tiles/examples/trunk/tiles-showcase/src/main/java/org/apache/tiles/showcase/lang/SelectLocaleAction.java
(original)
+++ tiles/examples/trunk/tiles-showcase/src/main/java/org/apache/tiles/showcase/lang/SelectLocaleAction.java
Tue Apr 17 06:15:41 2007
@@ -30,7 +30,7 @@
 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionForward;
 import org.apache.struts.action.ActionMapping;
-import org.apache.tiles.Constants;
+import org.apache.tiles.locale.impl.DefaultLocaleResolver;
 
 /**
  * @version $Rev$ $Date$
@@ -84,7 +84,7 @@
       {
       HttpSession session = request.getSession(false);
       if (session != null)
-        session.setAttribute(Constants.LOCALE_KEY, locale);
+        session.setAttribute(DefaultLocaleResolver.LOCALE_KEY, locale);
 
       }
 }

Modified: tiles/examples/trunk/tiles-showcase/src/main/java/org/apache/tiles/showcase/portal/UserMenuAction.java
URL: http://svn.apache.org/viewvc/tiles/examples/trunk/tiles-showcase/src/main/java/org/apache/tiles/showcase/portal/UserMenuAction.java?view=diff&rev=529592&r1=529591&r2=529592
==============================================================================
--- tiles/examples/trunk/tiles-showcase/src/main/java/org/apache/tiles/showcase/portal/UserMenuAction.java
(original)
+++ tiles/examples/trunk/tiles-showcase/src/main/java/org/apache/tiles/showcase/portal/UserMenuAction.java
Tue Apr 17 06:15:41 2007
@@ -47,6 +47,7 @@
 import org.apache.tiles.context.TilesRequestContext;
 import org.apache.tiles.context.servlet.ServletTilesRequestContext;
 import org.apache.tiles.definition.Definition;
+import org.apache.tiles.preparer.PreparerException;
 import org.apache.tiles.preparer.ViewPreparer;
 import org.apache.tiles.showcase.ExposerTilesContainer;
 import org.apache.tiles.showcase.channel.AttributeUtils;
@@ -351,12 +352,18 @@
 	 */
 	public void execute(TilesRequestContext tilesContext,
 		AttributeContext tileContext)
-		throws Exception {
+		throws PreparerException {
             
 		log.debug("Enter action UserMenuAction");
 
 		// Load user settings from user context
-		MenuSettings settings = getUserSettings(tilesContext, tileContext);
+		MenuSettings settings;
+        try {
+            settings = getUserSettings(tilesContext, tileContext);
+        } catch (ServletException e) {
+            throw new PreparerException("Exception when getting user settings",
+                    e);
+        }
 
 		// Set parameters for rendering page
 		tileContext.putAttribute(USER_ITEMS_ATTRIBUTE, new Attribute(



Mime
View raw message