[prev in list] [next in list] [prev in thread] [next in thread] 

List:       velocity-user
Subject:    Re: Does velocity provide these features?
From:       Nathan Bubna <nbubna () gmail ! com>
Date:       2011-06-01 15:50:09
Message-ID: BANLkTimsWSy=4YjoJR65EHO8ozGTTkEsug () mail ! gmail ! com
[Download RAW message or body]

As Sergiu said, this is a job for tools and the DisplayTool that is
part of the VelocityTools project supports only one of the listed
features.  However, if you have code or write code for the other
features, those would be welcome as patches to the DisplayTool, as
those are just the kind of thing that it does.

On Wed, Jun 1, 2011 at 6:40 AM, Moe221 <mailtestweb@gmx.de> wrote:
> 
> Hi there,
> i'm evaluating Velocity to find out whether it meets my requirements to
> generate text by using custom templates. I looked at the user guide and
> wrote a little hello world application but there are requirements for which
> I don't know if I have to write my own methods or if there are velocity
> tools that would do the job for me:
> 
> Is there a way to automatically add line breaks when you merge the template
> with the context (without cutting words after e.g. 80 characters)?
> 
> Is there a way to use text shifting (indentation) in combination with line
> breaks without cutting words after e.g. 80 characters)?
> Long text: $magic.doMagic( $text )
> -->
> Long text: Some very
> Very long text,
> more text …
> 
> Is there a way to automatically add line breaks (without cutting words after
> e.g. 80 characters) and add a certain String (e.g. "100. ") at the beginning
> of each line:
> Funny Velocity user request: $magic.doMagic2( $text )
> -->
> Funny Velocity user request: this
> 100. is just a test, a test, a test, a
> 100. test, a test …
> 
> Is there a way to cut the string of a variable after 9 characters and add a
> "*" to the string, if the string has more than 10 characters?
> #set( $test = "textwithmorethan10char" )
> Test: $magic.doMagic3( $test)
> -->
> Test: textwithm*
> Thanx in advance!
> 
> --
> View this message in context: \
> http://old.nabble.com/Does-velocity-provide-these-features--tp31748723p31748723.html
>  Sent from the Velocity - User mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> 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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic