You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Norman Franke <No...@myASD.com> on 2007/10/23 16:45:07 UTC

T4 Custom components with iterated child components

I've been working on my custom inline table editor component, and I  
figured it would be easier to allow the user of the component to  
specify the component used for display and editing of each column. I  
was thinking doing something like this:

<table jwcid="InlineTableEditor">
	<span jwcid="columnOneDisplay@Insert" />
	<input jwcid="columnOneEditor@Checkbox" />
</table>

This every time the component needed to display column one, it would  
insert a copy of the columnOneDisplay component here (sort of like  
@For does) and similarly for edit mode, it would create a  
columnOneEditor component.

How does one go about doing this? I've looked in the @For component,  
but that didn't really help.

My component doesn't have a renderComponent, since I'm using HTML  
templates.

-Norman Franke



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T4 Custom components with iterated child components

Posted by Norman Franke <no...@myasd.com>.
Cool, thanks!

I see it creates @Block components at the page level. I've done the  
same thing with my component and that works great.

-Norman Franke

On Oct 23, 2007, at 11:08 AM, Miguel Angel Hernández wrote:

> BeanForm component does something similar... you can look at the  
> code to
> give you some idea.
>
>
> On 10/23/07, Norman Franke <No...@myasd.com> wrote:
>>
>> I've been working on my custom inline table editor component, and I
>> figured it would be easier to allow the user of the component to
>> specify the component used for display and editing of each column. I
>> was thinking doing something like this:
>>
>> <table jwcid="InlineTableEditor">
>>         <span jwcid="columnOneDisplay@Insert" />
>>         <input jwcid="columnOneEditor@Checkbox" />
>> </table>
>>
>> This every time the component needed to display column one, it would
>> insert a copy of the columnOneDisplay component here (sort of like
>> @For does) and similarly for edit mode, it would create a
>> columnOneEditor component.
>>
>> How does one go about doing this? I've looked in the @For component,
>> but that didn't really help.
>>
>> My component doesn't have a renderComponent, since I'm using HTML
>> templates.
>>
>> -Norman Franke
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T4 Custom components with iterated child components

Posted by Miguel Angel Hernández <mi...@gmail.com>.
BeanForm component does something similar... you can look at the code to
give you some idea.


On 10/23/07, Norman Franke <No...@myasd.com> wrote:
>
> I've been working on my custom inline table editor component, and I
> figured it would be easier to allow the user of the component to
> specify the component used for display and editing of each column. I
> was thinking doing something like this:
>
> <table jwcid="InlineTableEditor">
>         <span jwcid="columnOneDisplay@Insert" />
>         <input jwcid="columnOneEditor@Checkbox" />
> </table>
>
> This every time the component needed to display column one, it would
> insert a copy of the columnOneDisplay component here (sort of like
> @For does) and similarly for edit mode, it would create a
> columnOneEditor component.
>
> How does one go about doing this? I've looked in the @For component,
> but that didn't really help.
>
> My component doesn't have a renderComponent, since I'm using HTML
> templates.
>
> -Norman Franke
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>