You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Mindbridge <mi...@yahoo.com> on 2004/01/05 20:02:58 UTC

Property initializers

Hi,

I am about to check in the docs and examples I was talking about, but came across something interesting. 

The properties defined in the component specifications via <property-specification> can be initialized using the 'initial-value' parameter. This parameter is an OGNL expression that (at the moment) is evaluated once during the creation of the component, the value is stored, and is later used as an initialization value whenever necessary.

Shouldn't the 'initial-value' expression be evaluated every time it is needed for initialization instead (if not invariant, of course)? 

This latter approach allows a number of uses that the former one does not (e.g. initializing to something that depends on the bindings), and perhaps it is more natural to the users. 

Should this be considered a bug? Should it be changed? (this is backward compatible if the initial-value parameter is used as designed at the moment). 

-mb

Re: Property initializers

Posted by Geoff Longman <gl...@intelligentworks.com>.
+0

Geoff
----- Original Message -----
From: "Mindbridge" <mi...@yahoo.com>
To: "Tapestry development" <ta...@jakarta.apache.org>
Sent: Tuesday, January 06, 2004 1:37 PM
Subject: Re: Property initializers


> Hi guys,
>
> Is there a -1 vote on this?
>
> I would normally hold off until the release, but I think this is a too
major
> problem to wait.
> I have the code and an additional unit test ready, just need to check it
in
> if there are no objections.
>
> -mb
>
> ----- Original Message -----
> From: "Colin Sampaleanu" <co...@exis.com>
> To: "Tapestry development" <ta...@jakarta.apache.org>
> Sent: Tuesday, January 06, 2004 12:49 AM
> Subject: Re: Property initializers
>
>
> > Personally, it surprised me the first time I figured out it only ran
> > once. I would consider it a 'bug'...
> >
> > Mindbridge wrote:
> >
> > >Hi,
> > >
> > >I am about to check in the docs and examples I was talking about, but
> came across something interesting.
> > >
> > >The properties defined in the component specifications via
> <property-specification> can be initialized using the 'initial-value'
> parameter. This parameter is an OGNL expression that (at the moment) is
> evaluated once during the creation of the component, the value is stored,
> and is later used as an initialization value whenever necessary.
> > >
> > >Shouldn't the 'initial-value' expression be evaluated every time it is
> needed for initialization instead (if not invariant, of course)?
> > >
> > >This latter approach allows a number of uses that the former one does
not
> (e.g. initializing to something that depends on the bindings), and perhaps
> it is more natural to the users.
> > >
> > >Should this be considered a bug? Should it be changed? (this is
backward
> compatible if the initial-value parameter is used as designed at the
> moment).
> > >
> > >-mb
> > >
> > >
> > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>


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


Re: Property initializers

Posted by Richard Lewis-Shell <rl...@mac.com>.
also +0

----- Original Message ----- 
From: "Mindbridge" <mi...@yahoo.com>
To: "Tapestry development" <ta...@jakarta.apache.org>
Sent: Wednesday, January 07, 2004 7:37 AM
Subject: Re: Property initializers


> Hi guys,
>
> Is there a -1 vote on this?
>
> I would normally hold off until the release, but I think this is a too
major
> problem to wait.
> I have the code and an additional unit test ready, just need to check it
in
> if there are no objections.
>
> -mb
>
> ----- Original Message ----- 
> From: "Colin Sampaleanu" <co...@exis.com>
> To: "Tapestry development" <ta...@jakarta.apache.org>
> Sent: Tuesday, January 06, 2004 12:49 AM
> Subject: Re: Property initializers
>
>
> > Personally, it surprised me the first time I figured out it only ran
> > once. I would consider it a 'bug'...
> >
> > Mindbridge wrote:
> >
> > >Hi,
> > >
> > >I am about to check in the docs and examples I was talking about, but
> came across something interesting.
> > >
> > >The properties defined in the component specifications via
> <property-specification> can be initialized using the 'initial-value'
> parameter. This parameter is an OGNL expression that (at the moment) is
> evaluated once during the creation of the component, the value is stored,
> and is later used as an initialization value whenever necessary.
> > >
> > >Shouldn't the 'initial-value' expression be evaluated every time it is
> needed for initialization instead (if not invariant, of course)?
> > >
> > >This latter approach allows a number of uses that the former one does
not
> (e.g. initializing to something that depends on the bindings), and perhaps
> it is more natural to the users.
> > >
> > >Should this be considered a bug? Should it be changed? (this is
backward
> compatible if the initial-value parameter is used as designed at the
> moment).
> > >
> > >-mb
> > >
> > >
> > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>



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


Re: Property initializers

Posted by Harish Krishnaswamy <hk...@comcast.net>.
+0

-Harish

Mindbridge wrote:

