You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Gernot Hueller <g....@gmx.at> on 2003/10/30 19:38:45 UTC

Feature request: allow for a property to make Quiet Reference Notation the default

Hello list,

I am beginning to learn velocity (insofar I am a newbie)
and have been wondering about the Quiet Reference Notation (e.g.
value="$!email" - if email exists in the context but is null, an empty string is
rendered).

The default velocity behavior without Quiet References(displaying the String
"$contextvar" if the value is null) is great for development so you do not
oversee unresolved references.
But when you go live, perhaps you oversaw something anyway and do not want
to display $email to the user.
So I thought, is it perhaps possible to change the behavior of "unquiet"
references, e.g. through the properties? something like "forceQuietReferences =
true"?

Just an idea,
cheers,
Gernot

-- 
NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService

Jetzt kostenlos anmelden unter http://www.gmx.net

+++ GMX - die erste Adresse für Mail, Message, More! +++


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


Re: Feature request: allow for a property to make Quiet Reference Notation the default

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
I knew this was wrong as I watched the bits flow out the cable modem.

The setting below shuts down the log messages.

I think that surpressing references is a bad idea, because it means you 
are hiding bugs, and also can alter the content.

   Micro$oft

would come out as

   Micro

It is probably good practice to use quiet references where it doesn't 
matter, and regular (noisy?) ones where it does.

That said, you should be able to solve this problem with a little 
wrapper around your context :

public class MyContext extends VelocityContext
{

     public Object get(Object key)
     {
         Object o = super.get(key);

         return o == null ? "" : o;

     }
}


Another solution is a ReferenceInsertionEventHandler, just returning "" 
when the object is null


On Thursday, October 30, 2003, at 04:48 PM, Geir Magnusson Jr. wrote:

> runtime.log.invalid.references = true
>
> On Thursday, October 30, 2003, at 01:38 PM, Gernot Hueller wrote:
>
>> Hello list,
>>
>> I am beginning to learn velocity (insofar I am a newbie)
>> and have been wondering about the Quiet Reference Notation (e.g.
>> value="$!email" - if email exists in the context but is null, an 
>> empty string is
>> rendered).
>>
>> The default velocity behavior without Quiet References(displaying the 
>> String
>> "$contextvar" if the value is null) is great for development so you 
>> do not
>> oversee unresolved references.
>> But when you go live, perhaps you oversaw something anyway and do not 
>> want
>> to display $email to the user.
>> So I thought, is it perhaps possible to change the behavior of 
>> "unquiet"
>> references, e.g. through the properties? something like 
>> "forceQuietReferences =
>> true"?
>>
>> Just an idea,
>> cheers,
>> Gernot
>>
>> -- 
>> NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
>> Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService
>>
>> Jetzt kostenlos anmelden unter http://www.gmx.net
>>
>> +++ GMX - die erste Adresse für Mail, Message, More! +++
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>>
>>
> -- 
> Geir Magnusson Jr                                   203-247-1713(m)
> geirm@optonline.net
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
>
-- 
Geir Magnusson Jr                                   203-247-1713(m)
geirm@optonline.net


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


Re: Feature request: allow for a property to make Quiet Reference Notation the default

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
runtime.log.invalid.references = true

On Thursday, October 30, 2003, at 01:38 PM, Gernot Hueller wrote:

> Hello list,
>
> I am beginning to learn velocity (insofar I am a newbie)
> and have been wondering about the Quiet Reference Notation (e.g.
> value="$!email" - if email exists in the context but is null, an empty 
> string is
> rendered).
>
> The default velocity behavior without Quiet References(displaying the 
> String
> "$contextvar" if the value is null) is great for development so you do 
> not
> oversee unresolved references.
> But when you go live, perhaps you oversaw something anyway and do not 
> want
> to display $email to the user.
> So I thought, is it perhaps possible to change the behavior of 
> "unquiet"
> references, e.g. through the properties? something like 
> "forceQuietReferences =
> true"?
>
> Just an idea,
> cheers,
> Gernot
>
> -- 
> NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
> Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService
>
> Jetzt kostenlos anmelden unter http://www.gmx.net
>
> +++ GMX - die erste Adresse für Mail, Message, More! +++
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
>
-- 
Geir Magnusson Jr                                   203-247-1713(m)
geirm@optonline.net


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


Re: Feature request: allow for a property to make Quiet Reference Notation the default

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On Monday, November 3, 2003, at 04:25 AM, Christoph.Reck@dlr.de wrote:

