You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Vinicius Carvalho <ja...@gmail.com> on 2006/02/27 04:06:49 UTC
Using @Insert inside html attribute
Well, I've never done this with tapestry before, but I need to write a
custom id property for my <div> element. It must be a literal + a property
from an @For value.
<span jwcid="@For" source="ognl:latestNews" value="ognl:currentNews">
<tr bgcolor="#CCCCCC">
<td><span jwcid="@Insert" value="ognl:currentNews.header"/></td>
<td><div id="????"></td>
Where ???? must be something like "news"+currentNews.id
How can I do this?
Regards
Re: Using @Insert inside html attribute
Posted by Raul Raja Martinez <do...@estudiowebs.com>.
In your .html
<div jwcid="whatever" />
and in your .jwc or .page
<component id="whatever" type="Any">
<binding name="id">
'news' + currentNews.id
</binding>
</component>
the 'Any' component is there to be used in any tag where you want to add
your custom attributes dynamically.
Refer to
http://jakarta.apache.org/tapestry/tapestry/ComponentReference/Any.html
for more info about this component.
best regards.
Raul.
Vinicius Carvalho wrote:
> Well, I've never done this with tapestry before, but I need to write a
> custom id property for my <div> element. It must be a literal + a property
> from an @For value.
>
> <span jwcid="@For" source="ognl:latestNews" value="ognl:currentNews">
> <tr bgcolor="#CCCCCC">
> <td><span jwcid="@Insert" value="ognl:currentNews.header"/></td>
> <td><div id="????"></td>
>
>
>
> Where ???? must be something like "news"+currentNews.id
>
>
> How can I do this?
>
> Regards
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org