[seam-commits] Seam SVN: r10312 - trunk/seam-gen.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Mon Apr 6 16:16:40 EDT 2009
Author: dan.j.allen
Date: 2009-04-06 16:16:40 -0400 (Mon, 06 Apr 2009)
New Revision: 10312
Modified:
trunk/seam-gen/build.xml
Log:
add new menu item for each of new-action, new-form, new-conversation, and new-query
Modified: trunk/seam-gen/build.xml
===================================================================
--- trunk/seam-gen/build.xml 2009-04-06 16:14:09 UTC (rev 10311)
+++ trunk/seam-gen/build.xml 2009-04-06 20:16:40 UTC (rev 10312)
@@ -1255,11 +1255,11 @@
<echo message="If you use 'update', you will need to manually run the SQL statements appended to resources/import-dev.sql to add the default accounts."/>
</target>
- <target name="new-action" depends="new-action-ear,new-action-war"
+ <target name="new-action" depends="new-action-ear,new-action-war,insert-menu-item"
description="Create a new action"/>
- <target name="new-form" depends="new-form-ear,new-form-war"
+ <target name="new-form" depends="new-form-ear,new-form-war,insert-menu-item"
description="Create a new form action"/>
- <target name="new-conversation" depends="new-conversation-ear,new-conversation-war"
+ <target name="new-conversation" depends="new-conversation-ear,new-conversation-war,insert-menu-item"
description="Create a new conversation controller"/>
<target name="new-action-ear" depends="validate-project,action-input,setup-filters" unless="project.war">
@@ -1336,6 +1336,17 @@
<echo message="Type '${seam.cmd} restart' and go to http://localhost:8080/${project.name}/${page.name}.seam"/>
</target>
+ <target name="insert-menu-item">
+ <replace file="${project.home}/view/layout/menu.xhtml">
+ <replacetoken><![CDATA[<!-- @newMenuItem@ -->]]></replacetoken>
+ <replacevalue><![CDATA[<s:link view="/@pageName at .xhtml" value="@pageName@" propagation="none"/>
+ <!-- @newMenuItem@ -->]]></replacevalue>
+ </replace>
+ <replace file="${project.home}/view/layout/menu.xhtml">
+ <replacefilter token="@pageName@" value="${page.name}"/>
+ </replace>
+ </target>
+
<!-- FIXME: we ask the user for information that isn't needed for this target -->
<target name="new-test" depends="validate-project,action-input,setup-filters" description="Create a new test">
<echo message="Creating a new SeamTest subclass for the specified Seam component"/>
@@ -1357,6 +1368,7 @@
<filterset refid="filters"/>
</copy>
+ <antcall target="insert-menu-item"/>
<echo message="Type '${seam.cmd} restart' and go to http://localhost:8080/${project.name}/${page.name}.seam"/>
</target>
More information about the seam-commits
mailing list