You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Nathan Bubna <nb...@gmail.com> on 2009/01/07 17:24:11 UTC

Re: LinkTool and xHTML

Just call the setXHTML(boolean) method to change this behavior.  or if
you are configuring this in a tools.xml (Tools 2)  or toolbox.xml
(Tools 1), then you can set an "xhtml" property for the tool to true.

On Tue, Jan 6, 2009 at 9:44 PM, Manish <pr...@gmx.net> wrote:
> This is a question about Velocity's LinkTool
> http://velocity.apache.org/tools/devel/view/LinkTool.html
>
> The addQueryData() method of this tool creates parameters with an ampersand
> - &;
> but xHTML specifies that correct way to write an ampersand in a xhtml is to
> use
> the ampersand character reference "&amp;"  -- so that would make
> &param=value as
> &amp;param=value. Is there any xHTML compatible method available in newer
> versions of LinkTool?
>
> rgds,
> - Manish
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>

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


Re: All properties in velocity.properties

Posted by Byron Foster <by...@base2.cc>.
http://velocity.apache.org/engine/releases/velocity-1.6.1/developer-guide.html#Velocity_Configuration_Keys_and_Values

On Jan 8, 2009, at 0:08 , Manish wrote:

> Where can I find a list of all properties that can be configured in  
> the "velocity.properties" file?


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


All properties in velocity.properties

Posted by Manish <pr...@gmx.net>.
Where can I find a list of all properties that can be configured in the 
"velocity.properties" file?

Any pointers wil be highly appreciated!

TIA,
- Manish



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


Re: LinkTool and xHTML

Posted by Nathan Bubna <nb...@gmail.com>.
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 <pr...@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-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>

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


Re: LinkTool and xHTML

Posted by Manish <pr...@gmx.net>.
>
> 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-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Re: LinkTool and xHTML

Posted by Manish <pr...@gmx.net>.
----- Original Message ----- 
From: "Nathan Bubna" <nb...@gmail.com>
To: "Velocity Users List" <us...@velocity.apache.org>
Sent: Wednesday, January 07, 2009 9:54 PM
Subject: Re: LinkTool and xHTML


> Just call the setXHTML(boolean) method to change this behavior.  or if
> you are configuring this in a tools.xml (Tools 2)  or toolbox.xml
> (Tools 1), then you can set an "xhtml" property for the tool to true.
>


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




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