Your welcome, I'm glad I could help. I basically ran line by line through the tiles code for an entire day to figure out why things were not displaying.
JB -----Original Message----- From: Butash, Bob [mailto:[EMAIL PROTECTED] Sent: Friday, September 08, 2006 1:18 PM To: [email protected] Subject: RE: Shale 1.0.3 and Tiles Question - Tag Question Yes thank you...that did it. I added the template to the definition. I did not need to add the empty item to the layout, nor did I need to add the type attribute in the JSP. So my definitions look like: <definition name="/simpleLayout" path="/jsp/simpleLayout.jsp"> </definition> <definition name="/simpleSample" extends="/simpleLayout"> <put name="content" type="template" value="/jsp/home.jsp"></put> </definition> And my JSP line looks like: <tiles:insert flush="false" name="content"/> Thanks so much!!!! -----Original Message----- From: Baker,Jonathan [mailto:[EMAIL PROTECTED] Sent: Friday, September 08, 2006 1:08 PM To: [email protected] Subject: RE: Shale 1.0.3 and Tiles Question - Tag Question One more thing to try: <definition name="/simpleLayout" path="/jsp/simpleLayout.jsp"> <put name="content" type="template" value=""/> </definition> <definition name="/simpleSample" extends="/simpleLayout"> <put name="content" type="template" value="/jsp/home.jsp"/> </definition> I added the type attribute to the definitions as well. Sorry I missed that before. Good Luck. JB -----Original Message----- From: Butash, Bob [mailto:[EMAIL PROTECTED] Sent: Friday, September 08, 2006 12:54 PM To: [email protected] Subject: RE: Shale 1.0.3 and Tiles Question - Tag Question Try both of those recommendations....without luck. I did have a tag defined for the s prefix. It was the shale core library. I removed the subview, and still no luck. The new examples posted out there do not illustrate how to extend from definitions. Anything additional that I can try?? Please assist if you can, I've been stuck for some time now. Thanks -----Original Message----- From: Baker,Jonathan [mailto:[EMAIL PROTECTED] Sent: Friday, September 08, 2006 12:43 PM To: [email protected] Subject: RE: Shale 1.0.3 and Tiles Question - Tag Question I am using the same componenets. The only thing I did different is I defined the subtiles in the layout definition, but left them blank. <definition name="/simpleLayout" path="/jsp/simpleLayout.jsp"> <put name="content" value=""/> </definition> And in the layout.jsp I added the type attribute <tiles:insert name="content" type="attribute" flush="false"/> And everything seems to work fine for me. I also am not putting a subview tag around the tiles tag. I don't know if that makes a difference or not. Although in your example it says "<s:subview id="content">" I don't know if this is a typo or not. If you don't have a custom tag library defined for s, you may want to switch that to f or remove it completely. JB -----Original Message----- From: Butash, Bob [mailto:[EMAIL PROTECTED] Sent: Friday, September 08, 2006 12:36 PM To: [email protected] Subject: RE: Shale 1.0.3 and Tiles Question - Tag Question Once again trying to get Shale Tiles to work with Shale 1.0.3 and the snap shot version of tiles that is packaged with it. And although I corrected the attributes that I referenced below, I still can not get a simple page to render. Please take a look at this example and see if I'm doing anything wrong: Tiles Def: <tiles-definitions> <definition name="/simpleLayout" path="/jsp/simpleLayout.jsp"> </definition> <definition name="/simpleSample" extends="/simpleLayout"> <put name="content" value="/jsp/home.jsp"></put> </definition> Layout JSP: <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> <%@ taglib uri="http://myfaces.apache.org/adf/faces" prefix="af"%> <%@ taglib uri="http://myfaces.apache.org/adf/faces/html" prefix="afh"%> <%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%> <%@ taglib uri="http://shale.apache.org/core" prefix="s"%> <f:view> <afh:html> <afh:head></afh:head> <afh:body> <s:subview id="content"> <tiles:insert name="content" flush="false"/> </s:subview> </afh:body> </afh:html> </f:view> Content JSP: <%@ taglib uri="http://myfaces.apache.org/adf/faces" prefix="af"%> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> <f:loadBundle basename="com.eds.movie.resources.ApplicationResources" var="messages"/> <af:outputFormatted value="#{messages['home.welcome']}" styleUsage="pageStamp"/> The URL that I invoke is: http://localhost:8988/test-war/faces/simpleSample The error that I get is: java.lang.NullPointerException at org.apache.tiles.taglib.InsertTag.doStartTag(InsertTag.java:367) at _jsp._simpleLayout._jspService(_simpleLayout.java:93) [/jsp/simpleLayout.jsp] at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.1.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:453) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:591) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:515) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.j ava:711) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDis patcher.java:368) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.unprivileged_forward(ServletReque stDispatcher.java:287) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.access$100(ServletRequestDispatch er.java:50) at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatche r.java:193) I'm using the JSF 1.1 reference implementation. Also I did notice that if I change the tile definition and move the content declaration into the "/simpleLayout" declaration and reference the "/simpleSample" url it works. If I try to reference the "simpleLayout" url I get the same nullpointer error as dictated above. Trying to pull in the 1.0.3 version of shale but since it does not work with the non snapshot version of tiles I'm forced to stay at the 1.0.3 snapshot version. Any help would be greatly appreciated. Thanks again. -----Original Message----- From: Butash, Bob [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 05, 2006 7:22 AM To: [email protected] Subject: RE: Shale 1.0.3 and Tiles Question - Tag Question Greg and Wendy - Thanks for the information...I'll give it a shot. -----Original Message----- From: Greg Reddin [mailto:[EMAIL PROTECTED] Sent: Friday, September 01, 2006 4:58 PM To: [email protected] Subject: Re: Shale 1.0.3 and Tiles Question - Tag Question On Sep 1, 2006, at 3:22 PM, Wendy Smoak wrote: > In that thread, Greg wrote: > 1) attribute, definition, name could all be resolved to name. > 2) component, page, and template could all be resolved to template. You are correct about the missing doc. We haven't created that yet. The above should be true for name and template. As for beanName and beanValue those were removed and not replaced. Those attributes were originally "pre-EL" and were used to use a bean in scope to resolve a Tiles definition. With EL you shouldn't need them. You can do something like this: <tiles:put name="foo" value="${foo.bar}"/> However, there has been some discussion on the Struts list that might lead us to add these values back. You might want to join up there if you are interested. Sorry for the mess. I hope we'll get these things stabilized soon. As Wendy said, it's all still in flux right now. Thanks, Greg
