Title: Message
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