velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Will Glass-Husain" <wgl...@forio.com>
Subject Re: Null Value?
Date Fri, 15 Jul 2005 16:42:32 GMT
Hi,

(sending response to velocity-user).

You have to do this on a item by item basis - no central configuration.

WILL
  ----- Original Message ----- 
  From: Bayarsaikhan VOLODYA
  To: Will Glass-Husain
  Sent: Friday, July 15, 2005 8:28 AM
  Subject: Re: Null Value?


  thanks for answer. it is same as @ in php.
  since most of the user information could be empty, i must user $! in all 
variables. must i?
  is there anyway to configure it in velocity.properties centrally? for 
example; silentmode=true??


  On 7/15/05, Will Glass-Husain <wglass@forio.com> wrote:
    Use the silent notation.

    $!user.name.middleName

    Good luck with Velocity.  Let us know if you've more q's.

    WILL

    ----- Original Message -----
    From: "Bayarsaikhan VOLODYA" < bayarsaikhan@gmail.com>
    To: "Velocity Users List" <velocity-user@jakarta.apache.org>
    Sent: Friday, July 15, 2005 7:28 AM
    Subject: Null Value?


    Hi all.

    my .vm file is here;

    #foreach( $user in $users )
    <b>Middle Name:</b> $user.name.middleName<br>
    #end

    it outputs the something like this.

    Middle Name: MyMiddleName
    Middle Name: $user.name.middleName
    Middle Name: test Name

    since the second user.name <http://user.name> object has no value. null
    value.
    how to set velocity not to output $user.name.middleName. i want it just
    output nothing if property is null.

    thanks a lot.





  -- 
  Bayarsaikhan VOLODYA 


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


Mime
View raw message