You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "David Evans (JIRA)" <ji...@apache.org> on 2006/05/02 06:20:19 UTC

[jira] Closed: (STR-1149) Nested tiles fail in this release

     [ http://issues.apache.org/struts/browse/STR-1149?page=all ]
     
David Evans closed STR-1149:
----------------------------

    Resolution: Not A Problem
     Assign To: David Graham

> Nested tiles fail in this release
> ---------------------------------
>
>          Key: STR-1149
>          URL: http://issues.apache.org/struts/browse/STR-1149
>      Project: Struts Action 1
>         Type: Bug

>   Components: Tiles
>     Versions: 1.1 Beta 3
>  Environment: Operating System: All
> Platform: PC
>     Reporter: John Zittlau
>     Assignee: David Graham

>
> Tiles nested in tiles fail in 1.1 Beta 3, but work in previous versions. In Beta 
> 3, the layout is incorrect. This fails using both Tomcat 4.0.6 and JBoss 3.0.4 
> using the bundled Jetty JSP container.
> eg.
> First page defined as:
> <%@ taglib uri="/tags/struts-bean" prefix="bean" %>
> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
> <tiles:insert definition="standardDefinition" flush="true" >
>   <tiles:put name="title">Nested Tiles</tiles:put>
>   <tiles:put name="body" value="/WEB-INF/jsp/content/NestedTiles.jsp" />
>   <tiles:put name="menu" type="string" value="&nbsp;" />
> </tiles:insert>
> ===================
> /WEB-INF/jsp/content/NestedTiles.jsp defined as:
> <%@ taglib uri="/tags/struts-bean" prefix="bean" %>
> <%@ taglib uri="/tags/struts-html" prefix="html" %>
> <%@ taglib uri="/tags/struts-logic" prefix="logic" %>
> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
> <%
> 	pageContext.setAttribute("formElementsSource", 
> "/WEB-INF/jsp/content/formElements/NestTiles.jsp");
> %>
> <html:form action="/Search?action=DoSearch" method="post">
> <p>
> <tiles:insert page="/WEB-INF/jsp/layout/searchFormLayout.jsp" flush="false" >
> 	<tiles:put name="formElements" beanName="formElementsSource" 
> beanScope="page"/>
> </tiles:insert>
> <html:hidden property="infoType" value="Books"/>
> <html:hidden property="searchType" value="library"/>
> </html:form>
> ===================
> /WEB-INF/jsp/layout/searchFormLayout.jsp defined as:
> <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
> <%@ taglib uri="/tags/struts-html" prefix="html" %>
> <tiles:insert attribute="formElements"/>
> ========================
> and /WEB-INF/jsp/content/formElements/NestTiles.jsp defined as:
> <%@ taglib uri="/tags/struts-html" prefix="html" %>
> <html:text property="searchTerm1" />
> <html:submit value="Go" styleId="submit"/>
> =======================
> In previous versions, the generated HTML is correct.
> In Beta 3, the following fragment is generated
> ....
> <input type="text" name="searchTerm1" value="">
> <input type="submit" value="Go" id="submit">
> <form name="SearchForm" method="post" 
> action="/search/Search.do?action=DoSearch">
> <p>
> <input type="hidden" name="infoType" value="Books">
> <input type="hidden" name="searchType" value="library">
> </form>
> ....
> As can be seen, the nested elements ("text" and "submit") are defined before the 
> form, and hence the form fails.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira