You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Chris Lewis <ch...@bellsouth.net> on 2007/10/09 14:43:03 UTC

T5: get a component by its string id

Hello,

I'm working on a component that can be used to accompany text components 
(text and textarea). My component will provide a client-side count of 
characters in the box (using JS), as well as enforce limits on the size. 
I know most of what I need to do, but I want to be able 'attach' my 
component to another component in a similar way that the label component 
is attached. Specifically, if the id provided in the label's for 
parameter doesn't exist, an exception is thrown. I'd like to be able to 
do this but I dont know how its done. The label component doesnt really 
help because it receives the component to be labeled as a Field type, 
which I assume is handled/verified by the framework. Well, this won't 
work for me because (unfortunately) the Field interface doesn't provide 
a way to deduce the client side id. Any suggestions?

sincerely,
chris

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


Re: T5: get a component by its string id

Posted by Robert Zeigler <ro...@scazdl.org>.
Chris, should be just fine to create modules of mixins, although I  
haven't personally done it.

Cheers,

Robert
On Oct 9, 2007, at 10/99:32 AM , Chris Lewis wrote:

> After some chatting in the IRC channel (everyone should check that  
> out) and some reading, it seems that a mixin was the way to go. Now  
> I've successfully implemented my text monitor as a mixin and am  
> working on ways to make it quickly usable but also customizable.  
> Does anyone know if its possible to create modules of mixins as  
> drop-in jar files, as can be done with component libraries?
>
> thanks!
> chris
>
> Chris Lewis wrote:
>> Hello,
>>
>> I'm working on a component that can be used to accompany text  
>> components (text and textarea). My component will provide a client- 
>> side count of characters in the box (using JS), as well as enforce  
>> limits on the size. I know most of what I need to do, but I want  
>> to be able 'attach' my component to another component in a similar  
>> way that the label component is attached. Specifically, if the id  
>> provided in the label's for parameter doesn't exist, an exception  
>> is thrown. I'd like to be able to do this but I dont know how its  
>> done. The label component doesnt really help because it receives  
>> the component to be labeled as a Field type, which I assume is  
>> handled/verified by the framework. Well, this won't work for me  
>> because (unfortunately) the Field interface doesn't provide a way  
>> to deduce the client side id. Any suggestions?
>>
>> sincerely,
>> chris
>>
>> ---------------------------------------------------------------------
>> 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


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


Re: T5: get a component by its string id

Posted by Chris Lewis <ch...@bellsouth.net>.
After some chatting in the IRC channel (everyone should check that out) 
and some reading, it seems that a mixin was the way to go. Now I've 
successfully implemented my text monitor as a mixin and am working on 
ways to make it quickly usable but also customizable. Does anyone know 
if its possible to create modules of mixins as drop-in jar files, as can 
be done with component libraries?

thanks!
chris

Chris Lewis wrote:
> Hello,
>
> I'm working on a component that can be used to accompany text 
> components (text and textarea). My component will provide a 
> client-side count of characters in the box (using JS), as well as 
> enforce limits on the size. I know most of what I need to do, but I 
> want to be able 'attach' my component to another component in a 
> similar way that the label component is attached. Specifically, if the 
> id provided in the label's for parameter doesn't exist, an exception 
> is thrown. I'd like to be able to do this but I dont know how its 
> done. The label component doesnt really help because it receives the 
> component to be labeled as a Field type, which I assume is 
> handled/verified by the framework. Well, this won't work for me 
> because (unfortunately) the Field interface doesn't provide a way to 
> deduce the client side id. Any suggestions?
>
> sincerely,
> chris
>
> ---------------------------------------------------------------------
> 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