> Hi,
>
> Konstantin Priblouda wrote:
>> [snip]
>>>> in near future ( or at all ) .... Velocity team is
>>>> small and not very active, and they do not like to
>>>> make changes in the way velocity works...
>
> please note that there is a *very* active person fixing
> a lot of minor things from the bug list: Will Glass-Husain.
> A great thanks for this silent "getting things rolling"...
> Geir, are you keeping track on all those beautiful patches
> flowing into bugzilla? Will these find their way into 1.5?

I'm watching.  Not agreeing with all, of course, but we're discussing 
them one by one.

>
>> [snip]
>> And while we are at it some more issues: -  context reference leaking 
>>  from macro / #parse
>> ( in short,  i do not like references in context left
>> behind  by already executed macro. if I execute this
>
> please check the #local directive in the contrib CVS area.
> Give feedback if you see this as a solution embedding it
> in all your macros to keep the context unpolluted.
>
> I would recommend making #local part of the vel core.
>
>> macro again, and #set can not set due to null value, I
>> get wrong value. And my search result on web page suddently get new 
>> feature... )
>
> this is a bug that needs addressing...
>
>> [snip]
>> - silent null reference passed as macro parameter
>> bombs inside macro.  Of course, I coule use silent
>> inside macro, but having some control is nice.
> with your example
>> #macro ( tableCell $content )
>>   <fo:table-cell>$content</fo:table-cell>
>> #end
>> Assuming blurge was null:
>> #tableCell( $blurge )  -> <fo:..>$blurge</>
>> ( ok, I see blurge was null ) #tableCell( $!blurge )  -> 
>> <fo:..>$blurge</>
>> ( not what I would like , I knew that blurge could be
>> null, but I still like to have table cell wothout
>> content )
>
> I agree with Konstantin that the bang in the macro call
> and in the macro body should work as expected. But the
> current macro implementation has some implications that
> needs some deep analysis to see how it can be fixed BC.
>
> -- 
> :) Christoph Reck
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
>
-- 
Geir Magnusson Jr                                   203-247-1713(m)
geirm@optonline.net


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


Re: Feature request: allow for a property to make Quiet Reference Notation the default

Posted by Ch...@dlr.de.
Hi,

Konstantin Priblouda wrote:
>[snip]
>>>in near future ( or at all ) .... Velocity team is
>>>small and not very active, and they do not like to
>>>make changes in the way velocity works...

please note that there is a *very* active person fixing
a lot of minor things from the bug list: Will Glass-Husain.
A great thanks for this silent "getting things rolling"...
Geir, are you keeping track on all those beautiful patches
flowing into bugzilla? Will these find their way into 1.5?

>[snip]
> And while we are at it some more issues: 
> 
> -  context reference leaking  from macro / #parse
> ( in short,  i do not like references in context left
> behind  by already executed macro. if I execute this

please check the #local directive in the contrib CVS area.
Give feedback if you see this as a solution embedding it
in all your macros to keep the context unpolluted.

I would recommend making #local part of the vel core.

> macro again, and #set can not set due to null value, I
> get wrong value. And my search result on web page 
> suddently get new feature... )

this is a bug that needs addressing...

>[snip]
> - silent null reference passed as macro parameter
> bombs inside macro.  Of course, I coule use silent
> inside macro, but having some control is nice.
with your example
> #macro ( tableCell $content )
>   <fo:table-cell>$content</fo:table-cell>
> #end
> 
> Assuming blurge was null:
> 
> #tableCell( $blurge )  -> <fo:..>$blurge</>
> ( ok, I see blurge was null ) 
> #tableCell( $!blurge )  -> <fo:..>$blurge</>
> ( not what I would like , I knew that blurge could be
> null, but I still like to have table cell wothout
> content ) 

I agree with Konstantin that the bang in the macro call
and in the macro body should work as expected. But the
current macro implementation has some implications that
needs some deep analysis to see how it can be fixed BC.

-- 
:) Christoph Reck


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


Re: Feature request: allow for a property to make Quiet Reference Notation the default

Posted by Konstantin Priblouda <kp...@yahoo.com>.
> 
> >
> > And while we are at it some more issues:
> >
> > -  context reference leaking  from macro / #parse
> > ( in short,  i do not like references in context
> left
> > behind  by already executed macro. if I execute
> this
> > macro again, and #set can not set due to null
> value, I
> > get wrong value. And my search result on web page
> > suddently get new feature... )
> > This could be easily implemented - just look into
> > webwork directives ( for velocity view ). They
> have
> > nice concept of value stack. Called templates /
> macros
> > have access to what parent left for them, and
> after
> > they are gone they take trash with them.
> >
> 
> This concept already exists in VMs, but the addition
> to #parse is a  
> good idea.  I'll go see what webwork did, but I
> can't imagine it's too  
> hard.


