Re: [T5.3] Symbols for Default Component Parameter Values
A good thing about following Howard is you getter better in both tapestry and english :) On Thu, Sep 29, 2011 at 9:04 AM, Steve Eynon wrote: > I had to look up the meaning of "Staw Man Proposal" (!) but it seems > it's all good! > > JIRA raised: > > https://issues.apache.org/jira/browse/TAP5-1677 > > Have fun! > > Steve. > > On 28 September 2011 21:57, Massimo Lusetti wrote: >> On Wed, Sep 28, 2011 at 12:15 AM, Igor Drobiazko >> wrote: >> >>> Actually this is supported since 5.2: >>> https://issues.apache.org/jira/browse/TAP5-1094 >> >> I think the proposal here is to have the default value for some >> parameters (like the grid's rowsPerPage) to bind to a Symbol so the >> default can be changed more easly... >> >> Please fire a jira issue It's something nice to work on... >> -- >> Massimo >> http://meridio.blogspot.com >> >> - >> 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 > > -- Regards Taha Hafeez Siddiqi (tawus) http://tawus.wordpress.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.3] Symbols for Default Component Parameter Values
I had to look up the meaning of "Staw Man Proposal" (!) but it seems it's all good! JIRA raised: https://issues.apache.org/jira/browse/TAP5-1677 Have fun! Steve. On 28 September 2011 21:57, Massimo Lusetti wrote: > On Wed, Sep 28, 2011 at 12:15 AM, Igor Drobiazko > wrote: > >> Actually this is supported since 5.2: >> https://issues.apache.org/jira/browse/TAP5-1094 > > I think the proposal here is to have the default value for some > parameters (like the grid's rowsPerPage) to bind to a Symbol so the > default can be changed more easly... > > Please fire a jira issue It's something nice to work on... > -- > Massimo > http://meridio.blogspot.com > > - > 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
Re: [T5.3] Symbols for Default Component Parameter Values
On Wed, Sep 28, 2011 at 12:15 AM, Igor Drobiazko wrote: > Actually this is supported since 5.2: > https://issues.apache.org/jira/browse/TAP5-1094 I think the proposal here is to have the default value for some parameters (like the grid's rowsPerPage) to bind to a Symbol so the default can be changed more easly... Please fire a jira issue It's something nice to work on... -- Massimo http://meridio.blogspot.com - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5.3] Symbols for Default Component Parameter Values
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
Re: [T5.3] Symbols for Default Component Parameter Values
Actually this is supported since 5.2: https://issues.apache.org/jira/browse/TAP5-1094 On Tue, Sep 27, 2011 at 4:52 PM, Howard Lewis Ship wrote: > Good idea; A "symbol" binding prefix could do this quite easily, which > would make your straw man proposal accurate. > > On Tue, Sep 27, 2011 at 7: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; > > > > 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 > > > > > > > > -- > 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: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Best regards, Igor Drobiazko http://tapestry5.de
Re: [T5.3] Symbols for Default Component Parameter Values
Hi, I think you can use a message: prefix as well (defining it in the app.properties) - tough a symbol (or similar) binding for properties will probably be less confusing. For date field format the message: binding is a perfect match as you get all the ordinary resource bundle goodness for free ;) -- Chris On Tue, Sep 27, 2011 at 4:49 PM, 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; > > 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 > >
Re: [T5.3] Symbols for Default Component Parameter Values
Good idea; A "symbol" binding prefix could do this quite easily, which would make your straw man proposal accurate. On Tue, Sep 27, 2011 at 7: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; > > 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 > > -- 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: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org