Author: apetrelli
Date: Tue Sep  5 04:35:38 2006
New Revision: 440323

URL: http://svn.apache.org/viewvc?view=rev&rev=440323
Log:
SB-34
Added test to the test webapp to check if <tiles:importAttribute> works as 
expected

Added:
    
struts/sandbox/trunk/tiles/tiles-test/src/main/webapp/putattributeslayout.jsp
    
struts/sandbox/trunk/tiles/tiles-test/src/main/webapp/testimportattribute.jsp
Modified:
    struts/sandbox/trunk/tiles/tiles-test/src/main/webapp/WEB-INF/tiles-defs.xml
    struts/sandbox/trunk/tiles/tiles-test/src/main/webapp/index.jsp

Modified: 
struts/sandbox/trunk/tiles/tiles-test/src/main/webapp/WEB-INF/tiles-defs.xml
URL: 
http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-test/src/main/webapp/WEB-INF/tiles-defs.xml?view=diff&rev=440323&r1=440322&r2=440323
==============================================================================
--- 
struts/sandbox/trunk/tiles/tiles-test/src/main/webapp/WEB-INF/tiles-defs.xml 
(original)
+++ 
struts/sandbox/trunk/tiles/tiles-test/src/main/webapp/WEB-INF/tiles-defs.xml 
Tue Sep  5 04:35:38 2006
@@ -26,5 +26,14 @@
       <put name="header" value="/header.jsp"/>
       <put name="body"   value="/body.jsp"/>
   </definition>
+  
+  <definition name="test.putAttributes" template="/putattributeslayout.jsp">
+    <put name="stringTest" value="This is a string" type="string" />
+    <putList name="list">
+      <add value="valueOne" type="string" />
+      <add value="valueTwo" type="string" />
+      <add value="valueThree" type="string" />
+    </putList>
+  </definition>
 
 </tiles-definitions>

Modified: struts/sandbox/trunk/tiles/tiles-test/src/main/webapp/index.jsp
URL: 
http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-test/src/main/webapp/index.jsp?view=diff&rev=440323&r1=440322&r2=440323
==============================================================================
--- struts/sandbox/trunk/tiles/tiles-test/src/main/webapp/index.jsp (original)
+++ struts/sandbox/trunk/tiles/tiles-test/src/main/webapp/index.jsp Tue Sep  5 
04:35:38 2006
@@ -31,6 +31,7 @@
     <a href="testinsertdefinition_override.jsp">Test Insert Configured 
Definition with an overridden content</a><br/>
     <a href="testinsertdefinition_inline.jsp">Test Insert Configured 
Definition with an inline content</a><br/>
     <a href="testput.jsp">Test Put Tag</a><br/>
+    <a href="testimportattribute.jsp">Test importAttribute Tag</a><br/>
     
     <h2>Currently not working tests</h2>
     Currently all the tests work.

Added: 
struts/sandbox/trunk/tiles/tiles-test/src/main/webapp/putattributeslayout.jsp
URL: 
http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-test/src/main/webapp/putattributeslayout.jsp?view=auto&rev=440323
==============================================================================
--- 
struts/sandbox/trunk/tiles/tiles-test/src/main/webapp/putattributeslayout.jsp 
(added)
+++ 
struts/sandbox/trunk/tiles/tiles-test/src/main/webapp/putattributeslayout.jsp 
Tue Sep  5 04:35:38 2006
@@ -0,0 +1,11 @@
+<%@ taglib uri="http://struts.apache.org/tags-tiles"; prefix="tiles" %>
+<%@ taglib uri="http://java.sun.com/jstl/core_rt"; prefix="c" %>
+<tiles:importAttribute name="stringTest"/>
+<tiles:importAttribute name="list"/>
+Single attribute "stringTest" value: <c:out value="${stringTest}" /> <br/><br/>
+The attribute "list" contains these values:
+<ul>
+<c:forEach var="item" items="${list}">
+<li><c:out value="${item}" /></li>
+</c:forEach>
+</ul>
\ No newline at end of file

Added: 
struts/sandbox/trunk/tiles/tiles-test/src/main/webapp/testimportattribute.jsp
URL: 
http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-test/src/main/webapp/testimportattribute.jsp?view=auto&rev=440323
==============================================================================
--- 
struts/sandbox/trunk/tiles/tiles-test/src/main/webapp/testimportattribute.jsp 
(added)
+++ 
struts/sandbox/trunk/tiles/tiles-test/src/main/webapp/testimportattribute.jsp 
Tue Sep  5 04:35:38 2006
@@ -0,0 +1,3 @@
+<%@ taglib uri="http://struts.apache.org/tags-tiles"; prefix="tiles" %>
+
+<tiles:insert name="test.putAttributes" />


Reply via email to