Grab this class ( webwork  and me use it  as inner
class in the directive. wraps context adapter ):

---%<------------------


    /**
     * context wrapper for infobit context to prevent
bleeding of context
     * variables and effectively manage links etc.
     *
     * @author    konstantin ( stole this from webwork
verbatim ) 
     * @created   August 25, 2003
     * @version   $Revision: 1.3 $
     */
    class WrappedInternalContextAdapter implements
InternalContextAdapter {
        private HashMap params = new HashMap();
        private InternalContextAdapter contextAdapter;


        /**
         * Constructor for the
WrappedInternalContextAdapter object
         *
         * @param contextAdapter  Description of
Parameter
         */
        public
WrappedInternalContextAdapter(InternalContextAdapter
contextAdapter) {
            this.contextAdapter = contextAdapter;
        }


        /**
         * Gets the BaseContext attribute of the
WrappedInternalContextAdapter
         * object
         *
         * @return   The BaseContext value
         */
        public InternalContextAdapter getBaseContext()
{
            return contextAdapter.getBaseContext();
        }


        /**
         * Gets the CurrentResource attribute of the
         * WrappedInternalContextAdapter object
         *
         * @return   The CurrentResource value
         */
        public Resource getCurrentResource() {
            return
contextAdapter.getCurrentResource();
        }


        /**
         * Gets the CurrentTemplateName attribute of
the
         * WrappedInternalContextAdapter object
         *
         * @return   The CurrentTemplateName value
         */
        public String getCurrentTemplateName() {
            return
contextAdapter.getCurrentTemplateName();
        }


        /**
         * Gets the EventCartridge attribute of the
         * WrappedInternalContextAdapter object
         *
         * @return   The EventCartridge value
         */
        public EventCartridge getEventCartridge() {
            return contextAdapter.getEventCartridge();
        }


        /**
         * Gets the InternalUserContext attribute of
the
         * WrappedInternalContextAdapter object
         *
         * @return   The InternalUserContext value
         */
        public Context getInternalUserContext() {
            return
contextAdapter.getInternalUserContext();
        }


        /**
         * Gets the Keys attribute of the
WrappedInternalContextAdapter object
         *
         * @return   The Keys value
         */
        public Object[] getKeys() {
            Set keySet = params.keySet();

            if (keySet == null) {
                return contextAdapter.getKeys();
            }

            Object[] objects = new
Object[keySet.size()];
            keySet.toArray(objects);

            return objects;
        }


        /**
         * Gets the TemplateNameStack attribute of the
         * WrappedInternalContextAdapter object
         *
         * @return   The TemplateNameStack value
         */
        public Object[] getTemplateNameStack() {
            return
contextAdapter.getTemplateNameStack();
        }


        /**
         * DOCUMENT METHOD
         *
         * @param s  Description of Parameter
         * @return   Description of the Returned Value
         */
        public Object get(String s) {
            Object obj = params.get(s);

            if (obj == null) {
                obj = contextAdapter.get(s);
            }

            return obj;
        }


        /**
         * Sets the CurrentResource attribute of the
         * WrappedInternalContextAdapter object
         *
         * @param resource  The new CurrentResource
value
         */
        public void setCurrentResource(Resource
resource) {
           
contextAdapter.setCurrentResource(resource);
        }


        /**
         * DOCUMENT METHOD
         *
         * @param eventCartridge  Description of
Parameter
         * @return                Description of the
Returned Value
         */
        public EventCartridge
attachEventCartridge(EventCartridge eventCartridge) {
            return
contextAdapter.attachEventCartridge(eventCartridge);
        }


        /**
         * DOCUMENT METHOD
         *
         * @param o  Description of Parameter
         * @return   Description of the Returned Value
         */
        public boolean containsKey(Object o) {
            if (params.containsKey(o)) {
                return true;
            }

            return contextAdapter.containsKey(o);
        }


        /**
         * DOCUMENT METHOD
         *
         * @param o  Description of Parameter
         * @return   Description of the Returned Value
         */
        public IntrospectionCacheData icacheGet(Object
o) {
            return contextAdapter.icacheGet(o);
        }


        /**
         * DOCUMENT METHOD
         *
         * @param o                       Description
of Parameter
         * @param introspectionCacheData  Description
of Parameter
         */
        public void icachePut(Object o,
IntrospectionCacheData introspectionCacheData) {
            contextAdapter.icachePut(o,
introspectionCacheData);
        }


        /**
         * DOCUMENT METHOD
         */
        public void popCurrentTemplateName() {
            contextAdapter.popCurrentTemplateName();
        }


        /**
         * DOCUMENT METHOD
         *
         * @param s  Description of Parameter
         */
        public void pushCurrentTemplateName(String s)
{
            contextAdapter.pushCurrentTemplateName(s);
        }


        /**
         * DOCUMENT METHOD
         *
         * @param s  Description of Parameter
         * @param o  Description of Parameter
         * @return   Description of the Returned Value
         */
        public Object put(String s, Object o) {
            return params.put(s, o);
        }


        /**
         * DOCUMENT METHOD
         *
         * @param o  Description of Parameter
         * @return   Description of the Returned Value
         */
        public Object remove(Object o) {
            Object obj = params.remove(o);

            if (obj == null) {
                obj = contextAdapter.remove(o);
            }

            return obj;
        }
    }

