VelocityTools 1.1 does not support tool configuration, i think.  Back
then, the xhtml setting was for the whole toolbox only; you couldn't
set it on a per-tool basis:

<toolbox>
  <xhtml>true</xhtml>
  <tool>
    <key>link</key>
    ....
</toolbox>

Tools 1.2, 1.3 and 1.4 all support individual tool parameters:

<tool>
  <key>link</key>
  <scope>request</scope>
  <class>org.apache.velocity.tools.struts.StrutsLinkTool</class>
  <parameter name="foo" value="bar"/>
</tool>

However, i just double-checked and the LinkTool still expects the
xhtml setting to be global in all 1.x versions.  So, you can't
actually use parameters for that particular setting.

And yes, Tools 2 makes all such things much easier.  :)

On Wed, Jan 7, 2009 at 11:13 PM, Manish <prol...@gmx.net> wrote:
>>
>> Thanks, I am using Velocity Tools 1.1 (using standard StrutsLinkTool) and
>> thus use toolbox.xml - how do I set the "xhtml" property to true here? This
>> doesn't seem to work -
>>
>>   <tool xhtml="true">
>>       <key>link</key>
>>       <scope>request</scope>
>>       <class>org.apache.velocity.tools.struts.StrutsLinkTool</class>
>>   </tool>
>>
>> Do I need to subclass it? Is there a simpler way to set this property in
>> toolbox.xml (google is just showing me tools.xml examples)
>>
>> rgds,
>> - Manish
>>
>
> I tried this as well, but it's not working either! :(
>
>   <tool>
>       <key>link</key>
>       <scope>request</scope>
>       <class>org.apache.velocity.tools.struts.StrutsLinkTool</class>
>       <property name="xhtml" value="true"/>
>   </tool>
>
> Obviously, I can subclass it very easily -- but the organizational policies
> may not allow using custom tools for links when StrutsLinkTool is available.
> :(
> Is it not possible to configure tools in Velocity tools 1.x? New Velocity
> tools 2 seem to make it quite easy!
>
> TIA,
> - Manish
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org
> For additional commands, e-mail: user-h...@velocity.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org
For additional commands, e-mail: user-h...@velocity.apache.org

Reply via email to