velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Burton" <bi...@progress.com>
Subject Re: CRUD Screens
Date Mon, 04 Mar 2002 23:19:58 GMT
Hello,

Brian Rowe wrote:
> 
> I wanted to generate CRUD screens using velocity from the XML file that
> defines the database in Turbine.  2 questions:
> 1.  Is there an easy way to generate Velocity CRUD screens?
> 2.  My error when doing this.  I could not pass a velocity variable to a
> velocity function where the the velocity function was to be included in the
> template.  For instance: To produce this line for differnt pages you want
> the action to be a variable like ${TableName}Insert instead of SQL
> everytime.
> 
> <form method="post" action="$link.setPage("Index.vm").setAction("SQL")">
> 
> Velocity won't allow the this.  Any ideas?

If I understand you correctly, try this:
  #set($action = "${TableName}Insert")
  <form method="post"
action="$link.setPage("Index.vm").setAction($action)">

Hope this helps,
-Bill

--
To unsubscribe, e-mail:   <mailto:velocity-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:velocity-user-help@jakarta.apache.org>


Mime
View raw message