You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by ap...@apache.org on 2007/01/11 14:45:55 UTC
svn commit: r495217 - in
/struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp: WEB-INF/
doc/portal/ layout/ layouts/
Author: apetrelli
Date: Thu Jan 11 05:45:54 2007
New Revision: 495217
URL: http://svn.apache.org/viewvc?view=rev&rev=495217
Log:
SB-92
More fixes to let the examples homepage being shown.
Modified:
struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/WEB-INF/struts-config.xml
struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/WEB-INF/tiles-defs.xml
struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/WEB-INF/tiles-doc-defs.xml
struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/WEB-INF/tiles-examples-defs.xml
struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/WEB-INF/tiles-tests-defs.xml
struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/doc/portal/revisions.jsp
struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/layout/columnsLayout.jsp
struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/layouts/columnsLayout.jsp
struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/layouts/menu.jsp
struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/layouts/vboxLayout.jsp
Modified: struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/WEB-INF/struts-config.xml
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/WEB-INF/struts-config.xml?view=diff&rev=495217&r1=495216&r2=495217
==============================================================================
--- struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/WEB-INF/struts-config.xml (original)
+++ struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/WEB-INF/struts-config.xml Thu Jan 11 05:45:54 2007
@@ -45,6 +45,8 @@
type="org.apache.struts.tiles.actions.ReloadDefinitionsAction"/>
<action path="/admin/tiles/view"
type="org.apache.struts.tiles.actions.ViewDefinitionsAction"/>
+ <action path="/switch"
+ type="org.apache.struts.actions.SwitchAction"/>
</action-mappings>
Modified: struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/WEB-INF/tiles-defs.xml
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/WEB-INF/tiles-defs.xml?view=diff&rev=495217&r1=495216&r2=495217
==============================================================================
--- struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/WEB-INF/tiles-defs.xml (original)
+++ struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/WEB-INF/tiles-defs.xml Thu Jan 11 05:45:54 2007
@@ -87,7 +87,7 @@
<!-- The home menu definition -->
<definition name="common.menu.home" template="/layouts/menu.jsp" >
- <put name="title" value="Tiles" />
+ <put name="sectionTitle" value="Tiles" />
<putList name="items" >
<item value="Tiles Home" link="/index.jsp" />
</putList>
@@ -95,15 +95,15 @@
<!-- Printer friendly menu definition -->
<definition name="common.menu.examples" template="/layouts/menu.jsp" >
- <put name="title" value="Examples" />
+ <put name="sectionTitle" value="Examples" />
<putList name="items" >
- <item value="Home" link="/examples/index.jsp" />
+ <item value="Home" link="/switch.do?prefix=/examples&page=/index.jsp" />
</putList>
</definition>
<!-- Documentation menu definition v1.1-->
<definition name="common.menu.doc" template="/layouts/menu.jsp" >
- <put name="title" value="Documentation" />
+ <put name="sectionTitle" value="Documentation" />
<putList name="items" >
<item value="Home" link="/doc/index.jsp" />
<item value="Live Examples" link="/examples/index.jsp" />
@@ -126,7 +126,7 @@
<!-- Printer friendly menu definition -->
<definition name="common.menu.printer.friendly" template="/layouts/menu.jsp" >
- <put name="title" value="Printer Versions" />
+ <put name="sectionTitle" value="Printer Versions" />
<putList name="items" >
<item value="Quick Overview" link="/test/testAll.jsp" />
<item value="Tutorial" link="/doc/tutorialBody.html" />
Modified: struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/WEB-INF/tiles-doc-defs.xml
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/WEB-INF/tiles-doc-defs.xml?view=diff&rev=495217&r1=495216&r2=495217
==============================================================================
--- struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/WEB-INF/tiles-doc-defs.xml (original)
+++ struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/WEB-INF/tiles-doc-defs.xml Thu Jan 11 05:45:54 2007
@@ -82,14 +82,14 @@
<!-- Documentation menu definition v1.1-->
<definition name="doc.menu.links" template="/layouts/menu.jsp" >
- <put name="title" value="Documentation" />
+ <put name="sectionTitle" value="Documentation" />
<putList name="items" >
<item value="Home" link="/index.jsp" />
<item value="Live Examples (new)" link="/examples/index.jsp" />
<!--
<item> <value>Commented Examples</value>
<link>/examples/index.jsp</link>
- <classtype>org.apache.struts.tiles.beans.SimpleMenuItem</classtype>
+ <classtype>org.apache.tiles.beans.SimpleMenuItem</classtype>
</item>
-->
<item value="Quick overview" link="/doc/quickOverview.jsp" />
@@ -102,13 +102,13 @@
<item value="User Guide" link="/doc/userGuide.jsp" />
<item value="Javadoc" link="/api/index.html" />
<item value="Struts Home" link="http://www.apache.org" icon="/images/struts-power.gif"
- classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
+ classtype="org.apache.tiles.beans.SimpleMenuItem" />
</putList>
</definition>
<!-- Printer friendly menu definition -->
<definition name="doc.menu.printer.friendly" template="/layouts/menu.jsp" >
- <put name="title" value="Printer Versions" />
+ <put name="sectionTitle" value="Printer Versions" />
<putList name="items" >
<item value="Quick Overview" link="/test/testAll.jsp" />
<item value="Tutorial" link="/doc/tutorialBody.html" />
@@ -119,7 +119,7 @@
<!-- Taglib menu definition -->
<definition name="doc.menu.taglib.references" template="/layouts/menu.jsp" >
- <put name="title" value="Tag Library Reference" />
+ <put name="sectionTitle" value="Tag Library Reference" />
<putList name="items" >
<item value="Tiles Tags" link="/doc/tilesTags.jsp" />
<!-- <item value="Extension Tags (old)" link="/doc/extensionsTags.jsp" /> -->
@@ -128,7 +128,7 @@
<!-- Oldies menu definition -->
<definition name="doc.menu.old.documents" template="/layouts/menu.jsp" >
- <put name="title" value="Old Documents" />
+ <put name="sectionTitle" value="Old Documents" />
<putList name="items" >
<item value="Overview (old)" link="/doc/overview.jsp" />
</putList>
Modified: struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/WEB-INF/tiles-examples-defs.xml
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/WEB-INF/tiles-examples-defs.xml?view=diff&rev=495217&r1=495216&r2=495217
==============================================================================
--- struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/WEB-INF/tiles-examples-defs.xml (original)
+++ struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/WEB-INF/tiles-examples-defs.xml Thu Jan 11 05:45:54 2007
@@ -56,7 +56,7 @@
<item value="item1" link="/examples/tabs.jsp"/>
<item value="item2" link="/examples/tabs.jsp"/>
<item value="item3" link="/examples/tabs.jsp"/>
- <bean classtype="org.apache.struts.tiles.beans.SimpleMenuItem">
+ <bean classtype="org.apache.tiles.beans.SimpleMenuItem">
<set-property property="link" value="aLink1"/>
<set-property property="value" value="aValue1"/>
</bean>
Modified: struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/WEB-INF/tiles-tests-defs.xml
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/WEB-INF/tiles-tests-defs.xml?view=diff&rev=495217&r1=495216&r2=495217
==============================================================================
--- struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/WEB-INF/tiles-tests-defs.xml (original)
+++ struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/WEB-INF/tiles-tests-defs.xml Thu Jan 11 05:45:54 2007
@@ -39,7 +39,7 @@
<!-- Test menu definition -->
<definition name="test.menu.links" template="/layouts/menu.jsp" >
- <put name="title" value="Tests" />
+ <put name="sectionTitle" value="Tests" />
<putList name="items" >
<item value="All in one" link="/test/index.jsp" />
<item value="Basic" link="/test/testBasic.jsp" />
Modified: struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/doc/portal/revisions.jsp
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/doc/portal/revisions.jsp?view=diff&rev=495217&r1=495216&r2=495217
==============================================================================
--- struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/doc/portal/revisions.jsp (original)
+++ struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/doc/portal/revisions.jsp Thu Jan 11 05:45:54 2007
@@ -78,7 +78,7 @@
<UL>
<LI><FONT size=2>tiles.XmlDefinition.XmlParser : enable default value for <item> classtype
attribute
- (org.apache.struts.tiles.beans.SimpleMenuItem). As a consequence, all classtype attribute
+ (org.apache.tiles.beans.SimpleMenuItem). As a consequence, all classtype attribute
can be removed in examples</FONT></LI>
<LI><FONT size=2>tiles.XmlDefinition.I18nFactorySet : Enable serialization (bug reported
by Dan Sykes)</FONT></LI>
Modified: struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/layout/columnsLayout.jsp
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/layout/columnsLayout.jsp?view=diff&rev=495217&r1=495216&r2=495217
==============================================================================
--- struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/layout/columnsLayout.jsp (original)
+++ struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/layout/columnsLayout.jsp Thu Jan 11 05:45:54 2007
@@ -35,13 +35,8 @@
<tr>
<%
int numCols = Integer.parseInt(numColsStr);
-//ComponentContext context = ComponentContext.getContext( request );
for( int i=0; i<numCols; i++ )
{
-// java.util.List list=(java.util.List)context.getAttribute( "list" + i );
-// pageContext.setAttribute("list", list );
-// if(list==null)
-// System.out.println( "list is null for " + i );
%>
<tiles:importAttribute toName="list" name="<%="list" + i %>"/>
<td valign="top">
Modified: struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/layouts/columnsLayout.jsp
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/layouts/columnsLayout.jsp?view=diff&rev=495217&r1=495216&r2=495217
==============================================================================
--- struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/layouts/columnsLayout.jsp (original)
+++ struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/layouts/columnsLayout.jsp Thu Jan 11 05:45:54 2007
@@ -21,7 +21,6 @@
*
*/
--%>
-<%@ page import="org.apache.struts.tiles.ComponentContext"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<%-- Multi-columns Layout
@@ -44,17 +43,13 @@
<tr>
<%
int numCols = Integer.parseInt(numColsStr);
-ComponentContext context = ComponentContext.getContext( request );
for( int i=0; i<numCols; i++ )
{
- java.util.List list=(java.util.List)context.getAttribute( "list" + i );
- pageContext.setAttribute("list", list );
- if(list==null)
- System.out.println( "list is null for " + i );
%>
+<tiles:importAttribute toName="list" name="<%="list" + i %>"/>
<td valign="top">
<tiles:insertTemplate template="/layouts/vboxLayout.jsp" flush="true" >
- <tiles:put name="list" value="${pageContext.list}" />
+ <tiles:put name="list" value="${pageScope.list}" />
</tiles:insertTemplate>
</td>
<%
Modified: struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/layouts/menu.jsp
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/layouts/menu.jsp?view=diff&rev=495217&r1=495216&r2=495217
==============================================================================
--- struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/layouts/menu.jsp (original)
+++ struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/layouts/menu.jsp Thu Jan 11 05:45:54 2007
@@ -41,10 +41,10 @@
<tiles:importAttribute />
<table>
-<logic:present name="title">
+<logic:present name="sectionTitle">
<tr>
<th colspan=2>
- <div align="left"><strong><tiles:getAsString name="title"/></strong></div>
+ <div align="left"><strong><tiles:getAsString name="sectionTitle"/></strong></div>
</th>
</tr>
</logic:present>
Modified: struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/layouts/vboxLayout.jsp
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/layouts/vboxLayout.jsp?view=diff&rev=495217&r1=495216&r2=495217
==============================================================================
--- struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/layouts/vboxLayout.jsp (original)
+++ struts/sandbox/trunk/tiles/tiles-showcase/src/main/webapp/layouts/vboxLayout.jsp Thu Jan 11 05:45:54 2007
@@ -42,11 +42,22 @@
while( i.hasNext() )
{
String name= (String)i.next();
+ if (name.startsWith("/"))
+ {
+%>
+<tiles:insertTemplate template="<%=name%>" flush="true" />
+<br>
+
+<%
+ }
+ else
+ {
%>
<tiles:insertDefinition name="<%=name%>" flush="true" />
<br>
<%
+ }
} // end loop
%>