---%<---------------
> > - silent null reference passed as macro parameter
> > bombs inside macro.  Of course, I coule use silent
> > inside macro, but having some control is nice.
> 
> Sorry - can you give a quick example?

#macro ( tableCell $content )
  <fo:table-cell>$content</fo:table-cell>
#end

Assuming blurge was null:

#tableCell( $blurge )  -> <fo:..>$blurge</>
( ok, I see blurge was null ) 
#tableCell( $!blurge )  -> <fo:..>$blurge</>
( not what I would like , I knew that blurge could be
null, but I still like to have table cell wothout
content ) 

If I use silent notation inside macro, I will never
see what happened...



> >> Of course it would.  You wouldn't know if your
> >> branch of code had a
> >> problem and wasn't putting data in the context
> that
> >> you thought should
> >> go there, right?
> >
> > I would like to have this tunable. I would not
> want to
> > have
> >
>
$awfullLong.and.cryptic.reference.on.my.webpage.which.breaks.freaking.l
> 
> > ayout
> > on website visible to customers...
> 
> ok - so is that using an event hander is too much
> trouble?  Like I said  
> above, I'm not disputing the utility of the end
> result...

Yes. This would mean to provide 2 different context 
setup routines for production / test environment. 

And context setup is not always at hand - say we use
webwork velocity view. They certainly do not attach
cartriges to context....

regards,



