Re: Parameters not using setters?
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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Parameters not using setters?
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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Parameters not using setters?
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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]