> Hi guys,
> 
> Is there a -1 vote on this?
> 
> I would normally hold off until the release, but I think this is a too major
> problem to wait.
> I have the code and an additional unit test ready, just need to check it in
> if there are no objections.
> 
> -mb
> 
> ----- Original Message ----- 
> From: "Colin Sampaleanu" <co...@exis.com>
> To: "Tapestry development" <ta...@jakarta.apache.org>
> Sent: Tuesday, January 06, 2004 12:49 AM
> Subject: Re: Property initializers
> 
> 
> 
>>Personally, it surprised me the first time I figured out it only ran
>>once. I would consider it a 'bug'...
>>
>>Mindbridge wrote:
>>
>>
>>>Hi,
>>>
>>>I am about to check in the docs and examples I was talking about, but
> 
> came across something interesting.
> 
>>>The properties defined in the component specifications via
> 
> <property-specification> can be initialized using the 'initial-value'
> parameter. This parameter is an OGNL expression that (at the moment) is
> evaluated once during the creation of the component, the value is stored,
> and is later used as an initialization value whenever necessary.
> 
>>>Shouldn't the 'initial-value' expression be evaluated every time it is
> 
> needed for initialization instead (if not invariant, of course)?
> 
>>>This latter approach allows a number of uses that the former one does not
> 
> (e.g. initializing to something that depends on the bindings), and perhaps
> it is more natural to the users.
> 
>>>Should this be considered a bug? Should it be changed? (this is backward
> 
> compatible if the initial-value parameter is used as designed at the
> moment).
> 
>>>-mb
>>>
>>>
>>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> 
> 


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


RE: Property initializers

Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
I'm ok with it. I suspect the current design was more related to premature optimization than to any
real architectural concern.

--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Tapestry: Java Web Components 
http://jakarta.apache.org/tapestry/
http://javatapestry.blogspot.com

> -----Original Message-----
> From: Mindbridge [mailto:mindbridgeweb@yahoo.com] 
> Sent: Tuesday, January 06, 2004 1:38 PM
> To: Tapestry development
> Subject: Re: Property initializers
> 
> 
> Hi guys,
> 
> Is there a -1 vote on this?
> 
> I would normally hold off until the release, but I think this 
> is a too major
> problem to wait.
> I have the code and an additional unit test ready, just need 
> to check it in
> if there are no objections.
> 
> -mb
> 
> ----- Original Message ----- 
> From: "Colin Sampaleanu" <co...@exis.com>
> To: "Tapestry development" <ta...@jakarta.apache.org>
> Sent: Tuesday, January 06, 2004 12:49 AM
> Subject: Re: Property initializers
> 
> 
> > Personally, it surprised me the first time I figured out it only ran
> > once. I would consider it a 'bug'...
> >
> > Mindbridge wrote:
> >
> > >Hi,
> > >
> > >I am about to check in the docs and examples I was talking 
> about, but
> came across something interesting.
> > >
> > >The properties defined in the component specifications via
> <property-specification> can be initialized using the 'initial-value'
> parameter. This parameter is an OGNL expression that (at the 
> moment) is
> evaluated once during the creation of the component, the 
> value is stored,
> and is later used as an initialization value whenever necessary.
> > >
> > >Shouldn't the 'initial-value' expression be evaluated 
> every time it is
> needed for initialization instead (if not invariant, of course)?
> > >
> > >This latter approach allows a number of uses that the 
> former one does not
> (e.g. initializing to something that depends on the 
> bindings), and perhaps
> it is more natural to the users.
> > >
> > >Should this be considered a bug? Should it be changed? 
> (this is backward
> compatible if the initial-value parameter is used as designed at the
> moment).
> > >
> > >-mb
> > >
> > >
> > >
> >
> >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: 
> tapestry-dev-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> 


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


Re: Property initializers

Posted by Mindbridge <mi...@yahoo.com>.
Hi guys,

Is there a -1 vote on this?

I would normally hold off until the release, but I think this is a too major
problem to wait.
I have the code and an additional unit test ready, just need to check it in
if there are no objections.

-mb

----- Original Message ----- 
From: "Colin Sampaleanu" <co...@exis.com>
To: "Tapestry development" <ta...@jakarta.apache.org>
Sent: Tuesday, January 06, 2004 12:49 AM
Subject: Re: Property initializers


> Personally, it surprised me the first time I figured out it only ran
> once. I would consider it a 'bug'...
>
> Mindbridge wrote:
>
> >Hi,
> >
> >I am about to check in the docs and examples I was talking about, but
came across something interesting.
> >
> >The properties defined in the component specifications via
<property-specification> can be initialized using the 'initial-value'
parameter. This parameter is an OGNL expression that (at the moment) is
evaluated once during the creation of the component, the value is stored,
and is later used as an initialization value whenever necessary.
> >
> >Shouldn't the 'initial-value' expression be evaluated every time it is
needed for initialization instead (if not invariant, of course)?
> >
> >This latter approach allows a number of uses that the former one does not
(e.g. initializing to something that depends on the bindings), and perhaps
it is more natural to the users.
> >
> >Should this be considered a bug? Should it be changed? (this is backward
compatible if the initial-value parameter is used as designed at the
moment).
> >
> >-mb
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


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


Re: Property initializers

Posted by Colin Sampaleanu <co...@exis.com>.
Personally, it surprised me the first time I figured out it only ran 
once. I would consider it a 'bug'...

Mindbridge wrote:

>Hi,
>
>I am about to check in the docs and examples I was talking about, but came across something interesting. 
>
>The properties defined in the component specifications via <property-specification> can be initialized using the 'initial-value' parameter. This parameter is an OGNL expression that (at the moment) is evaluated once during the creation of the component, the value is stored, and is later used as an initialization value whenever necessary.
>
>Shouldn't the 'initial-value' expression be evaluated every time it is needed for initialization instead (if not invariant, of course)? 
>
>This latter approach allows a number of uses that the former one does not (e.g. initializing to something that depends on the bindings), and perhaps it is more natural to the users. 
>
>Should this be considered a bug? Should it be changed? (this is backward compatible if the initial-value parameter is used as designed at the moment). 
>
>-mb
>
>  
>



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