Re: Is there a way to get the current rendering component?

2011-08-12 Thread Barry Books
That worked and solved the component not yet rendered problem so

${selector:this} ${selector:test}
${selector:this}
${selector:this}
${selector:this} ${selector:first}

outputs

jQuery('#first') jQuery(selector['test'])
jQuery('#any')
jQuery('#any_0')
jQuery('#test') jQuery('#first')

var $ = jQuery; Tapestry.DEBUG_ENABLED = true; var selector = new Array();
Tapestry.onDOMLoaded(function() {
selector['test'] = '#test';});

Thanks
Barry

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



Re: Is there a way to get the current rendering component?

2011-08-12 Thread Thiago H. de Paula Figueiredo

On Thu, 11 Aug 2011 10:00:19 -0300, Barry Books  wrote:


I'm implementing a selector binding for jQuery. I'd like to be able to
do something like

${selector:this}

and have selector:this emit the html id of its container if it
supports getClientId().


Not out of the box. I'd try to implement a mixin that with an  
@InjectContainer field to get the component instance and then apply it to  
all components implementing a ComponentClassTransformWorker.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Is there a way to get the current rendering component?

2011-08-11 Thread Barry Books
I'm implementing a selector binding for jQuery. I'd like to be able to
do something like

${selector:this}

and have selector:this emit the html id of its container if it
supports getClientId().

I've look thru the docs and I can't find any easy way to do this. Did
I just overlook something or is there another way to do something like
this?

Thanks
Barry

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