Re: t:type=loop problem
I had no problem using expansions in a loop, (T5.0.5) t:loop source=arr value=value ${value}, /t:loop 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 ul tags). [...] This is what is in Menu.html ul t:type=loop source=categories value=category li t:actionlink t:id=category context=${category.id}${category.name} | ${category.id }/t:actionlink /li /ul it will work if you don't use the expansion in the actionLink context parameter: t:actionlink t:id=category context=category.id 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
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 ul tags). [...] This is what is in Menu.html ul t:type=loop source=categories value=category li t:actionlink t:id=category context=${category.id}${category.name} | ${category.id}/t:actionlink /li /ul it will work if you don't use the expansion in the actionLink context parameter: t:actionlink t:id=category context=category.id 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
On Monday 17 September 2007 08:42:46 Davor Hrg wrote: I had no problem using expansions in a loop, (T5.0.5) t:loop source=arr value=value ${value}, /t:loop 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: t:loop source=arr value=value t:output value=${value}, /t:loop 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 ul tags). [...] This is what is in Menu.html ul t:type=loop source=categories value=category li t:actionlink t:id=category context=${category.id}${category.name} | ${category.id }/t:actionlink /li /ul it will work if you don't use the expansion in the actionLink context parameter: t:actionlink t:id=category context=category.id 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
shouldn't it be: t:loop source=arr value=value t:output value=value, /t:loop ? 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) t:loop source=arr value=value ${value}, /t:loop 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: t:loop source=arr value=value t:output value=${value}, /t:loop 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 ul tags). [...] This is what is in Menu.html ul t:type=loop source=categories value=category li t:actionlink t:id=category context=${category.id}${category.name} | ${category.id }/t:actionlink /li /ul it will work if you don't use the expansion in the actionLink context parameter: t:actionlink t:id=category context=category.id 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 10:03:21 Davor Hrg wrote: shouldn't it be: t:loop source=arr value=value t:output value=value, /t:loop 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) t:loop source=arr value=value ${value}, /t:loop 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: t:loop source=arr value=value t:output value=${value}, /t:loop 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 ul tags). [...] This is what is in Menu.html ul t:type=loop source=categories value=category li t:actionlink t:id=category context=${category.id}${category.name} | ${category.id }/t:actionlink /li /ul it will work if you don't use the expansion in the actionLink context parameter: t:actionlink t:id=category context=category.id 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
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: t:loop source=arr value=value t:output value=value, /t:loop ? 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) t:loop source=arr value=value ${value}, /t:loop 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: t:loop source=arr value=value t:output value=${value}, /t:loop 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 ul tags). [...] This is what is in Menu.html ul t:type=loop source=categories value=category li t:actionlink t:id=category context=${category.id}${category.name} | ${category.id }/t:actionlink /li /ul it will work if you don't use the expansion in the actionLink context parameter: t:actionlink t:id=category context=category.id 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]
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: ul li a href=/mercado/start.layout.menu.category/1 id=categoryCategoryA | 1/a /li /ul ul li a href=/mercado/start.layout.menu.category/1 id=category_0CategoryB | 70/a/li /ul ul li a href=/mercado/start.layout.menu.category/1 id=category_1CategoryC | 110/a/li /ul Every categoryId is 1. (and it generates to much ul tags). When I click a category link the application thinks I always click the first category link. This is what is in Menu.html ul t:type=loop source=categories value=category li t:actionlink t:id=category context=${category.id}${category.name} | ${category.id}/t:actionlink /li /ul 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 CollectionCategory 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+annamkt=nl-nlFORM=LVCP
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 ul tags). [...] This is what is in Menu.html ul t:type=loop source=categories value=category li t:actionlink t:id=category context=${category.id}${category.name} | ${category.id}/t:actionlink /li /ul it will work if you don't use the expansion in the actionLink context parameter: t:actionlink t:id=category context=category.id 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]
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 ul tags). [...] This is what is in Menu.html ul t:type=loop source=categories value=category li t:actionlink t:id=category context=${category.id}${category.name} | ${category.id}/t:actionlink /li /ul it will work if you don't use the expansion in the actionLink context parameter: t:actionlink t:id=category context=category.id 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]