I thought this was a bad idea On 28/09/2011, at 12:49 AM, Steve Eynon wrote:
> To enhance Tapestry, what are people's thoughts about defining default > component values for some components as Symbols? > > For example, the Grid component has the following: > > @Parameter("25") > private int rowsPerPage; until here because it's a template thing and I wouldn't want to recompile my stuff just to change/add rowsPerPage. Then I read your "case study" below and think it's a great idea. That would be a powerful feature to be able to add, especially as displays change and the app gets used more and requirements slowly change. It's a pleasure to feel so n00b :) > meaning if I wish for a pagination of 50 rows, I have to find all > instances of the Grid component in my application and manually add a > "rowsPerPage" parameter. > > But if the parameter was defined as: > > @Parameter("symbol:tapestry.grid.rowsPerPage") > private int rowsPerPage; > > then all I would need to do is override the symbol contribution and > voilĂ , it changes everywhere. > > While converting developers to T5 a common question I'm asked is, > "That's cool - but how do I now make that change happen everywhere in > the app?" At the moment all I can do is shrug and say, "Um, it's > complicated." (*) > > Other specific component defaults I've been asked about are, the > "update" parameter for Zone et al (because the classic "yellow fade" > doesn't work for everyone!) and a date format for DateField (I know > this one is a bit tricky, but the default format for the default > formatter could be supplied by a symbol). > > To me, this why Symbols exist, for extensible configuration - so, err, > how about it!? Or have I overlooked / missed something really obvious > here? > > Regards, > > Steve. > > (*) I know workers and mixins can accomplish the same, but a T5 newbie > isn't going to appreciate that! > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org