Discussion:
[Middlegen-user] question about extending middlegen
Nicolas Fonnegra
2004-10-06 14:09:31 UTC
Permalink
Hi, i have been using middlegen for generating simple java files corresponding to tables on my database. Now i am willing to extend it in order to write a method i need in the generated classes. How do I that, wich template must I modify??

thanks for teh help, Nicolas Fonnegra M.
Russell Simpkins
2004-10-06 15:29:13 UTC
Permalink
If you use the <java>element with a nested filepoducer so I can specify the
velocity template. So, then you can create a velocity template to do
whatever you like using middlegen.

This one tasks creates php pages for me using a velocity template I created.


<middlegen appname="${name}" prefsdir="${src.dir}" gui="${gui}"
databaseurl="${database.url}"
initialContextFactory="${java.naming.factory.initial}"
providerURL="${java.naming.provider.url}"
datasourceJNDIName="${name}.database" driver="${database.driver}"
username="${database.userid}" schema="${database.schema}">

<java mergedir="${basedir}/src/common" name="editphp"
package="${project-package}.${name}" destination="${build.html.dir}">
<fileproducer
template="${basedir}/src/templates/php/savepage.php.vm"
destination="${build.html.dir}/save" filename="save{0}.php"/>
</java>
</middlegen>
Subject: [Middlegen-user] question about extending middlegen
Date: Wed, 6 Oct 2004 09:38:12 -0500
Hi, i have been using middlegen for generating simple java files
corresponding to tables on my database. Now i am willing to extend it in
order to write a method i need in the generated classes. How do I that,
wich template must I modify??
thanks for teh help, Nicolas Fonnegra M.
_________________________________________________________________
Check out Election 2004 for up-to-date election news, plus voter tools and
more! http://special.msn.com/msn/election2004.armx

Loading...