=====
----[ Konstantin Pribluda ( ko5tik ) ]----------------
Zu Verst�rkung meines Teams suche ich ab Sofort einen
Softwareentwickler[In] f�r die Festanstellung. 
Arbeitsort: Mainz 
Skills:  Programieren, Kentnisse in OpenSource-Bereich
----[ http://www.pribluda.de ]------------------------

__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

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


Re: Feature request: allow for a property to make Quiet Reference Notation the default

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On Friday, October 31, 2003, at 10:03 AM, Konstantin Priblouda wrote:

>
>>> Short version, no it's impossible in current
>> velocity
>>> version. And it's highly unlikely that it will be
>>> added
>>> in near future ( or at all ) .... Velocity team is
>>> small and not very active, and they do not like to
>>> make changes in the way velocity works...
>>
>> You'd really want this feature in Velocity?  That it
>> would hide your
>> bugs?  When there are already two user-controlled
>> ways of making it
>> happen?
>
> Yes, I would want it too.  I recall having asked for
> it
> last year. And if I like to know about null
> references, I can turn on logs. But my web pages look
> better...

I'm not arguing against being able to do this.  I certainly understand  
why.

>
> And while we are at it some more issues:
>
> -  context reference leaking  from macro / #parse
> ( in short,  i do not like references in context left
> behind  by already executed macro. if I execute this
> macro again, and #set can not set due to null value, I
> get wrong value. And my search result on web page
> suddently get new feature... )
> This could be easily implemented - just look into
> webwork directives ( for velocity view ). They have
> nice concept of value stack. Called templates / macros
> have access to what parent left for them, and after
> they are gone they take trash with them.
>

This concept already exists in VMs, but the addition to #parse is a  
good idea.  I'll go see what webwork did, but I can't imagine it's too  
hard.

> - silent null reference passed as macro parameter
> bombs inside macro.  Of course, I coule use silent
> inside macro, but having some control is nice.

Sorry - can you give a quick example?

>
>
>
>
>>>
>>> ( though it would be piece of cake to do this, and
>> it
>>> would not break anything... )
>>
>> Of course it would.  You wouldn't know if your
>> branch of code had a
>> problem and wasn't putting data in the context that
>> you thought should
>> go there, right?
>
> I would like to have this tunable. I would not want to
> have
> $awfullLong.and.cryptic.reference.on.my.webpage.which.breaks.freaking.l 
> ayout
> on website visible to customers...

ok - so is that using an event hander is too much trouble?  Like I said  
above, I'm not disputing the utility of the end result...

-- 
Geir Magnusson Jr                                   203-247-1713(m)
geirm@optonline.net


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


Re: Feature request: allow for a property to make Quiet Reference Notation the default

Posted by Konstantin Priblouda <kp...@yahoo.com>.
> > Short version, no it's impossible in current
> velocity
> > version. And it's highly unlikely that it will be
> > added
> > in near future ( or at all ) .... Velocity team is
> > small and not very active, and they do not like to
> > make changes in the way velocity works...
> 
> You'd really want this feature in Velocity?  That it
> would hide your 
> bugs?  When there are already two user-controlled
> ways of making it 
> happen?

Yes, I would want it too.  I recall having asked for
it 
last year. And if I like to know about null
references, I can turn on logs. But my web pages look
better... 

And while we are at it some more issues: 

-  context reference leaking  from macro / #parse
( in short,  i do not like references in context left
behind  by already executed macro. if I execute this
macro again, and #set can not set due to null value, I
get wrong value. And my search result on web page 
suddently get new feature... )
This could be easily implemented - just look into
webwork directives ( for velocity view ). They have
nice concept of value stack. Called templates / macros
have access to what parent left for them, and after
they are gone they take trash with them. 

- silent null reference passed as macro parameter
bombs inside macro.  Of course, I coule use silent
inside macro, but having some control is nice.




> >
> > ( though it would be piece of cake to do this, and
> it
> > would not break anything... )
> 
> Of course it would.  You wouldn't know if your
> branch of code had a 
> problem and wasn't putting data in the context that
> you thought should 
> go there, right?

I would like to have this tunable. I would not want to
have
$awfullLong.and.cryptic.reference.on.my.webpage.which.breaks.freaking.layout
on website visible to customers...

regards,

=====
----[ Konstantin Pribluda ( ko5tik ) ]----------------
Zu Verst�rkung meines Teams suche ich ab Sofort einen
Softwareentwickler[In] f�r die Festanstellung. 
Arbeitsort: Mainz 
Skills:  Programieren, Kentnisse in OpenSource-Bereich
----[ http://www.pribluda.de ]------------------------

__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

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


Re: Feature request: allow for a property to make Quiet Reference Notation the default

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On Friday, October 31, 2003, at 07:36 AM, Konstantin Priblouda wrote:
>
> Short version, no it's impossible in current velocity
> version. And it's highly unlikely that it will be
> added
> in near future ( or at all ) .... Velocity team is
> small and not very active, and they do not like to
> make changes in the way velocity works...

You'd really want this feature in Velocity?  That it would hide your 
bugs?  When there are already two user-controlled ways of making it 
happen?

>
> ( though it would be piece of cake to do this, and it
> would not break anything... )

Of course it would.  You wouldn't know if your branch of code had a 
problem and wasn't putting data in the context that you thought should 
go there, right?

geir

-- 
Geir Magnusson Jr                                   203-247-1713(m)
geirm@optonline.net


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


Re: Feature request: allow for a property to make Quiet Reference Notation the default

Posted by Konstantin Priblouda <kp...@yahoo.com>.
--- Gernot Hueller <g....@gmx.at> wrote:
> Hello list,
> 
> I am beginning to learn velocity (insofar I am a
> newbie)
> and have been wondering about the Quiet Reference
> Notation (e.g.
> value="$!email" - if email exists in the context but
> is null, an empty string is
> rendered).
> 
> The default velocity behavior without Quiet
> References(displaying the String
> "$contextvar" if the value is null) is great for
> development so you do not
> oversee unresolved references.
> But when you go live, perhaps you oversaw something
> anyway and do not want
> to display $email to the user.
> So I thought, is it perhaps possible to change the
> behavior of "unquiet"
> references, e.g. through the properties? something
> like "forceQuietReferences =
> true"?

Short version, no it's impossible in current velocity
version. And it's highly unlikely that it will be
added
in near future ( or at all ) .... Velocity team is
small and not very active, and they do not like to
make changes in the way velocity works...

( though it would be piece of cake to do this, and it
would not break anything... )

But good news is that source is available :)

regards,

regards,

=====
----[ Konstantin Pribluda ( ko5tik ) ]----------------
Zu Verst�rkung meines Teams suche ich ab Sofort einen
Softwareentwickler[In] f�r die Festanstellung. 
Arbeitsort: Mainz 
Skills:  Programieren, Kentnisse in OpenSource-Bereich
----[ http://www.pribluda.de ]------------------------

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

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