Hi Tony,
try defining the binding expression in .page or .jwc file wheter you're
using a component or page
<component....>
<binding name="id">
"highlight(true,'" + auditInProgress.datasourceUniqueId + "');"
</binding>
</component>
I have a component that uses this similar approach, below is the code:
<component id="toggleLink" type="GenericLink">
<binding name="href">
"javascript:toggleLayer('" + currentCategory.title + "');"
</binding>
</component>
...where currentCategory is referencing an element within a For
component while the For Component loops
Best regards.
Raul.
Tony Herstell wrote:
I have tried various combination of the below and to no avail.
Thanks anyhow.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 6 December 2005 7:42 p.m.
To: 'Tapestry users'
Subject: RE: Issue with Javascript and a ForEach loop
Did you try
onmouseover="ognl: 'highlight(true,
\''+auditInProgress.datasourceUniqueId+'\')' "
right now, I'm not sure how to correctly escape the single-quotes but you
definitely have to start with the "ognl: " binding-prefix.
Apart from that, if my ognl-expressions start getting fancy, I usually
move
them into page-Methods ...
hth,
Marcus
-----Original Message-----
From: Tony Herstell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 06, 2005 6:26 AM
To: 'Tapestry users'
Subject: Issue with Javascript and a ForEach loop
<TR bgcolor="#f0f0f0" id="ognl:auditInProgress.datasourceUniqueId"
onmouseover="highlight(true,
'ognl:auditInProgress.datasourceUniqueId')"
onmouseout="highlight(false,
'ognl:auditInProgress.datasourceUniqueId')"
jwcid="@Foreach" element="TR" source="ognl:auditsInProgress"
value="ognl:auditInProgress">
This works:
id="ognl:auditInProgress.datasourceUniqueId"
These:
onmouseover="highlight(true,
'ognl:auditInProgress.datasourceUniqueId')"
don’t work.. and it seems no variant does either (have tried a few!).
There must be an easy solution...
Thanks in advance...
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]