It is a bug.
I have just tested  having a tooltip component (with
component name myTooltip, say)
inside a Foreach component. (This test has been
overlooked.)
As you pointed out in your earlier email,
the generated tooltip names are all the same, namely,
myTooltip$TT.
It should be something like myTooltip$TT, 
myTooltip$TT$0, 
 myTooltip$TT$1,... etc

In my code, the name of a tooltip in the javascript is
 gotten by suffixing "$TT" to 
AbstractComponent.getId(), which returns the name of
the component
defined in the .specification. 

A quick fix would be to append a timestamp, say, to
make 
the tooltip name  in the javascript unqiue .
This could  easily be done in the renderComponent
method 
of Tooltip.java .

When a TextField component is within a Foreach
component,
Tapestry generates a unqiue (html) name for each copy
of TextField by suffixing
the  component name by $0, $1, .. etc.
Maybe the same mechanism could be used to name
tooltips inside 
a Foreach component. 
I have looked at  the source of Foreach and a few
other components and 
still have no clue on how to do it yet.
Maybe I need to post this question to the list.
Will keep you informed  on my progress.

Shing

 

--- Shing Hing Man <[EMAIL PROTECTED]> wrote:
> I wrote the tooltip component. I will look into the
> problem to see if it can be fixed and let you know
> the
> outcome later.
> 
> Thanks for reporting the bug !
> 
> Shing
> 
> --- Sebastian Knoerzer <[EMAIL PROTECTED]> wrote:
> > hi,
> > 
> > i think i encountered a bug when i use the
> > man:tooltip component in a
> > contrib:formtable. in each row of that table there
> > is one tooltip component.
> > i also have other components like a textfield in
> > each row. the id of each
> > textfield will change with the next row, like in
> the
> > first row name, in the 
> > 2nd row name$0 and so on. but my tooltip component
> > always has the same 
> > name in each row, e.g. $Tooltip$TT.
> > 
> > does anyone have a solution for this, or is that a
> > bug of 
> > the man:tooltip component?
> > 
> > Another question: are there any other tooltip
> > components?
> > 
> > thanks for your help!
> > 
> > 
> > regards
> > 
> > 
> > sebastian
> > 
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> > 
> 
> Home page :
>   http://uk.geocities.com/matmsh/index.html
> 
> Send instant messages to your online friends
> http://uk.messenger.yahoo.com 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 

Home page :
  http://uk.geocities.com/matmsh/index.html

Send instant messages to your online friends http://uk.messenger.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to