You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by dd...@apache.org on 2006/11/09 19:47:10 UTC
svn commit: r473016 - in /struts/sandbox/trunk/tiles:
tiles-core/src/main/java/org/apache/tiles/impl/mgmt/DefinitionManager.java
tiles-test/src/main/webapp/index.jsp
Author: ddewolf
Date: Thu Nov 9 10:47:09 2006
New Revision: 473016
URL: http://svn.apache.org/viewvc?view=rev&rev=473016
Log:
All selenium tests now pass, including definition tags that use the mutable container
Modified:
struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/impl/mgmt/DefinitionManager.java
struts/sandbox/trunk/tiles/tiles-test/src/main/webapp/index.jsp
Modified: struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/impl/mgmt/DefinitionManager.java
URL: http://svn.apache.org/viewvc/struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/impl/mgmt/DefinitionManager.java?view=diff&rev=473016&r1=473015&r2=473016
==============================================================================
--- struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/impl/mgmt/DefinitionManager.java (original)
+++ struts/sandbox/trunk/tiles/tiles-core/src/main/java/org/apache/tiles/impl/mgmt/DefinitionManager.java Thu Nov 9 10:47:09 2006
@@ -51,13 +51,20 @@
}
for(ComponentAttribute attr : definition.getAttributes().values()) {
- if(ComponentAttribute.DEFINITION.equals(attr.getType())) {
+ if(isDefinition(attr)) {
ComponentDefinition d = getDefinition(attr.getValue().toString(), null);
attr.setAttributes(d.getAttributes());
}
}
definitions.put(definition.getName(), definition);
+ }
+
+ private boolean isDefinition(ComponentAttribute attribute) throws DefinitionsFactoryException {
+ boolean explicit = ComponentAttribute.DEFINITION.equals(attribute.getType());
+ boolean implicit = attribute.getType() == null &&
+ (getDefinition((String)attribute.getValue(), null) != null);
+ return explicit || implicit;
}
private void validate(TileDefinition definition) {
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=473016&r1=473015&r2=473016
==============================================================================
--- struts/sandbox/trunk/tiles/tiles-test/src/main/webapp/index.jsp (original)
+++ struts/sandbox/trunk/tiles/tiles-test/src/main/webapp/index.jsp Thu Nov 9 10:47:09 2006
@@ -28,6 +28,8 @@
<h1>Tiles 2 Test Application</h1>
<h2>Currently working tests</h2>
+
+ <h3>Standard Render/Attribute Tests</h3>
<a href="testinsertdefinition.jsp">Test Insert Configured Definition</a><br/>
<a href="testinsertdefinition_preparer.jsp">Test Insert Configured Definition with Preparer</a><br/>
<a href="testinsertdefinition_classpath.jsp">Test Insert Configured Classpath Definition</a><br/>
@@ -35,20 +37,19 @@
<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="testinsertdefinition_composite.jsp">Test Insert Configured Definition that contains another definition inside</a><br/>
- <!-- Broken Tests Go Here! -->
<a href="testput.jsp">Test Put Tag</a><br/>
<a href="testput_servlet.jsp">Test Put Tag using a servlet mapping as a template</a><br/>
<a href="testimportattribute.jsp">Test importAttribute Tag</a><br/>
<a href="testimportattribute_all.jsp">Test importAttribute Tag with no name</a><br/>
- <h2>Container Management Tags</h2>
+ <h3>Mutable Container Tests</h3>
<a href="testinitcontainer.jsp">Test Initialize Container</a><br/>
<a href="testdef.jsp">Test Definition Tag</a><br/>
<a href="testinsertdefinition_composite_tags_includes_configured.jsp">Test Insert Definition that contains another definition inside (configured via tiles-defs.xml) using JSP tags</a><br/>
<a href="testinsertdefinition_composite_tags.jsp">Test Insert Definition that contains another definition inside using JSP tags</a><br/>
-
- <h2>Currently not working tests</h2>
<a href="testinsertdefinition_composite_tags_includes_configured_notype.jsp">Test Insert Definition that contains another definition inside (configured via tiles-defs.xml) using JSP tags without types</a><br/>
<a href="testinsertdefinition_composite_tags_notype.jsp">Test Insert Definition that contains another definition inside using JSP tags without types</a><br/></body>
+
+ <h2>Currently not working tests</h2>
</html>
Re: svn commit: r473016 - in /struts/sandbox/trunk/tiles: tiles-core/src/main/java/org/apache/tiles/impl/mgmt/DefinitionManager.java
tiles-test/src/main/webapp/index.jsp
Posted by "David H. DeWolf" <dd...@apache.org>.
:))
I should have been more specific. . .all of the tiles-test jsps render
the correct output. If we were to add selenium tests for them, then
we'd have all green against the new tiles container architecture.
So yes, please, we'd love to see more contributed!
David
Wendy Smoak wrote:
> On 11/9/06, ddewolf@apache.org <dd...@apache.org> wrote:
>> Author: ddewolf
>> Date: Thu Nov 9 10:47:09 2006
>> New Revision: 473016
>>
>> URL: http://svn.apache.org/viewvc?view=rev&rev=473016
>> Log:
>> All selenium tests now pass, including definition tags that use the
>> mutable container
>
> All... two of them? :)
>
> If anyone is interested in Selenium and would like to contribute
> tests, see this page for more info:
> http://struts.apache.org/struts-sandbox/tiles/selenium.html
>
> The existing tests live here:
> http://svn.apache.org/repos/asf/struts/sandbox/trunk/tiles/tiles-test/src/test/selenium/
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org
Re: svn commit: r473016 - in /struts/sandbox/trunk/tiles: tiles-core/src/main/java/org/apache/tiles/impl/mgmt/DefinitionManager.java tiles-test/src/main/webapp/index.jsp
Posted by Wendy Smoak <ws...@gmail.com>.
On 11/9/06, ddewolf@apache.org <dd...@apache.org> wrote:
> Author: ddewolf
> Date: Thu Nov 9 10:47:09 2006
> New Revision: 473016
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=473016
> Log:
> All selenium tests now pass, including definition tags that use the mutable container
All... two of them? :)
If anyone is interested in Selenium and would like to contribute
tests, see this page for more info:
http://struts.apache.org/struts-sandbox/tiles/selenium.html
The existing tests live here:
http://svn.apache.org/repos/asf/struts/sandbox/trunk/tiles/tiles-test/src/test/selenium/
--
Wendy
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org