velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matjaž Trtnik <Matjaz.Trt...@genis.si>
Subject Re: Returning empy string isead of $bean.property
Date Fri, 25 Aug 2006 19:22:57 GMT
Thanks to Charles and rest of the list.




Charles Harvey III <charlieh@alloy.com> 
25.08.2006 16:35
Please respond to
"Velocity Users List" <velocity-user@jakarta.apache.org>


To
Velocity Users List <velocity-user@jakarta.apache.org>
cc

Subject
Re: Returning empy string isead of $bean.property






<Book>
        <Title>$!book.title</Title>
</Book>



Matjaž Trtnik said the following on 8/25/2006 10:27 AM:
> Hello!
>
> Can anyone suggest me how I can solve my problem whish ic as following:
>
> Say I have template
>
> <Book>
>         <Title>$book.title</Title>
> </Book>
>
> I add Book bean to velocity context
>
> context.put("book", new Book()).
>
> Now if title is null return XML will be:
>
> <Book>
>         <Title>$book.title</Title>
> </Book>
>
>
> but I would prefer (empty string):
>
> <Book>
>         <Title></Title>
> </Book>
>
>
> Is it possible to do this somewhere in properties or with some kind of 
> event?
>
>
> Regards,
> Matjaž
> 

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



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message