Hi Lance,

I am resistant to passing these parameters in the t:context to my event 
handlers because:

1) it is boilerplate stuff and Tapestry is supposed to handle that without me 
writing code
2) it clutters my event handlers contract with fields and functions the method 
is not directly concerned with - this breaks OO seperation of concerns, my 
event handler will have to concern with persistence
3) if I attempt to avoid cluttering my code to implement persistence as above 
by using client side properties my code is then cluttered with duplicate member 
definitions and code to set these duplicates up
4) @Persists(PersistConstants.CLIENT) produces some nasty URLs and burdens the 
network with excess bytes

Whatever of these approach I take is not OO or DRY and do not seem to follow 
the Tapestry ethos of eliminating boilerplate coding.

I hope that doesn't seem like a criticism of you and your helpful replies, 
thank you Lance. I will certainly be changing my code to using eventlink and it 
seems I am burdened with swallowing these parameters by passing them through 
t:context!

John
  ----- Original Message ----- 
  From: Lance Java 
  To: Tapestry users 
  Sent: Friday, December 06, 2013 8:36 AM
  Subject: Re: component paramter frustrations


  I've said this many times now. You must pass the parameters in the event
  context.

  <t:actionlink t:id="foo" context="[param1,param2,param3]"... />

  onActionFromFoo(String param1, Foo param2, Bar param3)

  BTW: IMHO actionlink is deprecated and shouldn't be used. Use eventlink
  instead.

Reply via email to