Title: Message
yeah.. its optional..
 
That is the idea behind this mod - to allow re-use of the existing vm's
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Douglass
Sent: Monday, 6 October 2003 5:17 PM
To: [EMAIL PROTECTED]
Subject: RE: [OS-webwork] Idea to enhance the velocity templates for re-use

It's an optional parameter, right? I think it's a great idea. In particular, I need to rewrite a proprietary widget toolkit in WW and now I can just provide custom header and footer templates instead of limiting myself to a single view technology by writing a taglib or macro lib, or using custom tags to recreate the entire pallet of existing ww tags.
 
-RD
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Cameron Braid
Sent: Monday, October 06, 2003 2:53 AM
To: [EMAIL PROTECTED]
Subject: [OS-webwork] Idea to enhance the velocity templates for re-use

I have implemented an extension to the AbstractUITag and the /templates/xhtml/controlheader.vm and controlfooter.vm to allow me to re-use the ui components with different layouts.
 
What I have done is added a new property of the ui tags called "controlTemplate"
 
this specifies the name of the controlhead and controlfooter tempaltes to use instead of the defaults.
 
This allows the same input controls to be used with different layouts.
 
The modification that I have made to controlheader.vm is :
 
#if ($tag.controlTemplate)
  #if
($tag.controlTemplate != "")
    #parse ("${theme}${tag.controlTemplate}-header.vm")
 
#end
#else
 ## default contents
#end
 
and a similiar pattern in the footer.
 
Then, if you use
 
<ww:textfield controlTemplate="filterbox"  name="name"/>
 
you can have filterbox-header.vm and filterbox-footer.vm in the /templates/xhtml folder to layout the label and errors differently.
 
Is this something that other people want included in the core ?
 
Cameron.

Reply via email to