You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Reinhold Gruber <R....@deltavista.com> on 2005/02/14 17:09:25 UTC
Multiple identical DirectLinks
Hi all!
In my application there is a table filled with addresses. I do not (yet) use contrib:Table. For each row each column-value needs to be enclosed by the same link (which takes the user to a page with further details).
<tr jwcid="searchResultLoop" >
<td>
<span jwcid="@DirectLink" listener="ognl:listeners.showAddressDetails"
parameters="ognl:addressID">
<span jwcid="@Insert" value="ognl:address.name"/>
</span>
</td>
<td>
<span jwcid="@DirectLink" listener="ognl:listeners.showAddressDetails" parameters="ognl:addressID">
<span jwcid="@Insert" value="ognl:address.city"/>
</span>
</td>
<!-- and so on -->
</tr>
Note that the td's differ only in the value-binding for the Insert-Component.
Is there a way to define the DirectLink only once (incl. the bindings for listener and parameters) and not all over again for each table-data??
I tried to define the DirectLink in the Page-Spec and created clones link1, link2, link3...with "copy-of" --> But then I must know exactly how many columns this table will have. Which is no problem for the current case. But maybe somebody knows a better way to do such stuff. Thanks.
Reinhold
**************************************************************************
This message is intended only for the named recipient and may contain
confidential or privileged information.
If you have received it in error, please advise the sender by return e-mail
and delete this message and any attachments. Any unauthorized use or dissemination
of this information is strictly prohibited
**************************************************************************