You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by ce...@apache.org on 2002/06/13 18:53:57 UTC
cvs commit: jakarta-struts/contrib/tiles/conf/share tiles-config.dtd
cedric 2002/06/13 09:53:56
Modified: contrib/tiles/src/share/org/apache/struts/tiles/xmlDefinition
XmlParser.java XmlListAttribute.java
contrib/tiles/web/doc/doc/portal welcome.jsp revisions.jsp
news.jsp
contrib/tiles/doc tiles.xml
contrib/tiles/web/doc/WEB-INF tiles-tests-defs.xml
tiles-examples-defs.xml tiles-defs.xml
contrib/tiles/conf/share tiles-config.dtd
Log:
- Allow nested <putList> in definitions file
- Change definition file DTD accordingly
- Add <uri> to tld file
Revision Changes Path
1.7 +19 -7 jakarta-struts/contrib/tiles/src/share/org/apache/struts/tiles/xmlDefinition/XmlParser.java
Index: XmlParser.java
===================================================================
RCS file: /home/cvs/jakarta-struts/contrib/tiles/src/share/org/apache/struts/tiles/xmlDefinition/XmlParser.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- XmlParser.java 24 May 2002 10:15:44 -0000 1.6
+++ XmlParser.java 13 Jun 2002 16:53:56 -0000 1.7
@@ -149,10 +149,13 @@
String PUT_TAG = DEFINITION_TAG + "/put";
String putAttributeHandlerClass = PACKAGE_NAME + ".XmlAttribute";
- String LIST_TAG = DEFINITION_TAG + "/putList";
+ //String LIST_TAG = DEFINITION_TAG + "/putList";
+ // List tag value
+ String LIST_TAG = "putList";
+ String DEF_LIST_TAG = DEFINITION_TAG + "/" + LIST_TAG;
String listHandlerClass = PACKAGE_NAME + ".XmlListAttribute";
-
- String ADD_LIST_ELE_TAG = LIST_TAG + "/add";
+ // Tag value for adding an element in a list
+ String ADD_LIST_ELE_TAG = "*/" + LIST_TAG + "/add";
// syntax rules
digester.addObjectCreate( DEFINITION_TAG, definitionHandlerClass );
@@ -167,10 +170,11 @@
digester.addSetNext( PUT_TAG, "addAttribute", putAttributeHandlerClass);
digester.addSetProperties( PUT_TAG);
digester.addCallMethod( PUT_TAG, "setBody", 0);
- // list rules
- digester.addObjectCreate( LIST_TAG, listHandlerClass);
- digester.addSetProperties( LIST_TAG);
- digester.addSetNext( LIST_TAG, "addAttribute", putAttributeHandlerClass);
+ // Definition level list rules
+ // This is rules for lists nested in a definition
+ digester.addObjectCreate( DEF_LIST_TAG, listHandlerClass);
+ digester.addSetProperties( DEF_LIST_TAG);
+ digester.addSetNext( DEF_LIST_TAG, "addAttribute", putAttributeHandlerClass);
// list elements rules
// We use Attribute class to avoid rewriting a new class.
// Name part can't be used in listElement attribute.
@@ -178,6 +182,14 @@
digester.addSetNext( ADD_LIST_ELE_TAG, "add", putAttributeHandlerClass);
digester.addSetProperties( ADD_LIST_ELE_TAG);
digester.addCallMethod( ADD_LIST_ELE_TAG, "setBody", 0);
+
+ // nested list elements rules
+ // Create a list handler, and add it to parent list
+ String NESTED_LIST = "*/" + LIST_TAG + "/" + LIST_TAG;
+ digester.addObjectCreate( NESTED_LIST, listHandlerClass);
+ digester.addSetProperties( NESTED_LIST);
+ digester.addSetNext( NESTED_LIST, "add", putAttributeHandlerClass);
+
// bean elements rules
// We use Attribute class to avoid rewriting a new class.
// Name part can't be used in listElement attribute.
1.4 +5 -3 jakarta-struts/contrib/tiles/src/share/org/apache/struts/tiles/xmlDefinition/XmlListAttribute.java
Index: XmlListAttribute.java
===================================================================
RCS file: /home/cvs/jakarta-struts/contrib/tiles/src/share/org/apache/struts/tiles/xmlDefinition/XmlListAttribute.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- XmlListAttribute.java 15 Apr 2002 08:22:44 -0000 1.3
+++ XmlListAttribute.java 13 Jun 2002 16:53:56 -0000 1.4
@@ -80,4 +80,6 @@
list.add( value );
}
+
+
}
1.4 +2 -1 jakarta-struts/contrib/tiles/web/doc/doc/portal/welcome.jsp
Index: welcome.jsp
===================================================================
RCS file: /home/cvs/jakarta-struts/contrib/tiles/web/doc/doc/portal/welcome.jsp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- welcome.jsp 18 Feb 2002 14:48:39 -0000 1.3
+++ welcome.jsp 13 Jun 2002 16:53:56 -0000 1.4
@@ -17,7 +17,8 @@
<li>Take a glance at some Tiles features and capabilities by browsing the commented live examples (avalaible if you install Tiles)</li>
<li>Check the "Quick Overview" for code examples and results</li>
<li>Start learning Tiles with the tutorial</li>
- <li>Read articles from <a href="http://www.javaworld.com/javaworld/jw-01-2002/jw-0104-tilestrut.html" >javaworld</a></li>
+ <li>Learn Tiles Advanced Features</li>
+ <li>Read article from <a href="http://www.javaworld.com/javaworld/jw-01-2002/jw-0104-tilestrut.html" >javaworld</a></li>
</ul>
</FONT>
</P>
1.12 +11 -3 jakarta-struts/contrib/tiles/web/doc/doc/portal/revisions.jsp
Index: revisions.jsp
===================================================================
RCS file: /home/cvs/jakarta-struts/contrib/tiles/web/doc/doc/portal/revisions.jsp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- revisions.jsp 24 May 2002 10:16:11 -0000 1.11
+++ revisions.jsp 13 Jun 2002 16:53:56 -0000 1.12
@@ -2,6 +2,17 @@
<tr>
<th bgcolor="aqua"><FONT size=4>History</FONT></th></tr>
<TR>
+ <TD><FONT size=2><STRONG> 13 Jun. 2002</STRONG> </FONT></TD></TR>
+ <TR>
+ <TD>
+ <UL>
+ <LI><FONT size=2>Tiles configuration file now accept nested list as attribute</FONT></LI>
+ <LI><FONT size=2>Add <uri> tag to DTD (submitted by Loren Halvorson)</FONT></LI>
+ configuration file</FONT></LI>
+ </UL>
+ </TD>
+ </TR>
+ <TR>
<TD><FONT size=2><STRONG> 23 May 2002</STRONG> </FONT></TD></TR>
<TR>
<TD>
@@ -12,9 +23,6 @@
can be removed in examples</FONT></LI>
<LI><FONT size=2>tiles.XmlDefinition.I18nFactorySet : Enable serialization (bug reported
by Dan Sykes)</FONT></LI>
- <LI><FONT size=2></FONT></LI>
- <LI><FONT size=2></FONT></LI>
- <LI><FONT size=2></FONT></LI>
</UL>
</TD>
</TR>
1.7 +15 -3 jakarta-struts/contrib/tiles/web/doc/doc/portal/news.jsp
Index: news.jsp
===================================================================
RCS file: /home/cvs/jakarta-struts/contrib/tiles/web/doc/doc/portal/news.jsp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- news.jsp 24 May 2002 10:16:11 -0000 1.6
+++ news.jsp 13 Jun 2002 16:53:56 -0000 1.7
@@ -3,11 +3,23 @@
<th bgcolor="aqua"><font size="+1"><strong>News</strong></font></th></tr>
<tr>
<td>
- <FONT size=2>Updated 22 May 2002</FONT></P>
+ <p><FONT size=2>13 Jun. 2002</FONT></P>
+ <P><STRONG><EM><FONT color=#ff0000>Vote for Tiles and Struts</FONT></EM></STRONG>
+ <br><FONT color=#000000 size=2>
+ <a href="http://www.sys-con.com/java/readerschoice2002/nominationform.cfm" target="_blank"/>Vote JDJ Readers' Choice Award</a>
+ <ul>
+ <li>6) Best Java Component : Tiles,</li>
+ <li>26) Best Java e-Business Framework : Struts,</li>
+ <li>16) Best Java Training Program : J2EE / JSP Framework by baseBeans
+Struts Fast Track</li>
+ </ul>
+ </FONT></P>
+
+ <p><FONT size=2>22 May 2002</FONT></P>
<P><STRONG><EM><FONT color=#ff0000>Tiles Advanced Features Documentation (draft version)</FONT></EM></STRONG>
<br><FONT color=#000000 size=2>
<a href="http://www.lifl.fr/~dumoulin/tiles/tilesAdvancedFeatures.pdf" />tilesAdvancedFeatures.pdf</a>
- </FONT><FONT color=#ff0000><EM><STRONG></STRONG></EM></FONT></P>
+ </FONT></P>
<P><STRONG><EM><FONT color=#ff0000>Tiles-blank Applications</FONT></EM></STRONG>
<br><FONT color=#000000 size=2>
@@ -17,7 +29,7 @@
<li><code>tiles-blank-struts1.1.war</code> - Tiles with Struts1.1</li>
<li><code>tiles-blank-struts1.0.war</code> - Tiles with latest stable Struts1.0.x</li>
</ul>
- </FONT><FONT color=#ff0000><EM><STRONG></STRONG></EM></FONT></P>
+ </FONT></P>
<P><FONT color=#ff0000><EM><STRONG>Article on Tiles and Struts</STRONG></EM></FONT>
<br><FONT color=#000000 size=2>
1.7 +3 -4 jakarta-struts/contrib/tiles/doc/tiles.xml
Index: tiles.xml
===================================================================
RCS file: /home/cvs/jakarta-struts/contrib/tiles/doc/tiles.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- tiles.xml 15 Apr 2002 08:28:18 -0000 1.6
+++ tiles.xml 13 Jun 2002 16:53:56 -0000 1.7
@@ -17,7 +17,7 @@
<jspversion>1.1</jspversion>
<shortname>Tiles Tag Library</shortname>
<display-name>Tiles Tag Library</display-name>
- <!--<uri>http://jakarta.apache.org/struts/tiles-1.0</uri>-->
+ <uri>http://jakarta.apache.org/struts/tags-tiles-1.1</uri>
<info>
This tag library provides tiles tags.
<br></br>
@@ -246,9 +246,8 @@
Create a tile/component/template definition as a bean.
Newly created bean will be saved under specified "id", in the requested "scope".
Definition tag has same syntax as <code>insert</code> tag.
- <br></br>The new definition can extends a definition described in factory (XML file),
- and overload any previously defined parameters.
- <br></br>Definition can be used later with <code><insert beanName="idName" ></code>
+ The new definition can extends a definition described in factory (XML file), and overload
+ any previously defined parameters.
</info>
<tagclass>org.apache.struts.taglib.tiles.DefinitionTag</tagclass>
<bodycontent>JSP</bodycontent>
1.3 +2 -0 jakarta-struts/contrib/tiles/web/doc/WEB-INF/tiles-tests-defs.xml
Index: tiles-tests-defs.xml
===================================================================
RCS file: /home/cvs/jakarta-struts/contrib/tiles/web/doc/WEB-INF/tiles-tests-defs.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- tiles-tests-defs.xml 24 May 2002 10:16:10 -0000 1.2
+++ tiles-tests-defs.xml 13 Jun 2002 16:53:56 -0000 1.3
@@ -1,3 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration//EN"
"http://jakarta.apache.org/struts/dtds/tiles-config.dtd">
1.6 +30 -21 jakarta-struts/contrib/tiles/web/doc/WEB-INF/tiles-examples-defs.xml
Index: tiles-examples-defs.xml
===================================================================
RCS file: /home/cvs/jakarta-struts/contrib/tiles/web/doc/WEB-INF/tiles-examples-defs.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- tiles-examples-defs.xml 24 May 2002 10:16:10 -0000 1.5
+++ tiles-examples-defs.xml 13 Jun 2002 16:53:56 -0000 1.6
@@ -1,3 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration//EN"
"http://jakarta.apache.org/struts/dtds/tiles-config.dtd">
@@ -23,6 +25,23 @@
<!-- Menu bar and submenus definitions -->
<!-- ======================================================= -->
+ <!-- Test nested list -->
+<definition name="test.nested.list" path="/layouts/vboxLayout.jsp" >
+ <putList name="list" >
+ <item value="item1" link="/examples/tabs.jsp"/>
+ <item value="item2" link="/examples/tabs.jsp"/>
+ <item value="item3" link="/examples/tabs.jsp"/>
+ <putList name="list" >
+ <item value="nested.item1" link="/examples/tabs.jsp"/>
+ <putList name="list" >
+ <item value="nested.nested.item1" link="/examples/tabs.jsp"/>
+ <item value="nested.nested.item2" link="/examples/tabs.jsp"/>
+ </putList>
+ <item value="nested.item2" link="/examples/tabs.jsp"/>
+ </putList>
+ </putList>
+</definition>
+
<!-- Menu bar definition -->
<!-- Some definition come from other definition files (ex : doc.menu.*) -->
<definition name="examples.menu.bar" path="/layouts/vboxLayout.jsp" >
@@ -251,35 +270,25 @@
<put name="parameterName" value="selected" />
<putList name="tabList" >
<item value="Doc Home"
- link="/index.jsp"
- classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
+ link="/index.jsp" />
<item value="Quick overview"
- link="/doc/quickOverview.jsp"
- classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
+ link="/doc/quickOverview.jsp" />
<item value="Tutorial"
- link="/doc/tutorial.jsp"
- classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
+ link="/doc/tutorial.jsp" />
<item value="Examples Home"
- link="/examples/index.jsp"
- classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
+ link="/examples/index.jsp" />
<item value="Tutorial Home"
- link="/tutorial/index.jsp"
- classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
- <item value="Login"
- link="/examples/tiles/portal/login.jsp"
- classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
+ link="/tutorial/index.jsp" />
+ <item value="Login"
+ link="/examples/tiles/portal/login.jsp" />
<item value="Messages"
- link="/examples/tiles/portal/messages.jsp"
- classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
+ link="/examples/tiles/portal/messages.jsp" />
<item value="NewsFeed"
- link="/examples/tiles/portal/newsFeed.jsp"
- classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
+ link="/examples/tiles/portal/newsFeed.jsp" />
<item value="Stocks"
- link="/examples/tiles/portal/stocks.jsp"
- classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
+ link="/examples/tiles/portal/stocks.jsp" />
<item value="WhatsNew"
- link="/examples/tiles/portal/whatsNew.jsp"
- classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />
+ link="/examples/tiles/portal/whatsNew.jsp" />
</putList>
</definition>
1.3 +2 -0 jakarta-struts/contrib/tiles/web/doc/WEB-INF/tiles-defs.xml
Index: tiles-defs.xml
===================================================================
RCS file: /home/cvs/jakarta-struts/contrib/tiles/web/doc/WEB-INF/tiles-defs.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- tiles-defs.xml 22 Mar 2002 17:37:42 -0000 1.2
+++ tiles-defs.xml 13 Jun 2002 16:53:56 -0000 1.3
@@ -1,3 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration//EN"
"http://jakarta.apache.org/struts/dtds/tiles-config.dtd">
1.5 +2 -2 jakarta-struts/contrib/tiles/conf/share/tiles-config.dtd
Index: tiles-config.dtd
===================================================================
RCS file: /home/cvs/jakarta-struts/contrib/tiles/conf/share/tiles-config.dtd,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- tiles-config.dtd 27 Dec 2001 17:44:12 -0000 1.4
+++ tiles-config.dtd 13 Jun 2002 16:53:56 -0000 1.5
@@ -32,7 +32,7 @@
content CDATA #IMPLIED
direct (true | false) #IMPLIED
>
-<!ELEMENT putList ( (add* | item* | bean*)+) >
+<!ELEMENT putList ( (add* | item* | bean* | putList*)+) >
<!ATTLIST putList
name CDATA #REQUIRED
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>