I think your example is missing a little something. I would tend to agree that Tapestry is about 1% too clever in a couple of areas; I would certainly do some things a bit differently, with years of hindsight. Now it becomes an issue of dealing with backwards compatibility if we change something this fundamental.
On Fri, Mar 23, 2012 at 7:12 AM, trsvax <[email protected]> wrote: > First I'll say Tapestry 5 is the best most flexible framework I've ever used > but, > > I've voiced my opinion about informal parameters in the past and I promise > this is the last time. > > I understand the value of the ad hoc way parameters are passed to > components/mixins but it seems like there should be a way to specify > precisely what parameters go to what components/mixins and I have not been > able to find one. If I'm wrong about this I apologize in advance. > > Consider the following mixin example running under 5.3.2 > > public class FW { > @Parameter(defaultPrefix="literal") > private String type; > > @Inject > private Logger logger; > > @SetupRender > private void setupRender() { > logger.info("type: {}",type); > } > } > > with the following tml > > <t:pagelink page="index" t:mixins="fw" > fw.type="btn-primary">link</t:pagelink> > link > <button t:type="any" t:mixins="fw" > fw.type="btn-primary">button</button> > > I would expect the output to be: > > [INFO] mixins.FW type: btn-primary > [INFO] mixins.FW type: btn-primary > [INFO] mixins.FW type: btn-primary > > but I get: > > [INFO] mixins.FW type: btn-primary > [INFO] mixins.FW type: btn-primary > [INFO] mixins.FW type: submit > > It seems like if I go to all the trouble to namespace my parameters and I > don't have @SupportsInformalParameters I should get mine and mine only. I'd > be willing to try and provide a patch if there is interest in one. > > > Thanks for your patience, > Barry > > > > > > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/Informal-Parameters-considered-harmful-tp5589569p5589569.html > Sent from the Tapestry - Dev mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
