You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Denis Stepanov (JIRA)" <ji...@apache.org> on 2011/02/16 13:54:57 UTC
[jira] Created: (TAP5-1445) Add clientId parameter to the Zone
component
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
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
[jira] Commented: (TAP5-1445) Add clientId parameter to the Zone
component
Posted by "Josh Canfield (JIRA)" <ji...@apache.org>.
[ 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">
<p>
<t:zone t:id="myZone" id="hello_${zoneId}">
Hello! ${zoneId} ${now}
</t:zone>
<t:eventlink event="refresh" t:context="zoneId" t:zone="hello_${zoneId}">Refresh</t:eventlink>
</p>
</t:loop>
**** PAGE ****
@Property
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();
}
*** GENERATED HTML ***
<p><div class="t-zone" id="hello_1">
Hello! 1 Wed Feb 16 08:48:35 PST 2011
</div>
<a id="eventlink" onclick="javascript:return Tapestry.waitForPage(event);" href="/test:refresh/1">Refresh</a>
</p>
<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);" href="/test:refresh/2">Refresh</a>
</p>
<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);" href="/test:refresh/3">Refresh</a>
</p>
<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);" href="/test:refresh/4">Refresh</a>
</p>
<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);" href="/test:refresh/5">Refresh</a>
</p>
> 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
[jira] Commented: (TAP5-1445) Add clientId parameter to the Zone
component
Posted by "Igor Drobiazko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995327#comment-12995327 ]
Igor Drobiazko commented on TAP5-1445:
--------------------------------------
Denis, please read the component reference for Zone. There is a parameter called "id".
> 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
[jira] Closed: (TAP5-1445) Add clientId parameter to the Zone
component
Posted by "Josh Canfield (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Josh Canfield closed TAP5-1445.
-------------------------------
Resolution: Invalid
Assignee: (was: Howard M. Lewis Ship)
> 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
> 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
[jira] Reopened: (TAP5-1445) Add clientId parameter to the Zone
component
Posted by "Denis Stepanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Denis Stepanov reopened TAP5-1445:
----------------------------------
yes, but you can't have a dynamic id - t:id="user_${user.id}"
> 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
[jira] Closed: (TAP5-1445) Add clientId parameter to the Zone
component
Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship closed TAP5-1445.
--------------------------------------
Resolution: Invalid
Assignee: Howard M. Lewis Ship
Please check the component reference; Zone already has an id parameter.
> 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
[jira] Commented: (TAP5-1445) Add clientId parameter to the Zone
component
Posted by "Denis Stepanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995397#comment-12995397 ]
Denis Stepanov commented on TAP5-1445:
--------------------------------------
Thanks, I forgot about it
> 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
> 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
[jira] Closed: (TAP5-1445) Add clientId parameter to the Zone
component
Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship closed TAP5-1445.
--------------------------------------
Resolution: Invalid
Assignee: Howard M. Lewis Ship
Please check the component reference; Zone already has an id parameter.
> 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
[jira] Reopened: (TAP5-1445) Add clientId parameter to the Zone
component
Posted by "Denis Stepanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Denis Stepanov reopened TAP5-1445:
----------------------------------
yes, but you can't have a dynamic id - t:id="user_${user.id}"
> 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
[jira] Commented: (TAP5-1445) Add clientId parameter to the Zone
component
Posted by "Josh Canfield (JIRA)" <ji...@apache.org>.
[ 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">
<p>
<t:zone t:id="myZone" id="hello_${zoneId}">
Hello! ${zoneId} ${now}
</t:zone>
<t:eventlink event="refresh" t:context="zoneId" t:zone="hello_${zoneId}">Refresh</t:eventlink>
</p>
</t:loop>
**** PAGE ****
@Property
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();
}
*** GENERATED HTML ***
<p><div class="t-zone" id="hello_1">
Hello! 1 Wed Feb 16 08:48:35 PST 2011
</div>
<a id="eventlink" onclick="javascript:return Tapestry.waitForPage(event);" href="/test:refresh/1">Refresh</a>
</p>
<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);" href="/test:refresh/2">Refresh</a>
</p>
<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);" href="/test:refresh/3">Refresh</a>
</p>
<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);" href="/test:refresh/4">Refresh</a>
</p>
<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);" href="/test:refresh/5">Refresh</a>
</p>
> 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
[jira] Commented: (TAP5-1445) Add clientId parameter to the Zone
component
Posted by "Denis Stepanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995397#comment-12995397 ]
Denis Stepanov commented on TAP5-1445:
--------------------------------------
Thanks, I forgot about it
> 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
> 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
[jira] Commented: (TAP5-1445) Add clientId parameter to the Zone
component
Posted by "Denis Stepanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995335#comment-12995335 ]
Denis Stepanov commented on TAP5-1445:
--------------------------------------
Guys, I know that there is a parameter "id", it is also used for defining component id so it can't be dynamic like "myZone_${inLoopItem.id}", you know that right? Because of that there are issues like TAP5-255
Solution:
Make clientId a parameter:
@Parameter(defaultPrefix = BindingConstants.LITERAL)
private String clientId;
and correct setup render:
clientId = clientId != null ? clientId : resources.isBound("id") ? idParameter : javascriptSupport.allocateClientId(resources);
> 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
[jira] Commented: (TAP5-1445) Add clientId parameter to the Zone
component
Posted by "Igor Drobiazko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995327#comment-12995327 ]
Igor Drobiazko commented on TAP5-1445:
--------------------------------------
Denis, please read the component reference for Zone. There is a parameter called "id".
> 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
[jira] Closed: (TAP5-1445) Add clientId parameter to the Zone
component
Posted by "Josh Canfield (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Josh Canfield closed TAP5-1445.
-------------------------------
Resolution: Invalid
Assignee: (was: Howard M. Lewis Ship)
> 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
> 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
[jira] Commented: (TAP5-1445) Add clientId parameter to the Zone
component
Posted by "Denis Stepanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TAP5-1445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12995335#comment-12995335 ]
Denis Stepanov commented on TAP5-1445:
--------------------------------------
Guys, I know that there is a parameter "id", it is also used for defining component id so it can't be dynamic like "myZone_${inLoopItem.id}", you know that right? Because of that there are issues like TAP5-255
Solution:
Make clientId a parameter:
@Parameter(defaultPrefix = BindingConstants.LITERAL)
private String clientId;
and correct setup render:
clientId = clientId != null ? clientId : resources.isBound("id") ? idParameter : javascriptSupport.allocateClientId(resources);
> 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