You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Alexander Lamb <al...@rodanotech.ch> on 2008/05/05 17:26:11 UTC

Parameters not using setters?

Hello list,

Some time ago (5.0.?) when I had a component with a parameter, I could  
implement a set method which would do some additional "cleaning up".

For example:

   @Parameter(required = true)
   private RegistryCenter _selectedRegistryCenter;

   public void setSelectedRegistryCenter(RegistryCenter value) {
	  _role = null;
	  _selectedRegistryCenter = value;
   }

Now, it seems like in the last version(s) of Tapestry, parameter  
setting is not using the set methods!?!

If so (which broke my app BTW), what can I do to recuperate this kind  
of behavior (e.g. do something when a parameter is set).

Thanks,

Alex
--
Alexander Lamb
Founding Associate
RODANOTECH Sàrl

4 ch. de la Tour de Champel
1206 Geneva
Switzerland

Tel:  022 347 77 37
Fax: 022 347 77 38

http://www.rodanotech.ch




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


Re: Parameters not using setters?

Posted by Alexander Lamb <al...@rodanotech.ch>.
So maybe it was in Tapestry 4... we migrated a rather large app so  
maybe I am just now discovering some side effects of the migration!

Anyhow, I need to know when a parameter has changed.

For the time being I do the test in setupRender.

Someone suggested ComponentResources.isBound("paramname") but this  
only tells me when the parameter has been set for the first time, not  
when it has changed.

Alex

Le 5 mai 08 à 18:28, Howard Lewis Ship a écrit :

> I'm afraid you are mistaken; this aspect of parameter handling has not
> changed over the lifetime of T5.  Tapestry has never used accessor
> methods to set parameter values.  it *is* perfectly valid for your
> code to implement an accessor method around a parameter-bound field,
> and for code to invoke the method ... but Tapestry doesn't access it
> that way.
>
> On Mon, May 5, 2008 at 8:26 AM, Alexander Lamb
> <al...@rodanotech.ch> wrote:
>> Hello list,
>>
>> Some time ago (5.0.?) when I had a component with a parameter, I  
>> could
>> implement a set method which would do some additional "cleaning up".
>>
>> For example:
>>
>>  @Parameter(required = true)
>>  private RegistryCenter _selectedRegistryCenter;
>>
>>  public void setSelectedRegistryCenter(RegistryCenter value) {
>>          _role = null;
>>          _selectedRegistryCenter = value;
>>  }
>>
>> Now, it seems like in the last version(s) of Tapestry, parameter  
>> setting is
>> not using the set methods!?!
>>
>> If so (which broke my app BTW), what can I do to recuperate this  
>> kind of
>> behavior (e.g. do something when a parameter is set).
>>
>> Thanks,
>>
>> Alex
>> --
>> Alexander Lamb
>> Founding Associate
>> RODANOTECH Sàrl
>>
>> 4 ch. de la Tour de Champel
>> 1206 Geneva
>> Switzerland
>>
>> Tel:  022 347 77 37
>> Fax: 022 347 77 38
>>
>> http://www.rodanotech.ch
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
>
> -- 
> Howard M. Lewis Ship
>
> Creator Apache Tapestry and Apache HiveMind
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>


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


Re: Parameters not using setters?

Posted by Howard Lewis Ship <hl...@gmail.com>.
I'm afraid you are mistaken; this aspect of parameter handling has not
changed over the lifetime of T5.  Tapestry has never used accessor
methods to set parameter values.  it *is* perfectly valid for your
code to implement an accessor method around a parameter-bound field,
and for code to invoke the method ... but Tapestry doesn't access it
that way.

On Mon, May 5, 2008 at 8:26 AM, Alexander Lamb
<al...@rodanotech.ch> wrote:
> Hello list,
>
>  Some time ago (5.0.?) when I had a component with a parameter, I could
> implement a set method which would do some additional "cleaning up".
>
>  For example:
>
>   @Parameter(required = true)
>   private RegistryCenter _selectedRegistryCenter;
>
>   public void setSelectedRegistryCenter(RegistryCenter value) {
>           _role = null;
>           _selectedRegistryCenter = value;
>   }
>
>  Now, it seems like in the last version(s) of Tapestry, parameter setting is
> not using the set methods!?!
>
>  If so (which broke my app BTW), what can I do to recuperate this kind of
> behavior (e.g. do something when a parameter is set).
>
>  Thanks,
>
>  Alex
>  --
>  Alexander Lamb
>  Founding Associate
>  RODANOTECH Sàrl
>
>  4 ch. de la Tour de Champel
>  1206 Geneva
>  Switzerland
>
>  Tel:  022 347 77 37
>  Fax: 022 347 77 38
>
>  http://www.rodanotech.ch
>
>
>
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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


Re: Parameters not using setters?

Posted by Josh Canfield <jo...@thedailytube.com>.
You can use ComponentResources.isBound("paramname") to determine if
the parameter has been set. Add it to your setupRender method.

On Mon, May 5, 2008 at 8:26 AM, Alexander Lamb
<al...@rodanotech.ch> wrote:
> Hello list,
>
> Some time ago (5.0.?) when I had a component with a parameter, I could
> implement a set method which would do some additional "cleaning up".
>
> For example:
>
>  @Parameter(required = true)
>  private RegistryCenter _selectedRegistryCenter;
>
>  public void setSelectedRegistryCenter(RegistryCenter value) {
>          _role = null;
>          _selectedRegistryCenter = value;
>  }
>
> Now, it seems like in the last version(s) of Tapestry, parameter setting is
> not using the set methods!?!
>
> If so (which broke my app BTW), what can I do to recuperate this kind of
> behavior (e.g. do something when a parameter is set).
>
> Thanks,
>
> Alex
> --
> Alexander Lamb
> Founding Associate
> RODANOTECH Sàrl
>
> 4 ch. de la Tour de Champel
> 1206 Geneva
> Switzerland
>
> Tel:  022 347 77 37
> Fax: 022 347 77 38
>
> http://www.rodanotech.ch
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

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