On Jun 2, 2006, at 2:20 AM, James Mitchell wrote:

The group id for Standalone Tiles (sandbox/tiles) says 'org.apache.struts.tiles'. Are we waiting till Tiles moves out of sandbox before we change that to 'org.apache.tiles'? I'd like to change it now. Your thoughts?

Wendy, correct me if I'm wrong, but I think this is done because the base group id for Struts is org.apache.struts and as long as Tiles is still part of Struts it will need to retain the struts part of the group id.

/**
  * This view handler strips the suffix off of the view ID and looks
@@ -263,7 +265,7 @@
           ServletRequest servletRequest = (ServletRequest) request;
           ServletContext servletContext = (ServletContext) context;
           try {
- tile = TilesUtil.getDefinition(name, servletRequest, servletContext); + tile = TilesUtil.getDefinition(name, new ServletTilesContext(servletContext, (HttpServletRequest) servletRequest));

This is part of my lack of knowledge of JSF. But is the view handler already married to the servlet API or is it possible to get here and be in the portlet API? You should probably be using the TilesContextFactory here to be more generic.

Index: tiles-core/src/main/java/org/apache/tiles/ComponentContext.java
===================================================================
--- tiles-core/src/main/java/org/apache/tiles/ ComponentContext.java (revision 411013) +++ tiles-core/src/main/java/org/apache/tiles/ ComponentContext.java (working copy)
@@ -25,6 +25,7 @@
import java.util.Map;
import java.util.Set;
+import javax.servlet.ServletRequest;
import javax.servlet.jsp.PageContext;
import org.apache.tiles.taglib.ComponentConstants;
@@ -186,6 +187,14 @@
} return (ComponentContext) tilesContext.getRequestScope().get(
             ComponentConstants.COMPONENT_CONTEXT);
     }
+
+ static public ComponentContext getContext(ServletRequest request) { + if (request.getAttribute("javax.servlet.jsp.jspException") ! = null) {
+               return null;
+       }

We can't put Servlet API dependencies on the Tiles API. One of the core objectives for Standalone Tiles is to factor out dependencies on the Servlet API. The above method should be using TilesContext.

+    static public void setContext(
+               ComponentContext context, ServletRequest request) {
+
+ request.setAttribute(ComponentConstants.COMPONENT_CONTEXT, context);
+    }

Again, use TilesContext here instead of ServletRequest.

Thanks for doing this.  My *real* job is killing me this week :-)

Greg

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to