Hi Mark, Yes that is correct, it is being clobbered by tapestry (5.2) - specifically tapestry is appending a character sequence like "myIdName_672hjfty6". I have also tried Igor's suggestion of "clientId" and various permutations, but no luck I'm afraid.
R. On Mon, 2011-02-07 at 11:40 -0600, Mark wrote: > So when you use: > > <t:select t:type="select" > t:id="cctEditSelect" > t:blankOption="NEVER" > onchange="_SU3.renderWebOptions();" > id="myIdName"/> > > myIdName is being overwritten by something else? > > Mark > > On Mon, Feb 7, 2011 at 5:23 AM, Richard Hill <r...@su3analytics.com> wrote: > > > > Hi Igor, > > > > Thanks for the response. I forget to mention in my original email that I > > tried setting the id attribute as well, but to no avail - it gets > > over-written. This is T5.2. > > > > Richard. > > > > > > > > > > On Mon, 2011-02-07 at 12:20 +0100, Igor Drobiazko wrote: > >> t:id is a Tapestry component id, which has nothing to do with the > >> client-side id of the tag written by the component. You should use the > >> clientId parameter. > >> > >> On Mon, Feb 7, 2011 at 10:30 AM, Richard Hill <r...@su3analytics.com> > >> wrote: > >> > >> Hi All, > >> > >> I have a select component in a block: > >> > >> <t:select t:type="select" t:id="cctEditSelect" > >> t:blankOption="NEVER" > >> onchange="_SU3.renderWebOptions();"/> > >> > >> The block is the second of three. The switching between them > >> is > >> accomplished with an ajax actionlink request and a <t:delegate > >> to /> > >> > >> By default the first block is shown on page load. If I then > >> switch to > >> the second block, the id attribute of the <t:select> is > >> something like: > >> > >> id="cctEditSelect_947gyh0" > >> > >> My onchange javascript function expects this to be simply > >> "cctEditSelect". If I refresh the whole page, then the id _is_ > >> rendered > >> just "cctEditSelect" (the currently visible block is > >> @Persist'd). It's > >> only when switching from another block do I get the random > >> characters > >> appended. > >> > >> I'm guessing this is to do with Tapestry making sure there are > >> no id > >> conflicts. I have tried to force the id, by putting in > >> my .java: > >> > >> @InjectComponent > >> @Id("cctEditSelect") > >> private Select cctEditSelect; > >> > >> But no juice - I get the same behaviour. How can I fix this id > >> attribute? > >> > >> Many thanks, > >> > >> Richard. > >> > >> > >> > >> > >> > >> > >> -- > >> Best regards, > >> > >> Igor Drobiazko > >> http://tapestry5.de > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > > For additional commands, e-mail: users-h...@tapestry.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org >