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.