Re: t:type="loop" problem
Michael has it right: in 5.0.5 the second will fail. I logged a JIRA earlier, but as Martin kindly points out this was fixed back in July! There doesn't seem to be a 5.0.6-SNAPSHOT available though. Cheers, Nick. Davor Hrg wrote: shouldn't it be: , ? On 9/17/07, Michael Gottschalk <[EMAIL PROTECTED]> wrote: On Monday 17 September 2007 08:42:46 Davor Hrg wrote: I had no problem using expansions in a loop, (T5.0.5) ${value}, Expansions in a loop are only a problem if they are given as parameters to components. E.g. your example will work, but the following will not: , Cheers, Michael On 9/17/07, Nick Westgate <[EMAIL PROTECTED]> wrote: It's mentioned somewhere (maybe in the source) that expansions are treated as literals, and therefore cached and never re-evaluated. The result is quite non-intuitive in a loop, which has irked me for some time, and I'm beginning to consider it a bug. It's also one reason I still value the Any component. I'll log a JIRA. Cheers, Nick. Michael Gottschalk wrote: Hi Leon, On Sunday 16 September 2007 18:41:07 Leon Derks wrote: I have a problem with the t:type="loop" component in my Menu Component [...] Every categoryId is 1. (and it generates to much tags). [...] This is what is in Menu.html ${category.name} | ${category.id } it will work if you don't use the expansion in the actionLink context parameter: Never use the ${}-notation when giving parameters to a component. I don't know why, but it will not work as expected. Regards, Michael - 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] - 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: t:type="loop" problem
On Monday 17 September 2007 10:03:21 Davor Hrg wrote: > shouldn't it be: > > > , > Yes, exactly, this will work. I just wanted to make clear that the problem is not with expansions in general, but only when they are given to components as parameters. You are right, the solution to this problem is just not to do that. Cheers, Michael > On 9/17/07, Michael Gottschalk <[EMAIL PROTECTED]> wrote: > > On Monday 17 September 2007 08:42:46 Davor Hrg wrote: > > > I had no problem using expansions in a loop, (T5.0.5) > > > > > > > > > ${value}, > > > > > > > Expansions in a loop are only a problem if they are given as parameters > > to components. E.g. your example will work, but the following will not: > > > > > > , > > > > > > > > Cheers, > > Michael > > > > > On 9/17/07, Nick Westgate <[EMAIL PROTECTED]> wrote: > > > > It's mentioned somewhere (maybe in the source) that expansions are > > > > treated as literals, and therefore cached and never re-evaluated. > > > > > > > > The result is quite non-intuitive in a loop, which has irked me for > > > > some time, and I'm beginning to consider it a bug. It's also one > > > > reason I still value the Any component. > > > > > > > > I'll log a JIRA. > > > > > > > > Cheers, > > > > Nick. > > > > > > > > Michael Gottschalk wrote: > > > > > Hi Leon, > > > > > > > > > > On Sunday 16 September 2007 18:41:07 Leon Derks wrote: > > > > >> I have a problem with the t:type="loop" component in my Menu > > > > Component > > > > > > >> [...] > > > > >> Every categoryId is 1. (and it generates to much tags). > > > > >> [...] > > > > >> This is what is in Menu.html > > > > >> > > > > >> > > > > >> > > > > >>> > > >> context="${category.id}">${category.name} | ${category.id > > > > > > > > } > > > > > > > > >> > > > > >> > > > > > > > > > > it will work if you don't use the expansion in the actionLink > > > > context > > > > > > > parameter: > > > > > > > > > > > > > > > Never use the ${}-notation when giving parameters to a component. I > > > > > > > > don't know > > > > > > > > > why, but it will not work as expected. > > > > > > > > > > Regards, > > > > > Michael > > > > - > > > > > > > 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] > > > > - > > 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: t:type="loop" problem
shouldn't it be: , ? On 9/17/07, Michael Gottschalk <[EMAIL PROTECTED]> wrote: > > On Monday 17 September 2007 08:42:46 Davor Hrg wrote: > > I had no problem using expansions in a loop, (T5.0.5) > > > > > > ${value}, > > > > Expansions in a loop are only a problem if they are given as parameters to > components. E.g. your example will work, but the following will not: > > > , > > > > Cheers, > Michael > > > > On 9/17/07, Nick Westgate <[EMAIL PROTECTED]> wrote: > > > It's mentioned somewhere (maybe in the source) that expansions are > > > treated as literals, and therefore cached and never re-evaluated. > > > > > > The result is quite non-intuitive in a loop, which has irked me for > > > some time, and I'm beginning to consider it a bug. It's also one > > > reason I still value the Any component. > > > > > > I'll log a JIRA. > > > > > > Cheers, > > > Nick. > > > > > > Michael Gottschalk wrote: > > > > Hi Leon, > > > > > > > > On Sunday 16 September 2007 18:41:07 Leon Derks wrote: > > > >> I have a problem with the t:type="loop" component in my Menu > Component > > > >> > > > >> [...] > > > >> Every categoryId is 1. (and it generates to much tags). > > > >> [...] > > > >> This is what is in Menu.html > > > >> > > > >> > > > >> > > > >>> > >> context="${category.id}">${category.name} | ${category.id > > > > > > } > > > > > > >> > > > >> > > > > > > > > it will work if you don't use the expansion in the actionLink > context > > > > parameter: > > > > > > > > > > > > Never use the ${}-notation when giving parameters to a component. I > > > > > > don't know > > > > > > > why, but it will not work as expected. > > > > > > > > Regards, > > > > Michael > > > > > > > > > - > > > > 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] > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: t:type="loop" problem
On Monday 17 September 2007 08:42:46 Davor Hrg wrote: > I had no problem using expansions in a loop, (T5.0.5) > > > ${value}, > Expansions in a loop are only a problem if they are given as parameters to components. E.g. your example will work, but the following will not: , Cheers, Michael > On 9/17/07, Nick Westgate <[EMAIL PROTECTED]> wrote: > > It's mentioned somewhere (maybe in the source) that expansions are > > treated as literals, and therefore cached and never re-evaluated. > > > > The result is quite non-intuitive in a loop, which has irked me for > > some time, and I'm beginning to consider it a bug. It's also one > > reason I still value the Any component. > > > > I'll log a JIRA. > > > > Cheers, > > Nick. > > > > Michael Gottschalk wrote: > > > Hi Leon, > > > > > > On Sunday 16 September 2007 18:41:07 Leon Derks wrote: > > >> I have a problem with the t:type="loop" component in my Menu Component > > >> > > >> [...] > > >> Every categoryId is 1. (and it generates to much tags). > > >> [...] > > >> This is what is in Menu.html > > >> > > >> > > >> > > >>> >> context="${category.id}">${category.name} | ${category.id > > > > } > > > > >> > > >> > > > > > > it will work if you don't use the expansion in the actionLink context > > > parameter: > > > > > > > > > Never use the ${}-notation when giving parameters to a component. I > > > > don't know > > > > > why, but it will not work as expected. > > > > > > Regards, > > > Michael > > > > > > - > > > 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: t:type="loop" problem
On Mon, 2007-09-17 at 10:23 +0900, Nick Westgate wrote: > It's mentioned somewhere (maybe in the source) that expansions are > treated as literals, and therefore cached and never re-evaluated. I'd think this is fixed with https://issues.apache.org/jira/browse/TAPESTRY-1667, isn't it? Cheers, Martin > > The result is quite non-intuitive in a loop, which has irked me for > some time, and I'm beginning to consider it a bug. It's also one > reason I still value the Any component. > > I'll log a JIRA. > > Cheers, > Nick. > > > Michael Gottschalk wrote: > > Hi Leon, > > > > On Sunday 16 September 2007 18:41:07 Leon Derks wrote: > >> I have a problem with the t:type="loop" component in my Menu Component > >> > >> [...] > >> Every categoryId is 1. (and it generates to much tags). > >> [...] > >> This is what is in Menu.html > >> > >> > >> > >>>> context="${category.id}">${category.name} | ${category.id} > >> > >> > > > > it will work if you don't use the expansion in the actionLink context > > parameter: > > > > > > Never use the ${}-notation when giving parameters to a component. I don't > > know > > why, but it will not work as expected. > > > > Regards, > > Michael > > > > - > > 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] > -- Martin Grotzke http://www.javakaffee.de/blog/ signature.asc Description: This is a digitally signed message part
Re: t:type="loop" problem
I had no problem using expansions in a loop, (T5.0.5) ${value}, Davor Hrg On 9/17/07, Nick Westgate <[EMAIL PROTECTED]> wrote: > > It's mentioned somewhere (maybe in the source) that expansions are > treated as literals, and therefore cached and never re-evaluated. > > The result is quite non-intuitive in a loop, which has irked me for > some time, and I'm beginning to consider it a bug. It's also one > reason I still value the Any component. > > I'll log a JIRA. > > Cheers, > Nick. > > > Michael Gottschalk wrote: > > Hi Leon, > > > > On Sunday 16 September 2007 18:41:07 Leon Derks wrote: > >> I have a problem with the t:type="loop" component in my Menu Component > >> > >> [...] > >> Every categoryId is 1. (and it generates to much tags). > >> [...] > >> This is what is in Menu.html > >> > >> > >> > >>>> context="${category.id}">${category.name} | ${category.id > } > >> > >> > > > > it will work if you don't use the expansion in the actionLink context > > parameter: > > > > > > Never use the ${}-notation when giving parameters to a component. I > don't know > > why, but it will not work as expected. > > > > Regards, > > Michael > > > > - > > 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: t:type="loop" problem
It's mentioned somewhere (maybe in the source) that expansions are treated as literals, and therefore cached and never re-evaluated. The result is quite non-intuitive in a loop, which has irked me for some time, and I'm beginning to consider it a bug. It's also one reason I still value the Any component. I'll log a JIRA. Cheers, Nick. Michael Gottschalk wrote: Hi Leon, On Sunday 16 September 2007 18:41:07 Leon Derks wrote: I have a problem with the t:type="loop" component in my Menu Component [...] Every categoryId is 1. (and it generates to much tags). [...] This is what is in Menu.html ${category.name} | ${category.id} it will work if you don't use the expansion in the actionLink context parameter: Never use the ${}-notation when giving parameters to a component. I don't know why, but it will not work as expected. Regards, Michael - 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: t:type="loop" problem
Hi Leon, On Sunday 16 September 2007 18:41:07 Leon Derks wrote: > I have a problem with the t:type="loop" component in my Menu Component > > [...] > Every categoryId is 1. (and it generates to much tags). > [...] > This is what is in Menu.html > > > >context="${category.id}">${category.name} | ${category.id} > > it will work if you don't use the expansion in the actionLink context parameter: Never use the ${}-notation when giving parameters to a component. I don't know why, but it will not work as expected. Regards, Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
t:type="loop" problem
I have a problem with the t:type="loop" component in my Menu Component Every link that is generated gets the id of the first Category. So the html source looks like this: CategoryA | 1 CategoryB | 70 CategoryC | 110 Every categoryId is 1. (and it generates to much tags). When I click a category link the application thinks I always click the first category link. This is what is in Menu.html ${category.name} | ${category.id} And this is what is in Menu.java @Inject @Service("categoryService") private CategoryService categoryService; private Category category; Object onActionFromCategory(Long categoryId) { System.out.println("Category " + categoryId + " has been clicked"); categoryDetail.setup(categoryId); return categoryDetail; } public Collection getCategories() { return categoryService.getRootCategories(); } public Category getCategory() { return category; } public void setCategory(Category category) { this.category = category; } _ Altijd al willen weten wat jouw naam betekent? http://search.live.com/results.aspx?q=betekenis+anna&mkt=nl-nl&FORM=LVCP