tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josh Canfield (JIRA)" <j...@apache.org>
Subject [jira] Commented: (TAP5-1445) Add clientId parameter to the Zone component
Date Wed, 16 Feb 2011 16:55:24 GMT

    [ https://issues.apache.org/jira/browse/TAP5-1445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995384#comment-12995384

Josh Canfield commented on TAP5-1445:

As Howard said, this can be accomplished today. You are confusing "t:id" with the parameter
"id", which is understandable. The parameter "id" does what you want.

This example code works today:

**** TML ***

<t:loop source="1..5" value="zoneId">
        <t:zone t:id="myZone" id="hello_${zoneId}">
            Hello! ${zoneId} ${now}

        <t:eventlink event="refresh" t:context="zoneId" t:zone="hello_${zoneId}">Refresh</t:eventlink>

**** PAGE ****

    private Integer zoneId;

    @Component(id = "myZone")
    private Zone zone;

    public Block onRefresh(Integer zoneId) {
        this.zoneId = zoneId;
        return zone.getBody();

    public String getNow() {
        return new Date().toString();


<p><div class="t-zone" id="hello_1"> 
Hello! 1 Wed Feb 16 08:48:35 PST 2011
<a id="eventlink" onclick="javascript:return Tapestry.waitForPage(event);" href="/test:refresh/1">Refresh</a>
<p><div class="t-zone" id="hello_2"> 
Hello! 2 Wed Feb 16 08:48:35 PST 2011
</div><a id="eventlink_0" onclick="javascript:return Tapestry.waitForPage(event);"
<p><div class="t-zone" id="hello_3"> 
Hello! 3 Wed Feb 16 08:48:35 PST 2011
</div><a id="eventlink_1" onclick="javascript:return Tapestry.waitForPage(event);"
<p><div class="t-zone" id="hello_4"> 
Hello! 4 Wed Feb 16 08:48:35 PST 2011
</div><a id="eventlink_2" onclick="javascript:return Tapestry.waitForPage(event);"
<p><div class="t-zone" id="hello_5"> 
Hello! 5 Wed Feb 16 08:48:35 PST 2011
</div><a id="eventlink_3" onclick="javascript:return Tapestry.waitForPage(event);"

> Add clientId parameter to the Zone component
> --------------------------------------------
>                 Key: TAP5-1445
>                 URL: https://issues.apache.org/jira/browse/TAP5-1445
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.2.4
>            Reporter: Denis Stepanov
>            Assignee: Howard M. Lewis Ship
>            Priority: Minor
> It will solve dynamic zone id problem, when clientId is null it will use the previous
approach. Now we are forced to have a copy of the zone component with a similar solution.
> Also, it would be nice if a generated id is available before rendering, in a case when
someone calls getClient on a zone before it have been rendered.

This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message