Rhys,
How do you test your velocity scripts.  Do you have a test class that
calls velocity. If so you could you post it.  I can't face reading all
the Velocity docs.
r,
Hugh

-----Original Message-----
From: Rhys Dixon [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 06, 2001 7:11 PM
To: Turbine Developers List
Subject: extending the torque demo app 


here's velocity generation for edit pages.
boy, i wish i had a tdk with the new torque.


regards,
rhys







## @author <a href="mailto:[EMAIL PROTECTED]";>Rhys Dixon</a>

$page.setTitle("Edit")
#set ($dollar = '$')
#set ($ob = '{')
#set ($cb = '}')
#set ($quote = '"')
#set ($pound = '#')

${pound}if(${dollar}data.getMessage())
Message: ${dollar}data.getMessage()
${pound}end

#set ($formtag = "<form method=")
#set ($formtag = $strings.concat([$formtag,${quote}]))
#set ($formtag = $strings.concat([$formtag,"post"]))
#set ($formtag = $strings.concat([$formtag,${quote}])) action="]))
#set ($formtag = $strings.concat([$formtag,${quote}]))
#set ($formtag = $strings.concat([$formtag,"$link.setPage(>"]) )
$formtag
  <div align="left">
    <table bgcolor="#ffffff" cellpadding="5">
#set ($i=0)
#foreach ($col in $table.Columns)
 #if($i > 0)
    #set ($cfc=$col.JavaName)
    #set ($clow=$col.Name.toLowerCase())
      <tr>
        #formCell ("${cfc}" "${clow}" $entry.${cfc})
      </tr>
 #end
#set ($i=1)
#end

    </table>
#set ($thisid = ${table.JavaName})
#set ($tolower=$table.Name.toLowerCase())
    <input type="hidden" name="${tolower}id"
value="${dollar}${ob}entry.${thisid}id${cb}"/>
    <input type="submit" name="eventSubmit_doInsert" value="Insert"/>
    <input type="submit" name="eventSubmit_doUpdate" value="Update"/>
    <input type="submit" name="eventSubmit_doDelete" value="Delete"/>
  </div>
</form>



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to