You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Patrick Moore <pm...@yahoo.com> on 2006/08/21 20:34:14 UTC

is there a simpler way to get a component's html id?

Hi there --

I am using dojo's tooltip. It needs to know the id of the component that it
responds to.

Use of Script is way over kill when all I want to do is get a html element's id
to supply it to a dojo widget. Any ideas or example I can look at in the source
code?

-Pat

This is what I would like to do:


<a href="#" jwcid="PEANUT@Any" topicId="ognl:currentTopic.id">
     <span jwcid="@Insert" value="ognl:currentTopic.topicName" /></a>
<span jwcid="@If" condition="ognl:currentTopicShortDescriptionSet"
element="span"
	        	 dojoType="tooltip" connectId="${PEANUT.id}" toggle="fade"
toggleDuration="500"><span jwcid="@Insert"
value="ognl:currentTopic.shortDescriptiveText"/></span>


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


Re: is there a simpler way to get a component's html id?

Posted by Patrick Moore <pm...@yahoo.com>.
Cool! I guess I better hurry up and upgrade from 4.0. Is the Rollover component
now implemented with the dojo ToolTip?

--- Jesse Kuhnert <jk...@gmail.com> wrote:

> IComponent.getClientId() is now implemented on all tapestry components by
> default in tapestry 4.1. (at least as many as I've caught so far, a few
> stragglers might have escaped )
> 
> This will reliably tell you what the html element id is of any component,
> when previously it was only available on Form components.
> 
> On 8/21/06, Patrick Moore <pm...@yahoo.com> wrote:
> >
> > Hi there --
> >
> > I am using dojo's tooltip. It needs to know the id of the component that
> > it
> > responds to.
> >
> > Use of Script is way over kill when all I want to do is get a html
> > element's id
> > to supply it to a dojo widget. Any ideas or example I can look at in the
> > source
> > code?
> >
> > -Pat
> >
> > This is what I would like to do:
> >
> >
> > <a href="#" jwcid="PEANUT@Any" topicId="ognl:currentTopic.id">
> >      <span jwcid="@Insert" value="ognl:currentTopic.topicName" /></a>
> > <span jwcid="@If" condition="ognl:currentTopicShortDescriptionSet"
> > element="span"
> >                          dojoType="tooltip" connectId="${PEANUT.id}"
> > toggle="fade"
> > toggleDuration="500"><span jwcid="@Insert"
> > value="ognl:currentTopic.shortDescriptiveText"/></span>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> 
> 
> -- 
> Jesse Kuhnert
> Tapestry/Dojo/(and a dash of TestNG), team member/developer
> 
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind.
> 


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


Re: is there a simpler way to get a component's html id?

Posted by Jesse Kuhnert <jk...@gmail.com>.
IComponent.getClientId() is now implemented on all tapestry components by
default in tapestry 4.1. (at least as many as I've caught so far, a few
stragglers might have escaped )

This will reliably tell you what the html element id is of any component,
when previously it was only available on Form components.

On 8/21/06, Patrick Moore <pm...@yahoo.com> wrote:
>
> Hi there --
>
> I am using dojo's tooltip. It needs to know the id of the component that
> it
> responds to.
>
> Use of Script is way over kill when all I want to do is get a html
> element's id
> to supply it to a dojo widget. Any ideas or example I can look at in the
> source
> code?
>
> -Pat
>
> This is what I would like to do:
>
>
> <a href="#" jwcid="PEANUT@Any" topicId="ognl:currentTopic.id">
>      <span jwcid="@Insert" value="ognl:currentTopic.topicName" /></a>
> <span jwcid="@If" condition="ognl:currentTopicShortDescriptionSet"
> element="span"
>                          dojoType="tooltip" connectId="${PEANUT.id}"
> toggle="fade"
> toggleDuration="500"><span jwcid="@Insert"
> value="ognl:currentTopic.shortDescriptiveText"/></span>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.