I believe he didn't misunderstood... the real problem is "which approach
should he get to work with dynamic components?".

Actually, I didn't need to use this yet but always wondered too.

_______________________
Everton Agner Ramos


2010/12/3 Joost Schouten (ml) <joost...@jsportal.com>

>  It sounds like you are confusing the t:id with the html dom id. I think
> you are looking for:
>
>
> <t:container xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd
> ">
>        <t:loop source="startCals" value="currentStartCal">
>                <p t:id="yourComponentId" id="${index}"
> t:type="calendar/timeSlot"/>
>        </t:loop>
> </t:container>
>
> Cheers,
> Joost
>
>
>
>
> On 3/12/10 12:54 PM, Christian Koller wrote:
>
>> I have the following template:
>>
>> <t:container xmlns:t="
>> http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>
>>        <t:loop source="startCals" value="currentStartCal">
>>                <p t:id="prop:index" t:type="calendar/timeSlot"/>
>>        </t:loop>
>> </t:container>
>>
>> But Tapestry calls out:
>> Component id 'prop:index' is not valid; component ids must be valid Java
>> identifiers: start with a letter, and consist of letters, numbers and
>> underscores.
>>
>> Is it not possible to use a property as id?
>>
>> If I use a literal as the id, then it works, but then all the generated
>> timeSlot components within the loop will have the same id.
>> If I use afterwards the persist annotation within the timeSlot component
>> all the generated timeSlots share this session value because the id is the
>> same.
>>
>> Any ideas how to solve this?
>> Thank you
>> chris
>> ---------------------------------------------------------------------
>> 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
>
>

Reply via email to