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

List:       velocity-user
Subject:    Re: Returning empy string isead of $bean.property
From:       Matjaž_Trtnik <Matjaz.Trtnik () genis ! si>
Date:       2006-08-25 19:22:57
Message-ID: OF3B7E2D43.79747B0E-ONC12571D5.006A6A87-C12571D5.006A76AE () genis ! si
[Download RAW message or body]

--=_alternative 006A76A9C12571D5_Content-Type: text/plain; charset="ISO-8859-2"
Content-Transfer-Encoding: quoted-printable

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



--=_alternative 006A76A9C12571D5_=--
[prev in list] [next in list] [prev in thread] [next in thread] 

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